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
+17 -1
View File
@@ -1,4 +1,5 @@
import { describe } from "vitest";
import { describe, expect, it } from "vitest";
import { render, screen } from "@testing-library/react";
import {
componentTestSuite,
type ComponentTestSuiteConfig,
@@ -34,4 +35,19 @@ const config: ComponentTestSuiteConfig<Props> = {
describe("CommunityRule", () => {
componentTestSuite<Props>(config);
it("uses cardAccentColor for the card left border when useCardStyle is true", () => {
const { container } = render(
<CommunityRule
sections={sampleSections}
useCardStyle
cardAccentColor="var(--color-surface-invert-brand-lavender)"
/>,
);
const root = container.firstElementChild as HTMLElement;
expect(root.style.boxShadow).toBe(
"inset 4px 0 0 0 var(--color-surface-invert-brand-lavender)",
);
expect(screen.getByText("How proposals pass")).toBeInTheDocument();
});
});