Wait for proxy URI

This commit is contained in:
Asher 2024-10-16 22:45:23 -08:00
parent 39d29fcf91
commit ed3c4e79fc
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 2 additions and 4 deletions

View File

@ -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}}/`)
})
}