Skip to content

Commit a481088

Browse files
committed
fix(tests): ensure visibility checks for approval and rejection use first match
1 parent 5feb938 commit a481088

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/frontend/e2e/workflow.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ test.describe('Workflow — send to approval', () => {
144144
}
145145

146146
await expect(
147-
page.getByText(/ready.for.approval/i),
147+
page.getByText(/ready.for.approval/i).first(),
148148
).toBeVisible({ timeout: 10_000 });
149149
});
150150
});
@@ -186,7 +186,7 @@ test.describe('Workflow — approve', () => {
186186
await expect(confirmBtn).toBeVisible();
187187
await confirmBtn.click();
188188

189-
await expect(page.getByText(/approved/i)).toBeVisible({ timeout: 10_000 });
189+
await expect(page.getByText(/approved/i).first()).toBeVisible({ timeout: 10_000 });
190190
});
191191
});
192192

@@ -227,6 +227,6 @@ test.describe('Workflow — reject', () => {
227227

228228
await page.getByRole('button', { name: /confirm|reject/i }).last().click();
229229

230-
await expect(page.getByText(/rejected/i)).toBeVisible({ timeout: 10_000 });
230+
await expect(page.getByText(/rejected/i).first()).toBeVisible({ timeout: 10_000 });
231231
});
232232
});

0 commit comments

Comments
 (0)