Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e/email): add form auth tests #5876

Merged
merged 12 commits into from
Mar 13, 2023
Merged

Conversation

justynoh
Copy link
Contributor

@justynoh justynoh commented Mar 5, 2023

Problem

When we initially migrated e2e tests to Playwright, mockpass was not compatible with our OIDC version. Thus, we omitted e2e tests for forms with authentication. Since mockpass has been updated, form authentication has been restored locally, and therefore we should restore these tests.

Solution

Added tests for SP, CP, SGID and MyInfo. Small adjustment to be made for the myinfoable types in field.ts.
Had to upgrade node version for our CI to 18 to be compatible with mockpass.
Sorry about the lines changed metric, a large proportion of the changes made in createForm is just a giant refactor (to account for auth-ing the form with mockpass).

Separately, I got annoyed with having to type legacy-peer-deps every time so i added it to .npmrc and updated the README.

@justynoh justynoh force-pushed the chore/react-e2e-email-auth branch 3 times, most recently from 2e4862a to 6f7d17a Compare March 8, 2023 18:22
@justynoh justynoh force-pushed the chore/react-e2e-email-auth branch from 6f7d17a to 2ff6f18 Compare March 9, 2023 01:26
@justynoh justynoh force-pushed the chore/react-e2e-email-auth branch from 2ff6f18 to b527c99 Compare March 9, 2023 03:15
…goes to 1 retry, return bogus error codes to see what's causing 400
@justynoh justynoh force-pushed the chore/react-e2e-email-auth branch 18 times, most recently from 3711d2d to 09bdd79 Compare March 10, 2023 08:51
@justynoh justynoh force-pushed the chore/react-e2e-email-auth branch 2 times, most recently from 38334f4 to eeb2863 Compare March 10, 2023 09:43
@justynoh justynoh force-pushed the chore/react-e2e-email-auth branch from eeb2863 to cce7761 Compare March 10, 2023 09:51
@justynoh justynoh marked this pull request as ready for review March 13, 2023 02:56
.npmrc Show resolved Hide resolved
__tests__/e2e/utils/mail.ts Outdated Show resolved Hide resolved
__tests__/e2e/utils/mail.ts Show resolved Hide resolved
__tests__/e2e/helpers/verifySubmission.ts Outdated Show resolved Hide resolved
__tests__/e2e/helpers/verifySubmission.ts Outdated Show resolved Hide resolved
__tests__/e2e/helpers/createForm.ts Outdated Show resolved Hide resolved
__tests__/e2e/helpers/createForm.ts Show resolved Hide resolved
@justynoh
Copy link
Contributor Author

Also, if you're reading this, please know that all the force pushes are there because I was trying to debug tests that were working fine locally but not in CI. It turns out that mockpass used fetch which wasn't available out of the box in node 14 which our CI was running on previously 😠

@justynoh justynoh merged commit f71bdc5 into develop Mar 13, 2023
@justynoh justynoh deleted the chore/react-e2e-email-auth branch March 13, 2023 11:07
@justynoh justynoh mentioned this pull request Mar 13, 2023
8 tasks
@wanlingt wanlingt mentioned this pull request Mar 24, 2023
16 tasks
@wanlingt
Copy link
Contributor

wanlingt commented Mar 24, 2023

do we want to add this to branch protection rules? doing release now and I realise I don't have to wait for these tests to pass to merge into release-al2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants