feat(cases): mídia no topo, títulos de busca curtos e CreativeWork
Case com mídia ao lado do título e play acessível; problema de cada cliente reescrito com base nos dados; serviços relacionados em 2 cards; FAQ antes do próximo passo e bloco 'Onde já apliquei isso'; Apolo citada em IoT e arquitetura. metaTitle até 43 caracteres e descrições até 155 com teste; JSON-LD CreativeWork; imagens de compartilhamento abaixo de 100 KB; 404 e robots corrigidos; server-only nos módulos com node:.
This commit is contained in:
1 parent
c9a0b80656
commit
e80f73d075
52 files changed
+2593
-439
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import NotFound, { metadata } from "./not-found";
|
||||
|
||||
describe("not-found", () => {
|
||||
it("has no canonical (the home one does not apply to a 404) and no generic robots tag of its own", () => {
|
||||
// o Next já escreve <meta name="robots" content="noindex"> no 404: repeti-lo duplicaria a tag
|
||||
expect(metadata.alternates).toEqual({ canonical: null });
|
||||
expect(metadata.robots).not.toHaveProperty("index");
|
||||
expect(metadata.robots).not.toHaveProperty("follow");
|
||||
});
|
||||
|
||||
it("keeps Googlebot out, since the root layout lets it index", () => {
|
||||
expect(metadata.robots).toEqual({
|
||||
googleBot: { index: false, follow: false },
|
||||
});
|
||||
});
|
||||
|
||||
it("explains the problem and offers a way back, in Portuguese", () => {
|
||||
render(<NotFound />);
|
||||
|
||||
expect(screen.getByRole("heading", { level: 1 })).toHaveTextContent("404");
|
||||
expect(
|
||||
screen.getByRole("heading", { level: 2, name: "Página não encontrada" }),
|
||||
).toBeVisible();
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Voltar ao início" }),
|
||||
).toHaveAttribute("href", "/");
|
||||
expect(screen.getByRole("link", { name: "Ver os cases" })).toHaveAttribute(
|
||||
"href",
|
||||
"/cases",
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user