Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(playwright): fix todo list render spec locators and polling

Steven Enamakeld98aba3bca73
diff --git a/app/test/playwright/specs/chat-todo-list-render.spec.ts b/app/test/playwright/specs/chat-todo-list-render.spec.ts
index 5e51ef2190..4ca682b82b 100644
--- a/app/test/playwright/specs/chat-todo-list-render.spec.ts
+++ b/app/test/playwright/specs/chat-todo-list-render.spec.ts
@@ -104,8 +104,6 @@ const allTodoSurfaces = (page: Page): Locator =>
page.locator('[data-testid="todo-checklist"], [data-testid="todo-receipt"]');
/** The pinned, always-current list above the composer. */
-const pinnedList = (page: Page): Locator => page.getByTestId('todo-checklist');
-
/**
* The per-tool-call snapshots in the transcript. The pinned render is the only
* one given a test id (`Conversations.tsx:1659`), so excluding it leaves
@@ -226,10 +224,12 @@ test.describe('Todo list render', () => {
await expandSnapshotReceipts(page);
await expect(snapshotReceipts(page)).toHaveCount(1);
await expect
- .poll(async () => itemStates(snapshotLists(page).first()), { timeout: 30_000 })
+ .poll(async () => itemStates(snapshotReceipts(page).first()), { timeout: 30_000 })
.toEqual(['active', 'pending', 'pending']);
- expect(await upstreamBodies()).toHaveLengthGreaterThan(firstWriteRequestCount + 1);
+ await expect
+ .poll(async () => (await upstreamBodies()).length, { timeout: 60_000 })
+ .toBeGreaterThan(firstWriteRequestCount + 1);
const secondWriteRequestCount = (await upstreamBodies()).length;
await sendTurn(page, threadId, 'TODOADVANCE keep going');