import { createElement } from "react"; import { renderToStaticMarkup } from "react-dom/server"; import { describe, expect, it } from "vitest"; import { BossCardCollection } from "./BossCardCollection"; import { BOSS_CARD_CATALOG } from "../game/bossCardCatalog"; describe("boss card display", () => { it("shows per-rarity copy totals and every dungeon for the visible boss", () => { const boss = BOSS_CARD_CATALOG[0]; const markup = renderToStaticMarkup(createElement(BossCardCollection, { onClose: () => {}, collection: { counts: { [boss.key]: { normal: 7, rare: 1 } }, lastClaims: {} }, })); expect(markup).toContain("7 copies"); expect(markup).toContain("1 copy"); expect(markup).toContain("8 total copies"); expect(markup).toContain("Account-wide collection log"); expect(markup).toContain("Group by dungeon"); expect(markup).toContain("Group by rarity"); for (const dungeon of boss.dungeons) expect(markup).toContain(dungeon.title); }); });