import { createElement } from "react";
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import {
GuideImageExport,
imageExportFileName,
} from "@/components/public/guide-image-export";
import { MaterialPoster } from "@/components/public/material-poster";
import { ConstellationImage } from "@/components/public/constellation-image";
import { WeaponComparisonImage } from "@/components/public/weapon-image-export";
import type { PublicGuide } from "@/lib/guides/queries";
describe("image export controls", () => {
it("omits the placeholder condition from weapon export images", () => {
const guide = {
character: { name: "Raiden", splashImageUrl: "/splash.png" },
coverUrl: "/cover.png",
} as PublicGuide;
const group = { rows: [], name: null, note: null } as unknown as PublicGuide["weaponGroups"][number];
const html = renderToStaticMarkup(
,
);
expect(html).not.toContain("Condition 1");
expect(html).not.toContain("เงื่อนไข 1");
});
it("shows one export trigger and keeps settings in its dialog", () => {
const html = renderToStaticMarkup(No notes);
expect(html).toContain("ส่งออกภาพ");
expect(html.match(/