import { describe, it, expect } from "vitest";
import { renderToStaticMarkup } from "react-dom/server";
import { CycleRing } from "../cycle-ring";
import { I18nProvider } from "@/lib/i18n/context";
function render(node: React.ReactNode, locale: "en" | "de" = "en") {
return renderToStaticMarkup(
{node},
);
}
describe("", () => {
it("renders the root data-slot tagged with the active phase", () => {
const html = render(
,
);
expect(html).toContain('data-slot="cycle-ring"');
expect(html).toContain('data-phase="FOLLICULAR"');
});
it("shows the day-of-cycle number as centred text", () => {
const html = render(
,
);
expect(html).toContain(">12<");
});
it("carries a phase-aware aria-label (never colour-only)", () => {
const html = render(
,
);
expect(html).toContain('role="img"');
expect(html).toContain("aria-label");
// The label restates the day + phase.
expect(html).toContain("3");
});
it("parks the day-1 marker at the 12-o'clock origin (no double-rotate)", () => {
// The