Completed template

This commit is contained in:
adilallo
2026-03-02 22:12:50 -07:00
parent d811b87b12
commit 3e3d2881f5
103 changed files with 1410 additions and 622 deletions
+12 -3
View File
@@ -1,7 +1,7 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import { describe, it, expect } from "vitest";
import Logo from "../../app/components/icons/Logo";
import Logo from "../../app/components/asset/logo";
import {
componentTestSuite,
ComponentTestSuiteConfig,
@@ -45,13 +45,22 @@ describe("Logo (behavioral tests)", () => {
expect(screen.getByText("CommunityRule")).toBeInTheDocument();
});
it("hides text when showText is false", () => {
const { container } = render(<Logo showText={false} />);
it("hides wordmark when wordmark is false", () => {
const { container } = render(<Logo wordmark={false} />);
const textElement = container.querySelector(".hidden");
expect(textElement).toBeInTheDocument();
expect(screen.getByAltText("CommunityRule Logo Icon")).toBeInTheDocument();
});
it("applies inverse palette styling when palette is inverse", () => {
render(<Logo palette="inverse" />);
const link = screen.getByRole("link");
const textEl = link.querySelector(".font-bricolage-grotesque");
const img = link.querySelector("img");
expect(textEl).toHaveClass("text-[var(--color-content-invert-primary)]");
expect(img).toHaveClass("brightness-0");
});
it("renders with different size variants", () => {
const { rerender } = render(<Logo size="default" />);
expect(screen.getByRole("link")).toBeInTheDocument();