mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-29 12:59:13 +01:00
fix(e2e): allow blocker attention in accessible status labels
Use the captured live status button label shape while preserving exact persisted-state assertions. Both captured Blocked labels and wrong-status controls pass headless Chrome calibration. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
7b68329d2a
commit
3ec4b02f64
1 file changed
+5
-3
@@ -2349,11 +2349,13 @@ for (const execution of executions) {
|
||||
// The fixture owns the expected disposition; blocked workflows must prove
|
||||
// their Blocked UI rather than inheriting the completion-only Done check.
|
||||
const expectedStatus = execution.task.expectedTerminalState.issue;
|
||||
const expectedStatusLabel = expectedStatus.replace(/_/g, " ").replace(/^./, (letter) => letter.toUpperCase());
|
||||
const expectedStatusLabel = expectedStatus.replace(/_/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
||||
await expect(
|
||||
page.getByTestId("issue-detail-header").getByRole("button", {
|
||||
name: `Change status (current: ${expectedStatusLabel})`,
|
||||
exact: true,
|
||||
// Blocked includes the live blocker-attention explanation in its
|
||||
// accessible name. The exact persisted status is asserted separately.
|
||||
name: `Change status (current: ${expectedStatusLabel}${expectedStatus === "blocked" ? "" : ")"}`,
|
||||
exact: expectedStatus !== "blocked",
|
||||
}),
|
||||
).toBeVisible({ timeout: 30_000 });
|
||||
if (execution.task.flow === "warm_three_turn") {
|
||||
|
||||
Reference in new issue
Block a user