Refine use cases rule examples

This commit is contained in:
adilallo
2026-05-19 22:16:08 -06:00
parent 7c46cbd87b
commit 2f2b5d0dc2
65 changed files with 3129 additions and 252 deletions
+21
View File
@@ -1,4 +1,6 @@
import React from "react";
import { describe, it, expect } from "vitest";
import { render, screen } from "@testing-library/react";
import SectionHeader from "../../app/components/type/SectionHeader";
import { componentTestSuite } from "../utils/componentTestSuite";
@@ -21,3 +23,22 @@ componentTestSuite<SectionHeaderProps>({
errorState: false,
},
});
describe("SectionHeader twoColumnsFromMd", () => {
it("splits rule stack header at md when twoColumnsFromMd is set", () => {
const { container } = render(
<SectionHeader
title="Popular templates"
subtitle="Start from a proven pattern."
variant="multi-line"
ruleStackDesktopTypeScale
twoColumnsFromMd
/>,
);
expect(
screen.getByRole("heading", { name: /popular templates/i }),
).toBeInTheDocument();
expect(container.firstElementChild).toHaveClass("md:flex-row");
});
});