epic-stack
epic-stack copied to clipboard
Test for onboarding after GitHub OAuth
This is a chaser to #675
Adding e2e test for GitHub OAuth onboarding and, since we are here, verifying the status button is idle when they first get onto the onboarding page.
Test Plan
Checklist
- [x] Tests updated
- [ ] Docs updated
Screenshots
Thanks for this! I've looked over some of it and have a bit of feedback. Thanks!
This is totally my pleasure! Please have a look at it once again
This is so rad. Thank you for working on it! I just have a couple things!
The pleasure is all mine! I thank you back, and also @kettanaito and all the members of the epic community for the great conference. I watched the first half (your morning - my evening) live and the record of the second half the next day.
As for this thread, I did spend some time on it after Artem's review, and did not find a way out. Besides, I found myself duplicating a lot of logic from the app (stealing btw some work from the mocked GitHub API) and so being dependent on the implementation details. Of note here is that we are using the msw
layer for the GitHub API which we allow to hit in the variant I am suggesting. We are using the Playwright
test runner API to pass through the request to GitHub (and we in this test do not know this is mocked GitHub) only patching the request headers.
I also see a separation of concerns: we are mocking 3rd party services with msw
and only patching request to our own API. My understanding is that this is a nice combo. At the same time, I am not excluding that there is a more elegant solution that I am missing :sweat_smile:
Thanks for this! I think we should probably use a fixture for this to reduce repetition and improve reliable cleanup. Here's the bit in epic web about this: https://testing.epicweb.dev/03
We have a fixture for the login state. It'll be similar to that.
I appreciate your work on this! I'm excited to get this merged!
The pleasure is all mine! Please check it out once again