From e7d670e27b3e4d4730346acf7d12c21b062ca335 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 22 Mar 2023 08:56:50 -0700 Subject: [PATCH] test: waitFor(hidden) should succeed when frame is not in dom (#21880) Failing test for https://github.com/microsoft/playwright/issues/21879 --- tests/page/locator-frame.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/page/locator-frame.spec.ts b/tests/page/locator-frame.spec.ts index 2c7b13f880..55b68864b1 100644 --- a/tests/page/locator-frame.spec.ts +++ b/tests/page/locator-frame.spec.ts @@ -257,3 +257,12 @@ it('getBy coverage', async ({ page, server }) => { const input4 = page.frameLocator('iframe').getByTitle('Title'); await expect(input4).toHaveValue(''); }); + +it('wait for hidden should succeed when frame is not in dom', async ({ page }) => { + it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21879' }); + it.fixme(); + await page.goto('about:blank'); + const button = page.frameLocator('iframe1').locator('button'); + expect(await button.isHidden()).toBeTruthy(); + await button.waitFor({ state: 'hidden', timeout: 1000 }); +});