diff --git a/src/components/item-history-popover.test.tsx b/src/components/item-history-popover.test.tsx index dc77679..224cfd7 100644 --- a/src/components/item-history-popover.test.tsx +++ b/src/components/item-history-popover.test.tsx @@ -49,8 +49,10 @@ describe("ItemHistoryPopover", () => { ); expect(screen.getByText(/PB-derived/)).toBeInTheDocument(); expect(screen.getByText(/AI snapshot/)).toBeInTheDocument(); - expect(screen.getAllByText(/Fastener Co/).length).toBeGreaterThan(0); - expect(screen.getAllByText(/Phone Fastener Co/).length).toBeGreaterThan(0); + // Deterministic card shows "Fastener Co" twice (cheapest + suppliers list). + expect(screen.getAllByText(/Fastener Co/).length).toBeGreaterThanOrEqual(2); + // AI summary mentions Fastener Co (also rendered again in the raw JSON dump). + expect(screen.getAllByText(/Phone Fastener Co/).length).toBeGreaterThanOrEqual(1); }); it("renders only the deterministic card when AI is null", () => {