test(chat): locate completion through its rendered task link

The delegated completion paragraph includes a task link whose SVG status title contributes to Playwright text matching. Assert the completion prefix and exact accessible task identity together without assuming flat text. Keep the existing visibility deadline and delivery/document assertions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-31 09:12:31 -05:00
1 parent 939b90abe3
commit d7d80782df
1 file changed
+4 -1
+4 -1
View File
@@ -467,7 +467,10 @@ test("plan approval hands the preserved revision to an assigned project task", a
expect(task.parentId).toBeNull();
expect(task.projectId).toBeTruthy();
expect(task.assigneeAgentId).toBe(f.agent.id);
await expect(page.getByText(`Delegated work completed: ${task.identifier}`, { exact: true })).toBeVisible();
const completion = page.getByText("Delegated work completed:", { exact: false });
await expect(completion.getByRole("link", {
name: `Issue ${task.identifier}: ${task.title}`, exact: true,
})).toBeVisible();
const plan = await json(
await request.get(`/api/issues/${task.id}/documents/plan`),
);