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
The app has no e2e tests and it's difficult to validate the correctness of each change and avoid regressions. We should investigate how to add e2e tests. I suggest trying Playwright
# Description
Part of #157
Add Playwrigh and add the first few tests. The main goals are:
- [x] Add Playwright and make it work locally
- [x] Add a few tests and confirm they are working correctly (with
localhost)
- [x] Support connection to Metamask
- [x] Add a test with API mocks, specifically for subgraph
- [x] Add a test with Odoo and Wallet connection
- [x] Make the API mocks typesafe
- [x] Add documentation
⚠️ There is an issue with how the wallet is handled after being cached
for the e2e test: Synthetixio/synpress#1103
### A few notes:
I started mocking with MSW but it was a painful experience. First,
Playwright doesn't work well with libraries that [override their service
worker
](https://playwright.dev/docs/network#missing-network-events-and-service-workers).
Then, the most promising plugin to support graphql-codegen with MSW and
Playwright does not support multiple endpoints, which is an issue for
testing the legacy flow (like the resolutions).
In the end, I'm fairly happy with the final solution. It's not a lot of
code and it doesn't use new libraries but reuses what we have without
sacrificing functionalities.
---------
Co-authored-by: Andrea Tosatto <[email protected]>
The app has no e2e tests and it's difficult to validate the correctness of each change and avoid regressions. We should investigate how to add e2e tests. I suggest trying Playwright
The text was updated successfully, but these errors were encountered: