feat(cases): adiciona o case Julia Beauty com vídeo de rolagem
CI / audit (push) Failing after 5m27s
CI / e2e (push) Failing after 11m23s
CI / verify (push) Successful in 11m31s
CI / deploy (push) Successful in 1m19s

This commit is contained in:
evandro committed 2026-10-24 04:50:58 -03:00
1 parent 594daecd2b
commit bcdf0099c5
26 files changed
+159 -42

No files matched your search

@@ -132,7 +132,7 @@ describe("opengraph-image Image", () => {
expect(all.map(({ id }) => id)).toEqual(caseStudies.map(({ id }) => id));
expect(
all.filter(({ contentType }) => contentType === "image/jpeg"),
).toHaveLength(5);
).toHaveLength(6);
});
it("path: unknown slug -> notFound() and no image", async () => {
+12 -4
View File
@@ -20,6 +20,7 @@ const clientCaseIds = [
"lavacao-047",
"sc-plus",
"as-servicos",
"julia-beauty",
];
const labCaseIds = [
"nutriscan",
@@ -86,15 +87,21 @@ function expectContactAndNoDeadLinks(caseStudy: { id: string; title: string }) {
}
}
it("exposes the eight public cases, the two new client cases among them", async () => {
it("exposes the nine public cases, the new client cases among them", async () => {
const staticSlugs = generateStaticParams().map(({ slug }) => slug);
expect(staticSlugs).toHaveLength(8);
expect(new Set(staticSlugs).size).toBe(8);
expect(staticSlugs).toHaveLength(9);
expect(new Set(staticSlugs).size).toBe(9);
expect([...staticSlugs].sort()).toEqual([...publicCaseIds].sort());
expect(staticSlugs).toContain("sev-modaintima");
expect(staticSlugs).toContain("lavacao-047");
expect(staticSlugs).toContain("julia-beauty");
for (const id of ["sev-modaintima", "lavacao-047", "as-servicos"]) {
for (const id of [
"sev-modaintima",
"lavacao-047",
"as-servicos",
"julia-beauty",
]) {
const caseStudy = getCase(id);
const url = `${siteUrl}/cases/${caseStudy.id}`;
const { metaTitle: title, metaDescription: description } = caseStudy;
@@ -680,6 +687,7 @@ it("lists client cases with a cover first, then the laboratory, and keeps the sc
"lavacao-047",
"sc-plus",
"as-servicos",
"julia-beauty",
]);
const clientLinks = listedIds.map((id) => {
const card = container
+2 -1
View File
@@ -77,7 +77,7 @@ describe("CasesPage: cases de cliente", () => {
).toBeNull();
});
it("path: contact -> 'Falar sobre meu projeto', and the list of clients follows the showcase: the SEV first, then Lavação 047, SC Plus and AS Serviços", () => {
it("path: contact -> 'Falar sobre meu projeto', and the list of clients follows the showcase: the SEV first, then Lavação 047, SC Plus, AS Serviços and Julia Beauty", () => {
const { container } = render(<CasesPage />);
expect(
@@ -94,6 +94,7 @@ describe("CasesPage: cases de cliente", () => {
"Lavação 047",
"SC Plus Aquicultura",
"AS Serviços",
"Julia Beauty",
]);
// um botão de contato só na página: o do fecho
expect(
@@ -132,7 +132,7 @@ describe("ProjectLightbox", () => {
expect(
within(dialog).getByRole("button", { name: "Fechar" }),
).toHaveFocus();
expect(within(dialog).getByText("02 / 05")).toBeInTheDocument();
expect(within(dialog).getByText("02 / 06")).toBeInTheDocument();
});
it("shows the desktop video in a browser frame by default and the phone version on request", () => {
@@ -490,7 +490,7 @@ describe("ProjectLightbox: revisão", () => {
it("announces which project is on screen", () => {
const dialog = setup("nutriscan");
expect(dialog.querySelector("[aria-live='polite']")).toHaveTextContent(
"NutriScan, projeto 3 de 5",
"NutriScan, projeto 3 de 6",
);
});
@@ -84,6 +84,7 @@ const WEIGHTS = [
"nutriscan",
"sc-plus",
"as-servicos",
"julia-beauty",
].map((id) => getShowcaseConfig(id)?.weight ?? 1);
const originalRect = Element.prototype.getBoundingClientRect;
@@ -272,7 +273,7 @@ describe("ProjectReel: qual versão entra", () => {
expect(reelEl()).toBeNull();
const list = listEl() as HTMLElement;
expect(list).not.toBeNull();
expect(list.querySelectorAll("li[data-device='desktop']")).toHaveLength(5);
expect(list.querySelectorAll("li[data-device='desktop']")).toHaveLength(6);
expect(list.querySelector(".ds-phone")).toBeNull();
expect(list).not.toHaveAttribute("data-pending");
});
@@ -285,7 +286,7 @@ describe("ProjectReel: qual versão entra", () => {
expect(reelEl()).toBeNull();
expect(
(listEl() as HTMLElement).querySelectorAll("li[data-device='mobile']"),
).toHaveLength(5);
).toHaveLength(6);
});
it("path: phone width and reduced motion at once -> still the list", () => {
@@ -330,13 +331,13 @@ describe("ProjectReel: qual versão entra", () => {
renderReel();
expect(
(listEl() as HTMLElement).querySelectorAll("li[data-device='desktop']"),
).toHaveLength(5);
).toHaveLength(6);
changeMedia(MOBILE_QUERY, true);
expect(
(listEl() as HTMLElement).querySelectorAll("li[data-device='mobile']"),
).toHaveLength(5);
).toHaveLength(6);
});
});
@@ -780,7 +781,7 @@ describe("ProjectReel: rolagem suave até um projeto", () => {
([options]) => options.top as number,
);
const finalTop = tops[tops.length - 1];
// o destino da Lavação (2º projeto) fica bem antes do da AS Serviços (último)
// o destino da Lavação (2º projeto) fica bem antes do da AS Serviços (5º)
expect(finalTop).toBeLessThan(reelTopFor(4));
});
+13 -11
View File
@@ -56,6 +56,7 @@ const weights = [
"nutriscan",
"sc-plus",
"as-servicos",
"julia-beauty",
].map((id) => getShowcaseConfig(id)?.weight ?? 1);
const originalRect = Element.prototype.getBoundingClientRect;
@@ -210,7 +211,7 @@ describe("ProjectReel", () => {
).toBeNull();
expect(document.querySelector(".ds-reel")).toBeNull();
const list = screen.getByRole("region", { name: "Projetos de clientes" });
expect(within(list).getAllByRole("heading", { level: 3 })).toHaveLength(5);
expect(within(list).getAllByRole("heading", { level: 3 })).toHaveLength(6);
expect(document.querySelector("video")).toBeNull();
});
@@ -231,7 +232,7 @@ describe("ProjectReel", () => {
);
expect(posters.length).toBeGreaterThan(0);
for (const poster of posters) expect(poster).toContain("mobile.webp");
expect(list.querySelectorAll(".ds-phone")).toHaveLength(5);
expect(list.querySelectorAll(".ds-phone")).toHaveLength(6);
expect(list.querySelector(".ds-bframe")).toBeNull();
});
@@ -258,6 +259,7 @@ describe("ProjectReel", () => {
"NutriScan",
"SC Plus Aquicultura",
"AS Serviços",
"Julia Beauty",
])
expect(within(nav).getByRole("button", { name })).toBeInTheDocument();
expect(
@@ -272,7 +274,7 @@ describe("ProjectReel", () => {
it("hides the layers that are not on screen from assistive technology and from the keyboard", () => {
renderReel();
const layers = [...document.querySelectorAll(".ds-reel-layer")];
expect(layers).toHaveLength(5);
expect(layers).toHaveLength(6);
for (const layer of layers.slice(1)) {
expect(layer).toHaveAttribute("aria-hidden", "true");
expect(layer).toHaveAttribute("inert");
@@ -338,7 +340,7 @@ describe("ProjectReel", () => {
expect(first.currentTime).toBe(0);
scrollTo(1);
expect(caption()).toHaveTextContent("AS Serviços");
expect(caption()).toHaveTextContent("Julia Beauty");
const last = activeLayer().querySelector(
".ds-reel-screen video",
) as HTMLVideoElement;
@@ -381,7 +383,7 @@ describe("ProjectReel", () => {
});
loaded = sources().filter(Boolean);
expect(
loaded.some((src) => src?.includes("as-servicos/scrub-desktop.mp4")),
loaded.some((src) => src?.includes("julia-beauty/scrub-desktop.mp4")),
).toBe(true);
expect(loaded.some((src) => src?.includes("sev-modaintima"))).toBe(false);
});
@@ -558,8 +560,8 @@ describe("ProjectReel", () => {
).toHaveClass("ds-link-muted");
expect(document.querySelector(".ds-reel .ds-link-accent")).toBeNull();
// sem demoUrl não há "Abrir site"
scrollTo(1);
// sem demoUrl não há "Abrir site" (AS Serviços, 5º projeto)
scrollTo(reelOffset(weights, 4, 0.5));
expect(caption()).toHaveTextContent("AS Serviços");
expect(
within(caption()).queryByRole("link", { name: /Abrir site/ }),
@@ -635,7 +637,7 @@ describe("ProjectReel: a troca de projeto não duplica nada na tela", () => {
expect(document.querySelectorAll(".ds-reel-title")).toHaveLength(1);
expect(document.querySelectorAll(".ds-reel-chapter-count")).toHaveLength(1);
expect(document.querySelectorAll(".ds-reel-actions")).toHaveLength(1);
expect(document.querySelectorAll(".ds-reel-layer")).toHaveLength(5);
expect(document.querySelectorAll(".ds-reel-layer")).toHaveLength(6);
for (const layer of document.querySelectorAll(".ds-reel-layer")) {
expect(layer.closest(".ds-reel-caption")).toBeNull();
expect(layer.querySelector(".ds-reel-caption")).toBeNull();
@@ -782,8 +784,8 @@ describe("ProjectReel: teclado do índice (roving tabindex)", () => {
it("makes the whole index ONE tab stop (the current project), however many projects and chapters it lists", () => {
renderReel();
const buttons = within(index()).getAllByRole("button");
// 5 projetos e os 2 trechos do projeto em cena: 7 botões, uma parada
expect(buttons).toHaveLength(5 + 2);
// 6 projetos e os 2 trechos do projeto em cena: 8 botões, uma parada
expect(buttons).toHaveLength(6 + 2);
expect(stops()).toHaveLength(1);
expect(stops()[0]).toHaveAttribute("aria-current", "true");
expect(stops()[0]).toHaveAccessibleName("SEV Moda Íntima");
@@ -895,7 +897,7 @@ describe("ProjectReel: teclado do índice (roving tabindex)", () => {
fireEvent.keyDown(document.activeElement as Element, { key: "End" });
expect(document.activeElement).toHaveAccessibleName(/Abrir site/);
scrollTo(1); // AS Serviços: sem site
scrollTo(reelOffset(weights, 4, 0.5)); // AS Serviços: sem site
act(() => {
jest.advanceTimersByTime(CAPTION_OUT_MS + 40);
});
@@ -60,6 +60,7 @@ describe("buildShowcaseItems", () => {
"nutriscan",
"sc-plus",
"as-servicos",
"julia-beauty",
]);
expect(
buildShowcaseItems(projects.filter((p) => p.id === "twins-lab")),