Skip to content

Commit 8919848

Browse files
committed
feat(e2e): add isTestExtensionLoaded method
1 parent 4516854 commit 8919848

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/e2e/models/CodeServer.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,23 @@ export class CodeServerPage {
296296
return visible
297297
}
298298

299+
/**
300+
* Checks if the test extension loaded
301+
*/
302+
async isTestExtensionLoaded() {
303+
const selector = "text=test extension loaded"
304+
this.codeServer.logger.debug("Waiting for test extension to load...")
305+
await this.page.waitForSelector(selector, {
306+
timeout: 3000,
307+
})
308+
309+
const loaded = await this.page.isVisible(selector)
310+
311+
this.codeServer.logger.debug(`Test extension has ${loaded ? "" : "not"} loaded`)
312+
313+
return loaded
314+
}
315+
299316
/**
300317
* Focuses the integrated terminal by navigating through the command palette.
301318
*

0 commit comments

Comments
 (0)