fix(chat): align failed task progress test (#9172)
Co-authored-by: maria-rcks <[email protected]>
This commit is contained in:
1 parent
c15735dd88
commit
8339508f5c
1 file changed
+8
-2
@@ -1370,7 +1370,7 @@ describe("deriveMessagesTimelineRows", () => {
|
||||
[undefined, true],
|
||||
["inProgress", true],
|
||||
["completed", false],
|
||||
["failed", false],
|
||||
["failed", null],
|
||||
["declined", false],
|
||||
["stopped", false],
|
||||
] as const)(
|
||||
@@ -1406,7 +1406,13 @@ describe("deriveMessagesTimelineRows", () => {
|
||||
revertTurnCountByUserMessageId: new Map(),
|
||||
});
|
||||
|
||||
expect(rows.find((row) => row.kind === "work-live")).toMatchObject({ active });
|
||||
const workLiveRow = rows.find((row) => row.kind === "work-live");
|
||||
if (active === null) {
|
||||
expect(workLiveRow).toBeUndefined();
|
||||
expect(rows.at(-1)).toMatchObject({ kind: "thinking", id: "live-activity-row" });
|
||||
} else {
|
||||
expect(workLiveRow).toMatchObject({ active });
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user