Skip to content

Commit

Permalink
test: fix voting test
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalinDe committed Feb 9, 2024
1 parent 65ed665 commit 9180c8c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions web/frontend/tests/forms.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,12 @@ test('Assert "Vote" button is visible to admin/non-admin voter user', async ({ p

test('Assert "Vote" button gets voting form', async ({ page }) => {
await setUpMocks(page, 1, 6)
for (const user of [SCIPER_USER, SCIPER_ADMIN]) {
await logIn(page, user);
await logIn(page, SCIPER_USER);
page.waitForRequest(`${process.env.DELA_PROXY_URL}/evoting/forms/${FORMID}`)
await page.getByRole('button', { name: i18n.t('vote') }).click();
// go back to form management page
await setUp(page, `/forms/${FORMID}`);
await logIn(page, SCIPER_ADMIN);
page.waitForRequest(`${process.env.DELA_PROXY_URL}/evoting/forms/${FORMID}`)
await page.getByRole('button', { name: i18n.t('vote') }).click();
}
});

0 comments on commit 9180c8c

Please sign in to comment.