Skip to content

Commit

Permalink
Merge pull request #1637 from zetkin/survey-playwright
Browse files Browse the repository at this point in the history
Fix the playwright test for the new survey page
  • Loading branch information
henrycatalinismith authored Nov 12, 2023
2 parents 586d7f0 + e615e45 commit 0aed964
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const KPDMembershipSurvey: ZetkinSurveyExtended = {
text: 'Yes',
},
{
id: 1,
id: 2,
text: 'No',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ test.describe('User submitting a survey', () => {
`${appUri}/o/${KPDMembershipSurvey.organization.id}/surveys/${KPDMembershipSurvey.id}`
);

await page.click('input[name="1.options"]');
await page.fill('input[name="2.text"]', 'Topple capitalism');
await page.click('data-testid=Survey-acceptTerms');
await Promise.all([
await page.click('data-testid=Survey-submit'),
page.waitForResponse((res) => res.request().method() == 'POST'),
await page.click('data-testid=Survey-submit'),
]);

const reqLog = moxy.log(`/v1${apiPostPath}`);
Expand Down

0 comments on commit 0aed964

Please sign in to comment.