import { renderToStaticMarkup } from "react-dom/server"; import { describe, expect, it } from "vitest"; import { OperationProgress } from "./operation-progress"; import { OperationResult } from "./operation-result"; describe("Studio operation components", () => { it("renders determinate progress with an accessible label", () => { const markup = renderToStaticMarkup( , ); expect(markup).toContain('role="progressbar"'); expect(markup).toContain('aria-valuenow="2"'); expect(markup).toContain("2 / 4"); }); it("distinguishes partial and failed terminal results", () => { const partial = renderToStaticMarkup( , ); expect(partial).toContain('data-operation-result="partial"'); expect(partial).toContain("corr-1"); }); });