Skip to content

Commit

Permalink
chore: add assertion for vote count
Browse files Browse the repository at this point in the history
  • Loading branch information
kneerose committed Nov 15, 2024
1 parent 1116b2d commit 2afb445
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test.describe('Vote', () => {
*
* *conversely votes that are 'closed' or 'pending' do not give voters the option to vote.
*/
test('21A. Given active delegate, and poll is open, can cast vote', async ({
test('21A. Given active delegate, and poll is open, then vote option should be visible', async ({
page,
pollId,
}) => {
Expand Down Expand Up @@ -60,6 +60,7 @@ test.describe('Vote', () => {
await pollPage.voteNoBtn.click();

await expect(page.getByText('No', { exact: true })).toBeVisible();
await expect(page.getByText('1 vote', { exact: true })).toBeVisible(); // missing test id
});

/**
Expand All @@ -79,6 +80,7 @@ test.describe('Vote', () => {
await pollPage.voteAbstainBtn.click();

await expect(page.getByText('Abstain', { exact: true })).toBeVisible();
await expect(page.getByText('1 vote', { exact: true })).toBeVisible(); // missing test id
});

/**
Expand All @@ -99,14 +101,17 @@ test.describe('Vote', () => {
// yes vote
await pollPage.voteYesBtn.click();
await expect(page.getByText('Yes', { exact: true })).toBeVisible();
await expect(page.getByText('1 vote', { exact: true })).toBeVisible(); // missing test id

// no vote
await pollPage.voteNoBtn.click();
await expect(page.getByText('No', { exact: true })).toBeVisible();
await expect(page.getByText('1 vote', { exact: true })).toBeVisible(); // missing test id

// abstain vote
await pollPage.voteAbstainBtn.click();
await expect(page.getByText('Abstain', { exact: true })).toBeVisible();
await expect(page.getByText('1 vote', { exact: true })).toBeVisible(); // missing test id
});
});

Expand Down

0 comments on commit 2afb445

Please sign in to comment.