feat(FN-4242): add CSS regression test for WorkflowResultsTab

Adds a CSS regression test for the WorkflowResultsTab component, covering layout and styling assertions in the dashboard test suite.

Fusion-Task-Id: FN-4242
This commit is contained in:
Fusion
2026-05-13 06:34:04 -07:00
committed by gsxdsm
parent d42ddf77bc
commit e4cb325206

View File

@@ -0,0 +1,19 @@
import { describe, expect, it } from "vitest";
import { loadAllAppCss, loadAllAppCssBaseOnly } from "../../test/cssFixture";
describe("WorkflowResultsTab CSS contract", () => {
it("FN-4242 tokenizes phase badge font size and preserves output-header wrap behavior", async () => {
const baseCss = await loadAllAppCssBaseOnly();
const allCss = await loadAllAppCss();
const phaseBadgeRule = baseCss.match(/\.phase-badge\s*\{[^}]*\}/)?.[0] ?? "";
expect(phaseBadgeRule).toContain("font-size");
expect(phaseBadgeRule).not.toMatch(/font-size\s*:\s*\d+px\s*;/);
expect(phaseBadgeRule).toMatch(/font-size\s*:\s*[^;]*var\(--space-/);
expect(baseCss).toMatch(/\.workflow-result-output-header\s*\{[^}]*flex-wrap\s*:\s*wrap\s*;/);
expect(allCss).toContain("@media (max-width: 768px)");
expect(allCss).toMatch(/\.workflow-result-output-header\s*\{[^}]*align-items\s*:\s*flex-start\s*;/);
});
});