import { render, screen } from "@testing-library/react";
import type { ReactNode } from "react";
import EngineeringWithAI from "./EngineeringWithAI";
jest.mock("./Section", () => ({
Section: ({
children,
title,
description,
}: {
children: ReactNode;
title: string;
description?: string;
}) => (
{title}
{description}
{children}
),
}));
it("is the short home version and points to /ia for the full content", () => {
render();
expect(
screen.getByRole("heading", {
name: "Já começou com IA? Dá para partir daí.",
}),
).toBeInTheDocument();
expect(
screen.getByRole("link", { name: "Entender como funciona" }),
).toHaveAttribute("href", "/ia");
// os incidentes e a LGPD ficam só em /ia
expect(screen.queryByText(/Lovable|Replit|Base44|LGPD/)).toBeNull();
});