mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-01 15:35:12 +01:00
test(chat): scope completion assertions to the delegated task link
Assert the completion prefix and visible expected task link in the same message, including its exact destination, without relying on flat text across a status glyph. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
91368f4c87
commit
fa36e7cd35
1 file changed
+14
-1
@@ -467,7 +467,20 @@ 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.getByRole("region", { name: "Conversation messages" })
|
||||
.locator("p")
|
||||
.filter({ hasText: /^Delegated work completed:/ });
|
||||
await expect(completion).toHaveCount(1);
|
||||
const completedTask = completion.getByRole("link", {
|
||||
name: `Issue ${task.identifier}: ${task.title}`,
|
||||
exact: true,
|
||||
});
|
||||
await expect(completedTask).toBeVisible();
|
||||
await expect(completedTask).toContainText(task.identifier);
|
||||
await expect(completedTask).toHaveAttribute(
|
||||
"href",
|
||||
`/${f.company.issuePrefix}/issues/${task.identifier}`,
|
||||
);
|
||||
const plan = await json(
|
||||
await request.get(`/api/issues/${task.id}/documents/plan`),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user