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

automated testing for wallet extensions #28

Open
pyramation opened this issue Oct 22, 2022 · 7 comments
Open

automated testing for wallet extensions #28

pyramation opened this issue Oct 22, 2022 · 7 comments

Comments

@pyramation
Copy link
Contributor

@Ebazhanov had a great idea to include testing for create-cosmos-app

The questions I have about our testing for this repo:

  • what should we test?
  • UI tests?
  • e2e tests?
@pyramation
Copy link
Contributor Author

Also, @Ebazhanov it may be good for us to look at adding better testing for cosmos-kit first, so I will also include an issue there cosmology-tech/cosmos-kit#66

@Ebazhanov
Copy link

Basic requirements for any e2e tests:

  • local environment with mock data should be up and running (in our case could be in GH actions), where we can run e2e tests.

Difficulties which I see right now:

But if we want to write some test just for selecting wallet functionality and check if it is present. It possible to start right now just need to setup GH action where we can run Web App.

I might be wrong with planning where should we start:

  • we definitely need some tests plans (brief test cases)
  • UI tests screenshot comparison possible (but due flakines I would start with functional testing)
  • e2e tests: setup GH actions, decided if it is critical for now to test keplr connection. If yes we have to search for solution (i would start explore Puppertier or Playwright automation framework)

@pyramation
Copy link
Contributor Author

wow this is super cool. I love the idea of being able to use something like cypress.

Before we look into a cyrpress-keplr-plugin, maybe we should see if keplr has done something similar. Then see how it could work for leap, cosmostation, and others... maybe it's generalized enough with the metamask plugin hopefully ;)

@pyramation
Copy link
Contributor Author

@Ebazhanov is this something you'd be able to help out with? Do you think you'd know what we need to do in order to make our own plugin for cypress or something similar?

@Ebazhanov
Copy link

I think you very clearly understand my idea since we do not have the library (or any other ways) to manage Keplr inside e2e tests. I can only do research and write tests on what is possible to automate right now except Keplr connection. No, I do not have such a technical level to write plugin which will support Keplr. ((

@pyramation
Copy link
Contributor Author

ok thanks @Ebazhanov ! I do appreciate your research! This is super valuable for us :)

@Ebazhanov
Copy link

Dan, sorry for delay, I just wanted to double check if there is something related.

FYI what I was looking for.

My search criteria:

  • First I need the way how to install external browser extension (e.g. "Keplr" but there could be more to come "Leapwallet")
    probably we can do it using 1. Cypress or 2. Puppeteer or 3. Playwright

  • But next problem we have to generate/register address for Keplr, basically do login. Here is no ready to go examples I found ((

Here I found an example how the tests could look like https://github.com/fetchai/fetch-wallet/pull/24/files

As result i would like to write structure for typical E2E (with connection to Keplr)

  • install browser extension (e.g. Keplr)
  • do registration or login with existing account
  • accept/approve network
  • check connection.

feel free to close this issue since it was kind of research without actual implementation (have no idea what to do next).

p.s. Do not forget that all this implemented steps should work in CI too (e.g. in GH actions or CircleCI) but it will be an other challenge.

@pyramation pyramation changed the title testing for cca testing for wallets Dec 22, 2022
@pyramation pyramation changed the title testing for wallets automated testing for wallet extensions Dec 22, 2022
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

No branches or pull requests

2 participants