-
-
Notifications
You must be signed in to change notification settings - Fork 309
How to write an e2e Test for runtime
We use git-lfs (Install by official website) to manage baseline images for e2e tests, so it's necessary to install it, ignore if already installed.
You can refer to e2e/case/animator-play.ts.
The threshold is color difference threshold (from 0 to 1). Less more precise.
npm run e2e:case
After successfully launching the case page, run:
git lfs pull
Pull image from github, then run
npm run e2e:debug
Open the Cypress client for debugging. Cypress will capture screenshots of your case pages. Review the screenshots in e2e/downloads folder, store them in the e2e/fixtures/originImage directory if there are no issues, then rerun the test cases. If the test cases pass, the debugging is complete.
npm run e2e
Note: The e2e testing framework for this project is Cypress. For detailed usage instructions, please refer to https://www.cypress.io/.