ubiquity / pay.ubq.fi

Generate and claim spender permits (EIP-2612)
https://pay.ubq.fi
8 stars 28 forks source link

E2E tests for payment portal #225

Closed Keyrxng closed 1 month ago

Keyrxng commented 2 months ago

Resolves #215

ubiquibot-continuous-deploys[bot] commented 2 months ago
daf442c
b6d7d78
b8d4eac
adf7277
github-actions[bot] commented 2 months ago
Preview Deployment
[daf442caa64b292a10c9d98f0269e3f2ae4825d6]()
[b6d7d78e9de6ef137696389b6000f172856e94e6]()
[b8d4eacd396fe4e75027af45f3111893c8ce249d]()
[adf727766705fc0c014dc15713c6b7cd37e09317]()
Keyrxng commented 2 months ago

@gentlementlegen I'd appreciate any comments on how to improve these

I kept the code base changes to a minimum for two reasons:

Perhaps it's because I'm wet behind the ears still but it's pretty difficult to handle MM interactions from start to finish, I just stubbed the global for it and made it work that way but maybe there's a better way for handling it?

I'll also add that in using Anvil because you do not need explicit permission if you are using one of the default accounts, transactions can be fired to Anvil while the UI represents a failed tx state.

I had tried using two instances set to different ports one would be the wallet provider and the other the RPC provider but because of the auth caveat and how the signer is injected it's basically the same as using the same instance even when firing it up with a random mnemonic so that the defaults are different so I stuck with one instance.


When I run cypress GUI, I have no extensions installed which I assume is how it should be tested.

Keyrxng commented 2 months ago

All tests pass for me which is curious.

Can I ask which two failed so I can try to debug env related issues?

Could you link the latest successful run to this PR?

I'll add the workflow I overlooked that


Screenshot 2024-04-25 112416 Screenshot 2024-04-25 112402 Screenshot 2024-04-25 112432

gentlementlegen commented 2 months ago

I do not know now if that is related to my env but this is the result of my test for claim-portal-failure

image
Keyrxng commented 2 months ago

Appreciated mate.

I do not know now if that is related to my env but this is the result of my test for claim-portal-failure

I see the balance is N/A meaning that anvil hasn't been setup, did you do:

yarn start yarn test:anvil yarn test:open

in three separate terminals? If not that is the problem, if you did then something else is amiss I'll need to try debug. Very rarely anvil will fail to connect to the fork_url rpc endpoint.


Wait you must have done if the others passed right? I'm a bit confused with this atm but I'll try my best with it on my end to reproduce

Keyrxng commented 2 months ago

Successful CI run

Keyrxng commented 2 months ago

ready when you are @gentlementlegen

Keyrxng commented 1 month ago

If this could be merged in today that would be amazing cheers team @0x4007 @gentlementlegen, I'm only pushing for it because it's 99.98% ready