fix(cases): um só convite ao WhatsApp no fim do case e testes alinhados

This commit is contained in:
Evandro Fonseca Junior committed 2026-10-14 22:54:19 -03:00
1 parent 2fd8b063d9
commit d356c364e0
7 files changed
+124 -197

No files matched your search

+4 -5
View File
@@ -1,4 +1,5 @@
import { render, screen } from "@testing-library/react";
import { setNavigation } from "@/__mocks__/next/navigation";
import { caseStudies } from "@/lib/site-content";
import CasePage from "./page";
@@ -7,11 +8,9 @@ import CasePage from "./page";
* O teste principal cobre a lista ausente (`undefined`) e a lista preenchida; aqui, a lista vazia (`[]`).
*/
// usePathname: o HoverPrefetchLink (trilha, cartões) lê o caminho para saber se está na home
jest.mock("next/navigation", () => ({
notFound: jest.fn(),
usePathname: () => "/cases",
}));
beforeEach(() => {
setNavigation({ pathname: "/cases" });
});
function getCase(id: string) {
const caseStudy = caseStudies.find((item) => item.id === id);