From aa7c4754619803ecdaca4f66dccb979fc9e4ab63 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Fri, 17 Mar 2023 12:55:39 +0100 Subject: [PATCH] test: add a few regressed selectors (#9875) --- test/src/queryhandler.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/src/queryhandler.spec.ts b/test/src/queryhandler.spec.ts index 0af241d1719..1901f9979b5 100644 --- a/test/src/queryhandler.spec.ts +++ b/test/src/queryhandler.spec.ts @@ -374,6 +374,16 @@ describe('Query handler tests', function () { return element.tagName === 'BUTTON'; }) ).toBeTruthy(); + + // Should parse more complex CSS selectors. Listing a few problematic + // cases from bug reports. + for (const selector of [ + '.user_row[data-user-id="\\38 "]:not(.deactivated_user)', + `input[value='Search']:not([class='hidden'])`, + `[data-test-id^="test-"]:not([data-test-id^="test-foo"])`, + ]) { + await page.$$(selector); + } }); it('should work with text selectors', async () => {