Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: add test for multiple arguments in :has() (#5047)
Dmitry Gozman9caa8e80d749
diff --git a/test/selectors-css.spec.ts b/test/selectors-css.spec.tsindex f79df3dd4f..fa2c2421b7 100644--- a/test/selectors-css.spec.ts+++ b/test/selectors-css.spec.ts@@ -348,6 +348,13 @@ it('should work with :has', async ({page, server}) => {expect(await page.$$eval(`css=div:has(#target)`, els => els.length)).toBe(2);expect(await page.$$eval(`css=div:has([data-testid=foo])`, els => els.length)).toBe(3);expect(await page.$$eval(`css=div:has([attr*=value])`, els => els.length)).toBe(2);++ await page.setContent(`<section><span></span><div></div></section><section><br></section>`);+ expect(await page.$$eval(`section:has(span, div)`, els => els.length)).toBe(1);+ expect(await page.$$eval(`section:has(span, div)`, els => els.length)).toBe(1);+ expect(await page.$$eval(`section:has(br)`, els => els.length)).toBe(1);+ expect(await page.$$eval(`section:has(span, br)`, els => els.length)).toBe(2);+ expect(await page.$$eval(`section:has(span, br, div)`, els => els.length)).toBe(2);});it('should work with :scope', async ({page, server}) => {