5fc2af2ce6c9 Merge pull request #6102 from continuedev/pe/rule-docs-update Patrick Erichsen,
| .. | ||
| actions/ | ||
| selectors/ | ||
| test-continue/ | ||
| test-continue-yaml/ | ||
| tests/ | ||
| README.md | 1.2 KiB | |
| TestUtils.ts | 2.5 KiB | |
| constants.ts | 142 B | |
| get-latest-vsix.sh | executable | 425 B |
README.md
E2E Tests
Setup
When running e2e tests for the first time
npm run e2e:all
Run
Depending on what code you update, you can use a faster loop to test your changes:
- If you update the e2e test code and/or config.yaml/json, you can run
npm run e2e:quick - If you update the extension code, you can run
npm run e2e:recompile - If you update the gui code, you can run
npm run e2e:rebuild-gui
Writing tests
All e2e tests are separated (by folder) into
selectors- functions that return elementsactions- functions that perform actions on the editortests- the actual tests, which are typically longer paths of functionality rather than individual actions
Why are my tests failing?
- Did you place a
data-testidon a React component instead of an actual HTML element? - Do you have a config.yaml locally but the test is failing when running with config.json in CI?
- Is your
data-testidor selector actually just wrong? - Are you inconsistently getting different behaviors? You can try adding a
TestUtils.waitForTimeoutbetween two events if you think it's caused by a race condition. Note that this may lead to flake down the road. - Alternatively, you can add a
TestUtils.waitForSuccess