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

Explore options for automating testing site flow #458

Open
taesungh opened this issue Dec 10, 2024 · 0 comments
Open

Explore options for automating testing site flow #458

taesungh opened this issue Dec 10, 2024 · 0 comments

Comments

@taesungh
Copy link
Member

Noticed during #446 that there are lots of different possible ways for the login flow to happen with potential edge cases. It would be helpful if we could have a testing mechanism to verify these work as expected. Since many of our site components are async server components, we can consider Setting up Playwright with Next.js for End-to-End testing. One tricky part will be mocking server-side fetch requests to the API as support for this is still experimental. Playwright used to offer an experimental playwright-ssr, but this repository was archived a few months ago. Next.js does offer an Experimental test mode for Playwright which might work for our use cases.

  • Install and configure Playwright with Next.js
  • Add some test cases for the redirects that happen in different scenarios
    • Provide a helper to mock the user identity provided by /api/user/me
  • Include a step in the checks workflow to run the E2E tests
    • Can maybe have the workflow leave a comment on the PR instead of failing a check since this seems experimental for now
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

No branches or pull requests

1 participant