From ceb4bc25d939c351500e85e19250873dda297e4f Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Tue, 30 Mar 2021 21:53:56 -0700 Subject: [PATCH] test: add a test for hidden shadow host (#6008) --- test/page/page-wait-for-selector-2.spec.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/page/page-wait-for-selector-2.spec.ts b/test/page/page-wait-for-selector-2.spec.ts index dad6016639..9cd795b999 100644 --- a/test/page/page-wait-for-selector-2.spec.ts +++ b/test/page/page-wait-for-selector-2.spec.ts @@ -250,3 +250,21 @@ it('should allow you to select an element with single slash xpath', async ({page const waitForXPath = page.waitForSelector('//html/body/div'); expect(await page.evaluate(x => x.textContent, await waitForXPath)).toBe('some text'); }); + +it('should correctly handle hidden shadow host', async ({page, server}) => { + await page.setContent(` + + + `); + expect(await page.textContent('div')).toBe('Find me'); + await page.waitForSelector('div', { state: 'hidden' }); +});