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

fix: playwright tests cancelled after timeout #6208

Closed
wants to merge 56 commits into from
Closed

Conversation

LinHuiqing
Copy link
Contributor

@LinHuiqing LinHuiqing commented Apr 27, 2023

Problem

Playwright tests are wonky and we want to fix them (to some extent) so we can at least have some e2e tests!

Closes #6154

Solution

Fixed several bugs in the playwright tests:

Issues left to tackle regarding playwright tests:

For future reference when playwright tests timeout, here is the estimated time taken for a successful run of tests on GitHub Actions (as of this PR):

  • login.spec.ts (9 tests): ~ 1 min
  • encrypt-submission.spec.ts (15 tests): ~ 18 min
  • email-submission.spec.ts (5 tests): ~ 10 min

Breaking Changes

  • No - this PR is backwards compatible

Features:

  • Details ...

Improvements:

  • Details ...

Bug Fixes:

  • Details ...

@LinHuiqing LinHuiqing changed the title fix: use yarn to install playwright fix: playwright tests cancelled after timeout Apr 27, 2023
Copy link
Contributor Author

@LinHuiqing LinHuiqing May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh btw the changes here corrects the retrieving of OTP emails a bit:

return inbox.filter(filterFn).sort((a, b) => a.time - b.time)

^this corrects the sorting of emails to ascending order of time! so that we can get the latest email when we use pop (not sure why this bug has survived so long?? maybe because we've just been deleting all the other emails)

await MAIL_CLIENT.deleteById(lastEmail.id)

^I removed the deleting of emails by client because... I don't think its needed? and its easier for debugging if we have all the emails in the inbox

@LinHuiqing
Copy link
Contributor Author

Closing in favour of a clean PR at #6308

@LinHuiqing LinHuiqing closed this May 12, 2023
@LinHuiqing LinHuiqing deleted the fix/playwright branch May 15, 2023 06:56
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.

Fix PlayWright tests
2 participants