TypeScript
fix(chat): align failed task progress test (#9172)
maria8339508f5c24
diff --git a/apps/web/src/components/chat/MessagesTimeline.logic.test.ts b/apps/web/src/components/chat/MessagesTimeline.logic.test.tsindex de663209304..9baaa14395d 100644--- a/apps/web/src/components/chat/MessagesTimeline.logic.test.ts+++ b/apps/web/src/components/chat/MessagesTimeline.logic.test.ts@@ -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 });+ }},);