Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(ui): add test expectation that doesn't immediately pass on blank tree (#31850)

Simon Knotta1a4216b88f2
diff --git a/tests/playwright-test/ui-mode-test-filters.spec.ts b/tests/playwright-test/ui-mode-test-filters.spec.ts
index 3f65c65a0e..5d70048473 100644
--- a/tests/playwright-test/ui-mode-test-filters.spec.ts
+++ b/tests/playwright-test/ui-mode-test-filters.spec.ts
@@ -234,6 +234,7 @@ test('should only show tests selected with --grep', async ({ runUITest }) => {
const { page } = await runUITest(basicTestTree, undefined, {
additionalArgs: ['--grep', 'fails'],
});
+ await expect.poll(dumpTestTree(page)).toContain('fails');
await expect.poll(dumpTestTree(page)).not.toContain('passes');
});