Open vvp opened 3 years ago
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.
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:
/trade
-page with ChromeWe 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.