You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix e2e tests for newer VS Code versions by adding EditorTestUtils workaround
The newer VS Code versions (1.93+) have removed the .native-edit-context selector
that vscode-extension-tester relies on for TextEditor methods like clearText(),
typeTextAt(), setText(), and moveCursor().
This commit adds EditorTestUtils.ts which provides workaround implementations using
keyboard shortcuts as fallbacks when the native methods fail. The workarounds:
- clearText: Falls back to Ctrl+A and Delete keys
- typeTextAt: Falls back to cursor navigation and direct typing
- setText: Falls back to clearText + typing
- moveCursor: Falls back to Go to Line command
Updated all e2e test files to use the EditorTestUtils methods instead of direct
TextEditor methods:
- Autocomplete.test.ts
- KeyboardShortcuts.test.ts
- Edit.test.ts
- PromptFile.test.ts
- Autocomplete.actions.ts
- NextEdit.actions.ts
This ensures e2e tests work with both older and newer VS Code versions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments