You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
/api/user/me
The text was updated successfully, but these errors were encountered: