test(chat): retain completion identity before link metadata loads

Match the specific task href within the completion message while retaining link semantics. Both hydrated issue chips and links awaiting their title now satisfy the same target identity assertion; other tasks cannot match.

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