diff --git a/test/e2e/webview.test.ts b/test/e2e/webview.test.ts index dd1a602e92fd..e5a783f37322 100644 --- a/test/e2e/webview.test.ts +++ b/test/e2e/webview.test.ts @@ -18,11 +18,8 @@ describe("Webviews", ["--disable-workspace-trust"], {}, () => { // It's an iframe within an iframe // so we have to do .frameLocator twice - const renderedText = await codeServerPage.page - .frameLocator("iframe.webview.ready") - .frameLocator("#active-frame") - .locator("text=Hello world") - - expect(renderedText).toBeVisible() + await expect( + codeServerPage.page.frameLocator("iframe.webview.ready").frameLocator("#active-frame").getByText("Hello world"), + ).toBeVisible() }) })