import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { ConstellationImageGenerator } from "@/components/admin/constellation-image-generator";
import { TeamImageGenerator } from "@/components/admin/team-image-generator";
import { WeaponImageGenerator } from "@/components/admin/weapon-image-generator";
describe("admin image generator empty states", () => {
it("starts Team with a create action instead of an empty form", () => {
const html = renderToStaticMarkup(
,
);
expect(html).toContain("ยังไม่มี Team");
expect(html).toContain("เพิ่ม Team");
expect(html).not.toContain("team-image-title");
});
it("starts Weapon with a create action instead of an empty row", () => {
const html = renderToStaticMarkup(
,
);
expect(html).toContain("ยังไม่มีรายการอาวุธ");
expect(html).toContain("เพิ่มรายการอาวุธ");
expect(html).not.toContain("weapon-image-condition");
});
it("starts Constellation with one action that creates C1–C6", () => {
const html = renderToStaticMarkup(
,
);
expect(html).toContain("ยังไม่มี Constellation");
expect(html).toContain("สร้าง Constellation");
expect(html).not.toContain("constellation-image-c1");
});
});