feat(home): posicionamento com prova, menu sem recarregar e WhatsApp em todo o site

H1 'Sites e sistemas que trazem pedidos pelo WhatsApp e tiram sua operação da planilha.'; HeroWork maior com a SEV; menu Cases, Serviços, Como trabalho, Sobre e IA com next/link e pré-carregamento no hover; menu do celular em tela cheia; WhatsApp flutuante e no rodapé com a mensagem da rota; rodapé em todas as páginas; FAQ da home; /ia como oferta de revisão de app feito com IA; formulário com noscript, validação do mailto e plano B do pop-up; cartões sem foco indevido; sem a fonte Monument.
This commit is contained in:
Evandro Fonseca Junior committed 2026-10-14 14:15:25 -03:00
1 parent e80f73d075
commit 10f170abf4
56 files changed
+3099 -906

No files matched your search

@@ -6,7 +6,7 @@ import { useHomeFragmentNavigation } from "./useHomeFragmentNavigation";
/**
* Testes de caminhos-base de CinematicHome: o endereço do trabalho em destaque (projeto presente com site,
* presente sem site, ausente), a repasse das props opcionais, a ordem das cenas e a ligação dos hooks.
* presente sem site, ausente), a repasse das props opcionais, a ordem das cenas (sem rodapé próprio: ele vem do layout) e a ligação dos hooks.
* As cenas e os hooks são trocados por dublês que registram o que recebem.
*/
@@ -14,7 +14,6 @@ const mockHeroProps = jest.fn();
const mockProjectsProps = jest.fn();
const mockModalitiesProps = jest.fn();
const mockTestimonialsProps = jest.fn();
const mockFooterProps = jest.fn();
jest.mock("../Hero", () => ({
__esModule: true,
@@ -44,6 +43,10 @@ jest.mock("../EngineeringWithAI", () => ({
__esModule: true,
default: () => <section data-testid="scene-ai" />,
}));
jest.mock("../HomeFaq", () => ({
__esModule: true,
default: () => <section data-testid="scene-faq" />,
}));
jest.mock("../Testimonials", () => ({
__esModule: true,
default: (props: unknown) => {
@@ -55,17 +58,6 @@ jest.mock("../Contact", () => ({
__esModule: true,
default: () => <section data-testid="scene-contact" />,
}));
jest.mock("../Footer", () => ({
__esModule: true,
default: (props: unknown) => {
mockFooterProps(props);
return <footer data-testid="footer" />;
},
}));
jest.mock("../FloatingWhatsApp", () => ({
__esModule: true,
default: () => <div data-testid="floating-whatsapp" />,
}));
jest.mock("./useCinematicScroll", () => ({ useCinematicScroll: jest.fn() }));
jest.mock("./useHomeFragmentNavigation", () => ({
useHomeFragmentNavigation: jest.fn(),
@@ -86,27 +78,24 @@ beforeEach(() => {
});
describe("CinematicHome: endereço do trabalho em destaque", () => {
it("path: the featured project is in the list with a site -> its domain goes to the hero", () => {
it("path: the featured project (SEV) is in the list with its own domain -> that domain goes to the hero", () => {
render(
<CinematicHome
projects={[
project("lavacao-047", "https://www.landing-lavacao.example.com/"),
project("sev-modaintima", "https://sevmodaintima.com.br"),
project(
"lavacao-047",
"https://www.landing-lavacao.vercel.app/pagina/",
),
]}
/>,
);
expect(lastHeroProps().workUrl).toEqual({
text: "landing-lavacao.vercel.app/pagina",
text: "sevmodaintima.com.br",
secure: true,
});
});
it("path: the featured project is in the list but has no site -> no address", () => {
render(<CinematicHome projects={[project("lavacao-047", null)]} />);
render(<CinematicHome projects={[project("sev-modaintima", null)]} />);
expect(lastHeroProps().workUrl).toBeNull();
});
@@ -114,7 +103,19 @@ describe("CinematicHome: endereço do trabalho em destaque", () => {
it("path: the featured project is not in the list -> no address", () => {
render(
<CinematicHome
projects={[project("sev-modaintima", "https://sevmodaintima.com.br")]}
projects={[project("lavacao-047", "https://lavacao.example.com")]}
/>,
);
expect(lastHeroProps().workUrl).toBeNull();
});
it("path: the featured project only has a hosting address (vercel.app) -> no address bar text", () => {
render(
<CinematicHome
projects={[
project("sev-modaintima", "https://sev-moda-intima.vercel.app/"),
]}
/>,
);
@@ -154,7 +155,6 @@ describe("CinematicHome: props e estrutura", () => {
expect(mockProjectsProps).toHaveBeenCalledWith({ projects });
expect(mockTestimonialsProps).toHaveBeenCalledWith({ items: testimonials });
expect(mockModalitiesProps).toHaveBeenCalledWith({ serviceLinks });
expect(mockFooterProps).toHaveBeenCalledWith({ serviceLinks });
});
it("path: optional props omitted -> the scenes receive undefined and decide their own defaults", () => {
@@ -168,10 +168,9 @@ describe("CinematicHome: props e estrutura", () => {
expect(mockModalitiesProps).toHaveBeenCalledWith({
serviceLinks: undefined,
});
expect(mockFooterProps).toHaveBeenCalledWith({ serviceLinks: undefined });
});
it("path: scenes sit in order inside <main>; the footer and the floating button sit outside it", () => {
it("path: scenes sit in order inside <main> (FAQ right before the contact); the home has no footer of its own (it comes from the layout)", () => {
render(<CinematicHome projects={[]} />);
const main = screen.getByRole("main");
@@ -186,10 +185,12 @@ describe("CinematicHome: props e estrutura", () => {
"scene-modalities",
"scene-ai",
"scene-testimonials",
"scene-faq",
"scene-contact",
]);
expect(main).not.toContainElement(screen.getByTestId("footer"));
expect(main).not.toContainElement(screen.getByTestId("floating-whatsapp"));
// o rodapé é do layout: a home não desenha um (seria o segundo da página)
expect(screen.queryByRole("contentinfo")).toBeNull();
expect(document.querySelector("footer")).toBeNull();
});
it("path: mount -> the scroll hook gets the <main> ref and the layout-ready callback runs once", () => {