continue-custom/extensions/vscode/e2e
shamanic dcffd3529f test: add force autocomplete test case
- Adds `forceCompletion` method to `AutocompleteActions` to trigger autocomplete via command.
- Includes new test case to verify forced autocomplete functionality.
- Attempted to test these tests to the best of my ability`
2025-06-07 05:03:12 +01:00
..
actions test: add force autocomplete test case 2025-06-07 05:03:12 +01:00
selectors fix: failing test 2025-05-15 10:43:30 -07:00
test-continue test: hardcode tool_use 2025-05-07 14:26:08 -07:00
test-continue-yaml test: hardcode tool_use 2025-05-07 14:26:08 -07:00
tests test: add force autocomplete test case 2025-06-07 05:03:12 +01:00
constants.ts fest: fix flakiness 2024-12-13 12:52:02 -08:00
get-latest-vsix.sh improv: copy vsix 2024-12-04 16:55:36 -08:00
README.md fix: bump extension tester version 2025-05-09 11:57:06 -07:00
TestUtils.ts test fixes 2025-04-19 22:18:35 -07:00

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 elements
  • actions - functions that perform actions on the editor
  • tests - the actual tests, which are typically longer paths of functionality rather than individual actions

Why are my tests failing?

  • Did you place a data-testid on 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-testid or selector actually just wrong?
  • Are you inconsistently getting different behaviors? You can try adding a TestUtils.waitForTimeout between 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