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

Feat/Add e2e test with Playwright #161

Merged
merged 14 commits into from
Feb 22, 2024
Merged

Feat/Add e2e test with Playwright #161

merged 14 commits into from
Feb 22, 2024

Conversation

andtos90
Copy link
Contributor

@andtos90 andtos90 commented Feb 15, 2024

Description

Part of #157

Add Playwrigh and add the first few tests. The main goals are:

  • Add Playwright and make it work locally
  • Add a few tests and confirm they are working correctly (with localhost)
  • Support connection to Metamask
  • Add a test with API mocks, specifically for subgraph
  • Add a test with Odoo and Wallet connection
  • Make the API mocks typesafe
  • 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 . 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.

Copy link

vercel bot commented Feb 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dapp-crowdpunk ❌ Failed (Inspect) Feb 22, 2024 7:26pm
dapp-neokingdom ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 22, 2024 7:26pm
dapp-teledisko ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 22, 2024 7:26pm
vanilla-dao ❌ Failed (Inspect) Feb 22, 2024 7:26pm

@andtos90
Copy link
Contributor Author

The build is failing but I don't know why until I have access to Vercel. I think it's related to using type: module in the package.json

Copy link
Contributor

@stecb stecb left a comment

Choose a reason for hiding this comment

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

@vrde
Copy link
Contributor

vrde commented Feb 22, 2024

Uhh nice

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.

None yet

3 participants