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 end-to-end testing #165

Open
vvp opened this issue Jul 9, 2021 · 1 comment
Open

Automated end-to-end testing #165

vvp opened this issue Jul 9, 2021 · 1 comment

Comments

@vvp
Copy link
Contributor

vvp commented Jul 9, 2021

As Vanilla deals with a lot of different wallets, browsers, desktop and mobile use, we really really need automated tests for verifying that app work everywhere as expected. This will also speed up the development and product iteration immensely.

So, let's implement a simplest smoke-test first, to gather some experiences for what it needs to test an application like this:

  • navigate to /trade-page with Chrome
  • connect Metamask
  • verify that UI changes properly

We can keep this issue as an umbrella issue for all things related to e2e testing, and add new more specific issues as we learn more.

@tabcat
Copy link
Contributor

tabcat commented Jul 15, 2021

This is done in https://github.com/vanilladefi/dapp/tree/smoke-test

I tried Playwright first but I believe it lacks the lower level tools found in Puppeteer and seem needed when interacting with Metamask. Puppeteer also has the advantage of a Metamask helper called Dappeteer. Puppeteer + Dappeteer are used together in the smoke test and work well.

I've added 2 scripts to the package file; e2e and e2e-prep. e2e-prep will download chromium for puppeteer-core. This is necessary because not everyone cloning the repo needs to run the integration tests and the chromium download is sizable. e2e runs the smoke test located at e2e/smoke-test.spec.js and will need to be changed when the real tests are added.

@tabcat tabcat mentioned this issue Jul 21, 2021
6 tasks
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