Skip to content

Commit b41c1e8

Browse files
committed
test(qwik-e2e): assert non-asserting e2e checks
Replace an always-true toBeDefined on a getAttribute result and a bare isVisible call with web-first assertions so the checks can actually fail. Re-targets #8727 onto build/v2 at wmertens' request.
1 parent c242a01 commit b41c1e8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

e2e/qwik-e2e/tests/sync-qrl.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ test.describe('resuming', () => {
2424
// clicking checkbox does not toggles the checked state, because default is prevented.
2525
await input.click();
2626
await expect(input).toBeChecked();
27-
await expect(await input.getAttribute('prevented')).toBeDefined();
27+
await expect(input).toHaveAttribute('prevented', 'true');
2828
});
2929
});

e2e/qwik-e2e/tests/use-id.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.describe('use-id', () => {
1515

1616
test('Creates unique ids and ensure no collisions', async ({ page }) => {
1717
const totalIdsLocator = page.locator('#totalIds');
18-
await totalIdsLocator.isVisible();
18+
await expect(totalIdsLocator).toBeVisible();
1919
const totalIdsText = await totalIdsLocator.textContent();
2020
const totalIds = parseInt(totalIdsText || '-1');
2121
await expect(totalIds).toBeGreaterThan(0); // MAKE SURE WE HAVE SOME IDS

0 commit comments

Comments
 (0)