Files
community-rule/tests/components/SkipToContent.test.tsx
T
adilalloandCursor 5242f8c6bb Give the shell one header, a skip link, and a cookie-aware first paint.
Breakpoint clones were still in the tab order, marketing always painted Log in, and at 430px the logo overlay covered Use cases and Learn.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 17:12:59 -06:00

15 lines
603 B
TypeScript

import "@testing-library/jest-dom/vitest";
import { describe, expect, it } from "vitest";
import SkipToContent from "../../app/components/navigation/SkipToContent";
import { MAIN_CONTENT_ID } from "../../lib/mainContent";
import { renderWithProviders as render, screen } from "../utils/test-utils";
describe("SkipToContent", () => {
it("targets the main landmark", () => {
render(<SkipToContent />);
const link = screen.getByRole("link", { name: "Skip to content" });
expect(link).toHaveAttribute("href", `#${MAIN_CONTENT_ID}`);
expect(link).toHaveClass("skip-to-content");
});
});