Skip to content

Commit 55ef5e2

Browse files
fix(e2e): fix invalid Playwright selector syntax
The selector '[role=\'alert\'], .MuiAlert-root, text=Template updated successfully' was invalid because it mixed CSS selectors with text selectors using commas. Fixed by using page.locator() with :has-text() pseudo-selectors which is the proper Playwright syntax for combining CSS selectors with text matching. Co-authored-by: jaaydenh <1858163+jaaydenh@users.noreply.github.com>
1 parent 5e95f31 commit 55ef5e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/e2e/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ export const disableDynamicParameters = async (
12491249
await saveButton.click();
12501250

12511251
// Wait for the success message with a more robust selector
1252-
await page.waitForSelector("[role='alert'], .MuiAlert-root, text=Template updated successfully", {
1252+
await page.locator("[role='alert']:has-text('Template updated successfully'), .MuiAlert-root:has-text('Template updated successfully')").first().waitFor({
12531253
state: "visible",
12541254
timeout: 15000,
12551255
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy