Skip to content

Commit

Permalink
Test: Udpate 1-2D CO can see number of votes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sital999 committed Nov 19, 2024
1 parent 229a297 commit f91245b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,15 +462,15 @@ test.describe('User Control', () => {

// Assert number of Yes Votes
await expect(page.getByText('YES')).toBeVisible({ timeout: 10_000 });
const votes = await page
const voterRow = await page
.getByRole('row')
.filter({ has: page.locator('[data-field="vote"]') })
.locator('[data-field="vote"]')
.filter({ has: page.getByText('YES', { exact: true }) })
.allInnerTexts();
const numOfYesVotes = votes.filter(
(v) => v === 'YES' || v === 'NO' || v === 'ABSTAIN'
).length;
expect(numOfYesVotes).toBe(1);
const [workshopName, voterName, voteType] = voterRow[0].split('\n\n');
expect(workshopName).toBe('Workshop 02');
expect(voterName).toBe('Test Delegate 02');
expect(voteType).toBe('YES');
});
});

Expand Down

0 comments on commit f91245b

Please sign in to comment.