Skip to content

Commit 267d4af

Browse files
committed
Inline Test and Update to generalUtils
1 parent c93536c commit 267d4af

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"testE2E": "npm run testE2E -w packages/ --if-present",
3131
"test:ui:prepare": "./node_modules/.bin/extest get-vscode -s ~/.vscode-test-resources -n && extest get-chromedriver -s ~/.vscode-test-resources -n",
3232
"test:ui:install": "cd packages/amazonq && npm run package 2>&1 | grep -o 'VSIX Version: [^ ]*' | cut -d' ' -f3 | xargs -I{} bash -c 'cd ../../ && ./node_modules/.bin/extest install-vsix -f amazon-q-vscode-{}.vsix -e packages/amazonq/test/e2e_new/amazonq/resources -s ~/.vscode-test-resources'",
33-
"test:ui:run": "npm run testCompile && ./node_modules/.bin/extest run-tests -s ~/.vscode-test-resources -e packages/amazonq/test/e2e_new/amazonq/resources packages/amazonq/dist/test/e2e_new/amazonq/tests/*.test.js",
33+
"test:ui:run": "npm run testCompile && ./node_modules/.bin/extest run-tests -s ~/.vscode-test-resources -e packages/amazonq/test/e2e_new/amazonq/resources packages/amazonq/dist/test/e2e_new/amazonq/tests/*.js",
3434
"test:ui": "npm run test:ui:prepare && npm run test:ui:install && npm run test:ui:run",
3535
"testInteg": "npm run testInteg -w packages/ --if-present",
3636
"package": "npm run package -w packages/toolkit -w packages/amazonq",

packages/amazonq/test/e2e_new/amazonq/utils/generalUtils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export async function writeToTextEditor(textEditor: TextEditor, text: string): P
169169
* @param editor The TextEditor instance
170170
* @param timeout Maximum time to wait in milliseconds (default: 15000)
171171
* @returns Promise<void>
172+
* @throws Error if timeout is exceeded
172173
*/
173174
export async function waitForEditorStabilization(editor: TextEditor, timeout = 15000): Promise<void> {
174175
const startTime = Date.now()
@@ -190,6 +191,8 @@ export async function waitForEditorStabilization(editor: TextEditor, timeout = 1
190191

191192
previousLines = currentLines
192193
}
194+
195+
throw new Error(`Editor stabilization timed out after ${timeout}ms`)
193196
}
194197

195198
/**

0 commit comments

Comments
 (0)