refactor(vojtechmares.com): fix homepage test and change email iam@vojtechmares.com to jsem@...
Signed-off-by: Vojtech Mares <iam@vojtechmares.com>
This commit is contained in:
parent
3309972c77
commit
d9bf8a09e9
8 changed files with 15 additions and 15 deletions
|
|
@ -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(<Home />);
|
||||
test("homepage", () => {
|
||||
render(<Page />);
|
||||
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'))
|
||||
Reference in a new issue