We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfb7999 commit f117684Copy full SHA for f117684
tests/page/page-check.spec.ts
@@ -18,10 +18,9 @@
18
import { test as it, expect } from './pageTest';
19
20
it('should check the box @smoke', async ({ page }) => {
21
- await page.setContent(`<div class='middle selected row' id='component'></div>`);
22
- const locator = page.locator('#component');
23
- await expect(locator).toHaveClass(/(^|\s)selected(\s|$)/);
24
- await expect(locator).toHaveClass('middle selected row');
+ await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
+ await page.check('input');
+ expect(await page.evaluate(() => window['checkbox'].checked)).toBe(true);
25
});
26
27
it('should not check the checked box', async ({ page }) => {
0 commit comments