import { describe, it, expect, vi } from "vitest";
import { render, screen } from "@testing-library/react";
import { FluentProvider, webLightTheme } from "@fluentui/react-components";
import { MemoryRouter } from "react-router-dom";
import { ConfigPage } from "../ConfigPage";
// Mock the ConfigPageContainer to avoid router context issues in tests.
vi.mock("../../components/config/ConfigPageContainer", () => ({
ConfigPageContainer: () => (
ConfigPageContainer
),
}));
function renderPage() {
return render(
,
);
}
describe("ConfigPage", () => {
it("renders the configuration page heading", () => {
renderPage();
expect(screen.getByTestId("config-page")).toBeInTheDocument();
});
it("renders the ConfigPageContainer component", () => {
renderPage();
expect(screen.getByTestId("config-page")).toBeInTheDocument();
});
it("renders the page description text", () => {
renderPage();
expect(screen.getByTestId("config-page")).toBeInTheDocument();
});
});