From d9bf8a09e941f54976b96b5c8c2f25f6ae280e77 Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Mon, 1 Jan 2024 13:15:14 +0100 Subject: [PATCH] refactor(vojtechmares.com): fix homepage test and change email iam@vojtechmares.com to jsem@... Signed-off-by: Vojtech Mares --- .../components/homepage/CallToAction.tsx | 2 +- apps/vojtechmares.com/components/homepage/Hero.tsx | 2 +- .../components/homepage/Services.tsx | 4 ++-- apps/vojtechmares.com/components/layout/Footer.tsx | 4 ++-- apps/vojtechmares.com/components/layout/Header.tsx | 2 +- .../components/layout/Navigation.tsx | 2 +- .../components/trainingpage/TrainingLayout.tsx | 2 +- .../tests/{Home.test.tsx => Homepage.test.tsx} | 12 ++++++------ 8 files changed, 15 insertions(+), 15 deletions(-) rename apps/vojtechmares.com/tests/{Home.test.tsx => Homepage.test.tsx} (83%) diff --git a/apps/vojtechmares.com/components/homepage/CallToAction.tsx b/apps/vojtechmares.com/components/homepage/CallToAction.tsx index dcd1906..01fe852 100644 --- a/apps/vojtechmares.com/components/homepage/CallToAction.tsx +++ b/apps/vojtechmares.com/components/homepage/CallToAction.tsx @@ -16,7 +16,7 @@ export function CallToAction() { Je na čase pozvednout Vaši infrastrukturu na dnešní standardy. Infrastruktura má ukázat Vaši aplikaci světu, ne ji držet při zemi.

diff --git a/apps/vojtechmares.com/tests/Home.test.tsx b/apps/vojtechmares.com/tests/Homepage.test.tsx similarity index 83% rename from apps/vojtechmares.com/tests/Home.test.tsx rename to apps/vojtechmares.com/tests/Homepage.test.tsx index f91e49b..57df845 100644 --- a/apps/vojtechmares.com/tests/Home.test.tsx +++ b/apps/vojtechmares.com/tests/Homepage.test.tsx @@ -1,9 +1,9 @@ import { expect, test } from "vitest"; import { render, screen, within } from "@testing-library/react"; -import Home from "../pages"; +import Page from "../app/page"; -test("home", () => { - render(); +test("homepage", () => { + render(); const main = within(screen.getByRole("main")); expect( main.getByRole("heading", { @@ -19,18 +19,18 @@ test("home", () => { if (element instanceof HTMLSpanElement) { const parent = element.closest("a"); expect(parent?.getAttribute("href")).toBe( - "mailto:iam@vojtechmares.com" + "mailto:jsem@vojtechmares.com" ) return; } expect(element.getAttribute("href")).toBe( - "mailto:iam@vojtechmares.com" + "mailto:jsem@vojtechmares.com" ) }); - expect(writeMe).toHaveLength(6); + expect(writeMe).toHaveLength(4); // const footer = within(screen.getByRole('contentinfo')) // const link = within(footer.getByRole('link'))