Files
stack/apps/web/src/components/auth/AuthDivider.test.tsx
Jason Woltje 1b66417be5
All checks were successful
ci/woodpecker/push/orchestrator Pipeline was successful
ci/woodpecker/push/api Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
fix(web): restore login page design and add runtime config injection (#435)
Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
2026-02-21 23:16:02 +00:00

28 lines
977 B
TypeScript

import { describe, it, expect } from "vitest";
import { render, screen } from "@testing-library/react";
import { AuthDivider } from "./AuthDivider";
describe("AuthDivider", (): void => {
it("should render with default text", (): void => {
render(<AuthDivider />);
expect(screen.getByText("or continue with")).toBeInTheDocument();
});
it("should render with custom text", (): void => {
render(<AuthDivider text="or sign up" />);
expect(screen.getByText("or sign up")).toBeInTheDocument();
});
it("should render horizontal divider lines", (): void => {
const { container } = render(<AuthDivider />);
const lines = container.querySelectorAll("[aria-hidden='true'].h-px");
expect(lines.length).toBe(2);
});
it("should apply uppercase styling to text", (): void => {
const { container } = render(<AuthDivider />);
const textWrapper = container.querySelector(".uppercase");
expect(textWrapper).toBeInTheDocument();
});
});