Skip to content

Commit 0898572

Browse files
wesmclaude
andcommitted
fix: address E2E virtual-list review findings
- Restore 10s visibility timeout for CI headroom - Derive session count regex from DEEP_SESSIONS constant Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 541666a commit 0898572

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

frontend/e2e/virtual-list.spec.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ const DEEP_SESSIONS = 2000;
1414
const MIDDLE_INDEX = Math.floor(DEEP_SESSIONS / 2);
1515
const LAST_INDEX = DEEP_SESSIONS - 1;
1616

17+
/** Regex matching the formatted session count in the list header. */
18+
const DEEP_COUNT_RE = new RegExp(
19+
`${DEEP_SESSIONS.toLocaleString()} sessions`,
20+
);
21+
1722
const sessions = createMockSessions(
1823
TOTAL_SESSIONS,
1924
"session",
@@ -93,7 +98,7 @@ test.describe("Virtual list behavior", () => {
9398
// sessions.length, so scrolling before loading completes
9499
// would land at the wrong position.
95100
await expect(sp.sessionListHeader).toContainText(
96-
/2.?000 sessions/,
101+
DEEP_COUNT_RE,
97102
{ timeout: 15_000 },
98103
);
99104

@@ -106,14 +111,14 @@ test.describe("Virtual list behavior", () => {
106111
"i",
107112
),
108113
}),
109-
).toBeVisible({ timeout: 5_000 });
114+
).toBeVisible({ timeout: 10_000 });
110115
});
111116

112117
test("scrolls to the end of a large list", async () => {
113118
await sp.filterByProject("deep");
114119

115120
await expect(sp.sessionListHeader).toContainText(
116-
/2.?000 sessions/,
121+
DEEP_COUNT_RE,
117122
{ timeout: 15_000 },
118123
);
119124

@@ -126,6 +131,6 @@ test.describe("Virtual list behavior", () => {
126131
"i",
127132
),
128133
}),
129-
).toBeVisible({ timeout: 5_000 });
134+
).toBeVisible({ timeout: 10_000 });
130135
});
131136
});

0 commit comments

Comments
 (0)