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

E2E tests for payment portal #225

Merged
merged 10 commits into from
May 3, 2024
Merged

Conversation

Keyrxng
Copy link
Member

@Keyrxng Keyrxng commented Apr 19, 2024

Resolves #215

@Keyrxng Keyrxng changed the title E2e tests 2 E2E tests for payment portal Apr 19, 2024
@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Apr 19, 2024

@Keyrxng
Copy link
Member Author

Keyrxng commented Apr 19, 2024

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

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

  • Adding tests is the spec not refactoring, trying to keep PRs focused.
  • I didn't want to change the code to conform to my tests.

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.

Copy link
Member

@gentlementlegen gentlementlegen left a comment

Choose a reason for hiding this comment

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

@Keyrxng Thank you for the tests. I tried to run them locally but 2/3 failed. Could you link the latest successful run to this PR?

@Keyrxng
Copy link
Member Author

Keyrxng commented Apr 25, 2024

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
Copy link
Member

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
Copy link
Member Author

Keyrxng commented Apr 25, 2024

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
Copy link
Member Author

Keyrxng commented Apr 29, 2024

Successful CI run

@Keyrxng
Copy link
Member Author

Keyrxng commented Apr 30, 2024

ready when you are @gentlementlegen

@Keyrxng
Copy link
Member Author

Keyrxng commented May 3, 2024

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

@ubiquity ubiquity deleted a comment from ubiquity-os-main bot May 3, 2024
@rndquu rndquu merged commit adf7277 into ubiquity:development May 3, 2024
4 checks passed
@ubiquibot ubiquibot bot mentioned this pull request May 3, 2024
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.

E2E Test Claims
3 participants