Skip to content

Commit 84c9ded

Browse files
author
Test User
committed
fix(e2e): use .first() with .or() to avoid strict mode violation
The .or() locator resolves to multiple elements when both review-summary AND review-findings-list are visible, causing a strict mode violation. Adding .first() ensures only one element is matched.
1 parent ff1c08b commit 84c9ded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/e2e/test_task_execution_flow.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ test.describe('Task Execution Flow', () => {
135135
const reviewFindingsList = page.locator('[data-testid="review-findings-list"]');
136136

137137
// Either summary or findings list MUST be visible (depending on data state)
138-
// Use Playwright's or() for proper assertion that fails if neither is visible
139-
await expect(reviewSummary.or(reviewFindingsList)).toBeVisible({ timeout: 10000 });
138+
// Use .first() with .or() to avoid strict mode violation when both exist
139+
await expect(reviewSummary.or(reviewFindingsList).first()).toBeVisible({ timeout: 10000 });
140140
console.log('✅ Review panel displays summary or findings list correctly');
141141
});
142142

0 commit comments

Comments
 (0)