Hero e movimento - cena 3D em tempo real com os blocos da marca (kit feito no Blender, 3d/blocos.py): marca, tela, integrações e dados; segue a rolagem, tem vida em repouso, reage ao cursor e, parada no topo, passa sozinha pelos estados com legenda - três níveis de aparelho (full, lite, static); sem WebGL fica o pôster - título novo: "Sites e sistemas sob medida para o jeito que a sua empresa trabalha." - faixa de clientes com o ramo, linha do primeiro passo, hero alinhado às seções - rótulos digitados, entrada dos blocos, cortina de blocos entre páginas e capa compartilhada entre a lista de cases e o case Ofertas - atendimento no WhatsApp com IA e nota fiscal para a reforma tributária (páginas de serviço, cartões da home, formulário e aviso com data de validade) - página /ia atualizada, com fontes - peças 3D em loop nos cartões e topos de página (3d/pecas.py) Design - hover por papel (bloco nos botões, barra nos links), rótulos sem caixa alta - um destino por rótulo: "Falar sobre meu projeto" leva ao formulário, "Chamar no WhatsApp" abre o WhatsApp - logo montado em blocos, 404 redesenhado, grades sem célula vazia - ícones do PWA e manifesto novos Specs em specs/, contexto de design em DESIGN.md e PRODUCT.md.
118 lines
4.5 KiB
TypeScript
118 lines
4.5 KiB
TypeScript
import { fireEvent, render, screen, within } from "@testing-library/react";
|
|
import {
|
|
primaryButton,
|
|
secondaryButtonDark,
|
|
} from "@/app/components/button-styles";
|
|
import { trackCvDownload } from "@/lib/analytics";
|
|
import { buttonLabels } from "@/lib/site-content";
|
|
import CurriculoPage, { metadata } from "./page";
|
|
|
|
jest.mock("@/lib/analytics", () => ({ trackCvDownload: jest.fn() }));
|
|
|
|
it("uses the same shell as the home, with no narrow max-width, and a template-friendly title", () => {
|
|
const { container } = render(CurriculoPage());
|
|
|
|
const shells = container.querySelectorAll(".ds-section-shell");
|
|
expect(shells.length).toBeGreaterThan(0);
|
|
for (const shell of shells) {
|
|
expect(shell.className).not.toMatch(/max-w-/);
|
|
}
|
|
// o sufixo " | Evandro.dev.br" vem do layout: o título não o repete
|
|
expect(metadata.title).toBe("Currículo de Evandro Fonseca Junior");
|
|
expect(metadata.alternates?.canonical).toBe(
|
|
"https://evandro.dev.br/curriculo",
|
|
);
|
|
});
|
|
|
|
it("shows the Innovo company name with the right accents", () => {
|
|
render(CurriculoPage());
|
|
|
|
expect(
|
|
screen.getByText(/Innovo Tecnologia da Informação Ltda\./),
|
|
).toBeVisible();
|
|
expect(document.body.textContent).not.toMatch(/Informacao/);
|
|
});
|
|
|
|
it("shows a matching breadcrumb and keeps consulting secondary to hiring", () => {
|
|
render(CurriculoPage());
|
|
|
|
const breadcrumb = screen.getByRole("navigation", {
|
|
name: "Trilha de navegação",
|
|
});
|
|
const breadcrumbLinks = within(breadcrumb).getAllByRole("link");
|
|
expect(breadcrumbLinks.map((link) => link.textContent)).toEqual([
|
|
"Início",
|
|
"Currículo",
|
|
]);
|
|
expect(breadcrumbLinks[0]).toHaveAttribute("href", "/");
|
|
expect(breadcrumbLinks[1]).toHaveAttribute("href", "/curriculo");
|
|
expect(breadcrumbLinks[1]).toHaveAttribute("aria-current", "page");
|
|
|
|
const hiringLink = screen.getByRole("link", { name: buttonLabels.contact });
|
|
const consultingLink = screen.getByRole("link", { name: /consultoria/i });
|
|
// "Falar sobre meu projeto" leva sempre ao formulário de contato da home
|
|
expect(hiringLink).toHaveAttribute("href", "/#contact-form");
|
|
expect(consultingLink).toHaveAttribute("href", "/servicos");
|
|
expect(
|
|
hiringLink.compareDocumentPosition(consultingLink) &
|
|
Node.DOCUMENT_POSITION_FOLLOWING,
|
|
).toBeTruthy();
|
|
});
|
|
|
|
it("links to no GitHub profile", () => {
|
|
render(CurriculoPage());
|
|
|
|
// "GitHub Actions" continua como competência técnica; o que não pode haver é endereço do GitHub
|
|
expect(document.body.textContent).not.toMatch(/github\.com/i);
|
|
for (const link of screen.getAllByRole("link")) {
|
|
expect(link.getAttribute("href")).not.toMatch(/github/i);
|
|
}
|
|
});
|
|
|
|
it("offers the résumé PDF as a secondary action and measures the download", () => {
|
|
render(CurriculoPage());
|
|
|
|
const pdf = screen.getByRole("link", { name: "Baixar currículo em PDF" });
|
|
expect(pdf).toHaveAttribute("href", "/Profile.pdf");
|
|
expect(pdf).toHaveAttribute("download", "Evandro_Fonseca_Junior_CV.pdf");
|
|
// limão só para o contato: as classes de botão de button-styles.ts
|
|
expect(pdf.className).toBe(secondaryButtonDark);
|
|
expect(
|
|
screen.getByRole("link", { name: buttonLabels.contact }).className,
|
|
).toBe(primaryButton);
|
|
|
|
fireEvent.click(pdf);
|
|
expect(trackCvDownload).toHaveBeenCalledWith({ placement: "curriculo" });
|
|
});
|
|
|
|
it("opens with a lower strip, the block piece, the location line, no eyebrow and spaced achievement lists", () => {
|
|
const { container } = render(CurriculoPage());
|
|
|
|
const hero = container.querySelector("section");
|
|
expect(hero?.className).toContain("md:!pb-sp-12");
|
|
expect(hero?.querySelector(".ds-eyebrow")).toBeNull();
|
|
const image = hero?.querySelector("img");
|
|
expect(image?.getAttribute("src")).toContain("estado-integracoes.webp");
|
|
expect(image?.closest('[aria-hidden="true"]')).toHaveClass(
|
|
"hidden",
|
|
"lg:block",
|
|
);
|
|
expect(hero).toHaveTextContent(
|
|
"Garuva e Joinville (SC) · atendimento remoto em todo o Brasil",
|
|
);
|
|
const achievements = container.querySelectorAll("article.ds-card ul.ds-list");
|
|
expect(achievements.length).toBeGreaterThan(0);
|
|
for (const list of achievements) {
|
|
expect(list).toHaveClass("space-y-sp-2");
|
|
}
|
|
});
|
|
|
|
it("keeps the skill tags right under each card title, with no gap pushed in by .ds-tags", () => {
|
|
const { container } = render(CurriculoPage());
|
|
|
|
const tags = container.querySelectorAll("article.ds-card ul.ds-tags");
|
|
expect(tags.length).toBeGreaterThan(0);
|
|
// .ds-tags (globals.css) tem margin-top: auto, que abria um buraco no cartão esticado pela grade
|
|
for (const list of tags) expect(list.className).toMatch(/!mt-sp-/);
|
|
});
|