feat(cases): prova certa por serviço, páginas internas com trabalho no topo
Diagnóstico sem case que não cabe; desktop com o GCC Installer como projeto próprio; IoT com o Twins Lab e a nota da Apolo. Mosaico de pôsteres em /servicos e /cases, faixa baixa em uma coluna no currículo, privacidade e laboratório; Laboratório como lista compacta; SEV começando por catálogo, pedido no WhatsApp e painel; Joinville e SC nos títulos; imagens do LCP com fetchPriority e sizes reais; pré-carregamento só no hover; 404 com Open Graph próprio.
This commit is contained in:
1 parent
7b633f0f4a
commit
de6af74a0c
37 files changed
+1062
-254
No files matched your search
@@ -63,3 +63,53 @@ describe("CasesPage: cases de cliente", () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("CasesPage: topo com mosaico de pôsteres", () => {
|
||||
it("path: captures found -> two columns with three posters of the other clients, not the first card's", () => {
|
||||
const { container } = render(<CasesPage />);
|
||||
|
||||
const hero = container.querySelector("section");
|
||||
expect(hero?.querySelector(".ds-section-shell")).toHaveClass("grid");
|
||||
expect(hero?.className).not.toContain("md:!pb-sp-12");
|
||||
const posters = Array.from(hero?.querySelectorAll("img") ?? []).map(
|
||||
(image) => decodeURIComponent(image.getAttribute("src") ?? ""),
|
||||
);
|
||||
expect(posters).toHaveLength(3);
|
||||
expect(posters.join(" ")).not.toContain(clientCases[0].id);
|
||||
for (const [index, { id }] of clientCases.slice(1).entries()) {
|
||||
expect(posters[index]).toContain(`/videos/${id}/desktop.webp`);
|
||||
}
|
||||
});
|
||||
|
||||
it("path: no capture for the other clients -> no mosaic, a lower one-column strip, and the first card cover takes the priority", () => {
|
||||
mockedGetCaseMedia.mockImplementation((id, device) =>
|
||||
id === clientCases[0].id ? actualGetCaseMedia(id, device) : undefined,
|
||||
);
|
||||
|
||||
const { container } = render(<CasesPage />);
|
||||
|
||||
const hero = container.querySelector("section");
|
||||
expect(hero?.querySelector("img")).toBeNull();
|
||||
expect(hero?.querySelector(".ds-section-shell")).not.toHaveClass("grid");
|
||||
expect(hero?.className).toContain("md:!pb-sp-12");
|
||||
const firstCover = clientCard(container, clientCases[0].id).querySelector(
|
||||
".ds-bframe img",
|
||||
);
|
||||
expect(firstCover).toHaveAttribute("loading", "eager");
|
||||
expect(firstCover).toHaveAttribute("fetchpriority", "high");
|
||||
});
|
||||
});
|
||||
|
||||
describe("CasesPage: prioridade da capa do primeiro cartão", () => {
|
||||
it("path: mosaic at the top -> the first card cover stays lazy, the priority is the mosaic's first poster", () => {
|
||||
const { container } = render(<CasesPage />);
|
||||
|
||||
const hero = container.querySelector("section");
|
||||
expect(hero?.querySelector("img")).toHaveAttribute("loading", "eager");
|
||||
for (const { id } of clientCases) {
|
||||
const cover = clientCard(container, id).querySelector(".ds-bframe img");
|
||||
expect(cover).toHaveAttribute("loading", "lazy");
|
||||
expect(cover).not.toHaveAttribute("fetchpriority");
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user