NeokingdomDAO / dapp

https://dapp-neokingdom.vercel.app/
0 stars 0 forks source link

Feat/Add e2e test with Playwright #161

Closed andtos90 closed 4 months ago

andtos90 commented 4 months ago

Description

Part of #157

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

⚠️ There is an issue with how the wallet is handled after being cached for the e2e test: https://github.com/Synthetixio/synpress/issues/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.

vercel[bot] commented 4 months ago

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 commented 4 months ago

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

vrde commented 4 months ago

Uhh nice