fix(cases): um só convite ao WhatsApp no fim do case e testes alinhados
This commit is contained in:
1 parent
2fd8b063d9
commit
d356c364e0
7 files changed
+124
-197
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user