Home mais curta (hero, vitrine de clientes, sobre, serviços, IA resumida, depoimentos e contato), faixa de clientes e telas reais no hero, sem números do GitHub. Barra de cookies fina, WhatsApp fixo no celular, formulário com e-mail opcional e alternativa por e-mail, página /ia, eventos de e-mail, redes e currículo e conversão do Ads opcional por variável. Rodapé em 3 colunas. Remove componentes órfãos (LighthouseMetrics, Skills, Experience, contagem do GitHub).
49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
import { render, screen } from "@testing-library/react";
|
|
import type { Testimonial } from "@/lib/proof";
|
|
import { testimonials } from "@/lib/proof";
|
|
import Testimonials from "./Testimonials";
|
|
|
|
const item: Testimonial = {
|
|
quote: "Entregou no prazo combinado.",
|
|
name: "Maria Souza",
|
|
role: "Sócia",
|
|
company: "Empresa de Teste",
|
|
projectId: "lavacao-047",
|
|
};
|
|
|
|
it("renders nothing without testimonials", () => {
|
|
const { container } = render(<Testimonials items={[]} />);
|
|
expect(container).toBeEmptyDOMElement();
|
|
|
|
const withoutProp = render(<Testimonials />);
|
|
expect(withoutProp.container).toBeEmptyDOMElement();
|
|
});
|
|
|
|
it("ships with no testimonial until a real, authorized one is added", () => {
|
|
expect(testimonials).toEqual([]);
|
|
});
|
|
|
|
it("shows the quote, who said it and a link to the case", () => {
|
|
render(<Testimonials items={[item]} />);
|
|
|
|
expect(
|
|
screen.getByRole("heading", { name: "O que dizem os clientes." }),
|
|
).toBeInTheDocument();
|
|
expect(
|
|
screen.getByText("“Entregou no prazo combinado.”"),
|
|
).toBeInTheDocument();
|
|
expect(screen.getByText("Maria Souza")).toBeInTheDocument();
|
|
expect(screen.getByText("Sócia, Empresa de Teste")).toBeInTheDocument();
|
|
expect(screen.getByRole("link", { name: "Ver o case" })).toHaveAttribute(
|
|
"href",
|
|
"/cases/lavacao-047",
|
|
);
|
|
});
|
|
|
|
it("falls back to initials without a photo and has no case link without a project", () => {
|
|
render(<Testimonials items={[{ ...item, projectId: undefined }]} />);
|
|
|
|
expect(screen.getByText("MS")).toBeInTheDocument();
|
|
expect(screen.queryByRole("link", { name: "Ver o case" })).toBeNull();
|
|
});
|