Fujicracy / fuji-v2

Cross-chain money market aggregator
https://fuji-v2-frontend.vercel.app
15 stars 10 forks source link

Frontend testing setup #478

Closed ferostabio closed 1 year ago

ferostabio commented 1 year ago
ferostabio commented 1 year ago
ferostabio commented 1 year ago
ferostabio commented 1 year ago

Tried setting the initial custom network in code instead of through an environment variable and nothing changes (makes sense looking at their code). synpress supports adding only one custom network to Metamask.

Once we support L1 we'll be able to simply add a custom unsopported network to test that case. For the time being, we need to start by choosing an unsupported network directly.

But there's another, even more important issue. When we trigger the switch from our app, we get the infamous Switch network alert from Metamask and all subsequent tests fail. I can actually see that the network changes and the change is reflected in the app, but cypress fails to get all data.

I would then say:

Thoughts?

NikolaiYurchenko commented 1 year ago

Is this alert there every time? if so, we can close it in test probably?

ferostabio commented 1 year ago

@NikolaiYurchenko test works great, and already added a comment specifying synpress's limitations and we're moving on. No plans to get stuck because of this. Anyway the latest adition ends up with the following warning:


It is unsafe to chain further commands that rely on the subject after this command. It is best to split the chain, chaining again from `cy.` in a next command line.```