Skip to content

Commit a8557ca

Browse files
authored
Enhance Playwright test for button and checkbox q
Add checks for button visibility and checkbox state in Playwright tests.
1 parent 014f645 commit a8557ca

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

pages/playwright/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ <h2>Usefull snippets</h2>
5454
const backgroundColor = await button.evaluate((el) => {
5555
return window.getComputedStyle(el).getPropertyValue("background-color");
5656
});
57+
58+
// select in Web Component
59+
const section = await page.locator("center-and-height-resizer").locator(".buttons-container");
60+
61+
// exist or not exist
62+
{
63+
await expect(section.locator(".clear-btn")).toBeVisible();
64+
await expect(section.locator(".loader")).not.toBeVisible();
65+
}
66+
67+
// checkbox
68+
await page.locator("#loading-sel-1").check();
69+
await page.locator("#loading-sel-1").uncheck();
5770

5871
</script>
5972

0 commit comments

Comments
 (0)