From 87531289e2bdb8503ea1a32c5bba093445e1d8a9 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 11 Jul 2022 14:24:08 -0700 Subject: [PATCH] test: case insensitive regex in hasText (#15540) --- tests/page/locator-query.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/page/locator-query.spec.ts b/tests/page/locator-query.spec.ts index 720b2e6dd9..fc5194b97d 100644 --- a/tests/page/locator-query.spec.ts +++ b/tests/page/locator-query.spec.ts @@ -90,6 +90,13 @@ it('should filter by regex and regexp flags', async ({ page }) => { await expect(page.locator('div', { hasText: /hElLo "world"/i })).toHaveText('Hello "world"'); }); +it('should filter by case-insensitive regex in a child', async ({ page }) => { + it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/15348' }); + it.fixme(); + await page.setContent(`
Title Text
`); + await expect(page.locator('div', { hasText: /^title text$/i })).toHaveText('Title Text'); +}); + it('should support has:locator', async ({ page, trace }) => { it.skip(trace === 'on');