chore(item-history): pin Fastener Co duplicate rendering in popover tests

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
SJCoetz 2026-07-29 15:09:06 +02:00
parent bce66b135a
commit 7bc7208f8a

View file

@ -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", () => {