Skip to content

Commit 1be591c

Browse files
committed
fix(e2e): update extension tests
This modifies the test extension using our new methods to reduce flakiness by ensuring the test extension has loaded before proceeding with the test.
1 parent d8ab7d7 commit 1be591c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/e2e/extensions.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ function runTestExtensionTests() {
88
test("should have access to VSCODE_PROXY_URI", async ({ codeServerPage }) => {
99
const address = await getMaybeProxiedCodeServer(codeServerPage)
1010

11+
await codeServerPage.reloadUntilTestExtensionIsLoaded()
1112
await codeServerPage.executeCommandViaMenus("code-server: Get proxy URI")
1213

13-
const text = await codeServerPage.page.locator(".notification-list-item-message").textContent()
14+
await codeServerPage.page.waitForSelector("text=proxyUri", { timeout: 3000 })
15+
const text = await codeServerPage.page.locator("text=proxyUri").first().textContent()
1416
// Remove end slash in address
1517
const normalizedAddress = address.replace(/\/+$/, "")
16-
expect(text).toBe(`${normalizedAddress}/proxy/{{port}}`)
18+
expect(text).toBe(`Info: proxyUri: ${normalizedAddress}/proxy/{{port}}`)
1719
})
1820
}
1921

0 commit comments

Comments
 (0)