From ed3c4e79fc6abbf6b20b7a70a2cb9e4c6bf32b3c Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 16 Oct 2024 22:45:23 -0800 Subject: [PATCH] Wait for proxy URI --- test/e2e/extensions.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/e2e/extensions.test.ts b/test/e2e/extensions.test.ts index 3a3870145..ac56fcfec 100644 --- a/test/e2e/extensions.test.ts +++ b/test/e2e/extensions.test.ts @@ -11,11 +11,9 @@ function runTestExtensionTests() { await codeServerPage.waitForTestExtensionLoaded() await codeServerPage.executeCommandViaMenus("code-server: Get proxy URI") - await codeServerPage.page.waitForSelector("text=proxyUri", { timeout: 3000 }) - const text = await codeServerPage.page.locator("text=proxyUri").first().textContent() - // Remove end slash in address + // Remove end slash in address. const normalizedAddress = address.replace(/\/+$/, "") - expect(text).toBe(`Info: proxyUri: ${normalizedAddress}/proxy/{{port}}/`) + await codeServerPage.page.getByText(`Info: proxyUri: ${normalizedAddress}/proxy/{{port}}/`) }) }