Debian Codegraph @

install/freeipa-webui/src/components/layouts/TitleLayout/TitleLayout.test.tsx

raw
1 import React from "react";
2 import { render, screen } from "@testing-library/react";
3 import { expect, test } from "vitest";
4 // Component
5 import TitleLayout from "./TitleLayout";
6
7 test("should display the TitleLayout with required props", () => {
8 render(<TitleLayout headingLevel="h1" id="test-title" text="Test Title" />);
9 expect(screen.getByText("Test Title")).toBeInTheDocument();
10 expect(screen.getByRole("heading", { level: 1 })).toBeInTheDocument();
11 });