Skip to content

Commit

Permalink
fix: e2e tests locator
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-W-James committed Aug 27, 2023
1 parent 2853196 commit a603d53
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions e2e/contactForm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ test("should not be reset after changing routes", async ({
openHamburgerNav(isMobile, page);
await page
.getByRole("navigation")
.getByRole("link", { name: "Home" })
.getByRole("link", { name: "Home", exact: true })
.click();
openHamburgerNav(isMobile, page);
await page
.getByRole("navigation")
.getByRole("link", { name: "Contact" })
.getByRole("link", { name: "Contact", exact: true })
.click();

// check form input
Expand Down
6 changes: 3 additions & 3 deletions e2e/nav.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ test("should change page when links are clicked", async ({
openHamburgerNav(isMobile, page);
await page
.getByRole("navigation")
.getByRole("link", { name: "Projects" })
.getByRole("link", { name: "Projects", exact: true })
.click();

// Assert page changed
await expect(page).toHaveTitle(/.*projects/iu);
await expect(page).toHaveURL(/.*projects/iu);

openHamburgerNav(isMobile, page);
await page.getByRole("link", { name: "Blog" }).click();
await page.getByRole("link", { name: "Blog", exact: true }).click();

// Assert page changed
await expect(page).toHaveTitle(/.*blog/iu);
await expect(page).toHaveURL(/.*blog/iu);

openHamburgerNav(isMobile, page);
await page.getByRole("link", { name: "Contact" }).click();
await page.getByRole("link", { name: "Contact", exact: true }).click();

// Assert page changed
await expect(page).toHaveTitle(/.*contact/iu);
Expand Down
9 changes: 0 additions & 9 deletions src/styles/cssClasses.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export type ClassNames =
| "animate-spin"
| "aspect-square"
| "aspect-wide"
| "basis-content"
| "basis-min-content"
| "bg-dark-shades"
| "bg-light-shades"
Expand Down Expand Up @@ -162,7 +161,6 @@ export type ClassNames =
| "grid-cols-2"
| "grid-cols-5"
| "grow"
| "h-1"
| "h-16"
| "h-1\/4"
| "h-4"
Expand Down Expand Up @@ -212,7 +210,6 @@ export type ClassNames =
| "min-w-fit"
| "min-w-sm"
| "ml-4"
| "ml-auto"
| "motion-safe\:animate-spin"
| "mr-2"
| "mr-4"
Expand All @@ -228,7 +225,6 @@ export type ClassNames =
| "my-10"
| "my-8"
| "object-cover"
| "order-1"
| "overflow-auto"
| "overflow-hidden"
| "p-0"
Expand All @@ -246,7 +242,6 @@ export type ClassNames =
| "prose-invert"
| "prose-lg"
| "pt-8"
| "px-1"
| "px-1\/10"
| "px-2"
| "px-4"
Expand Down Expand Up @@ -290,14 +285,10 @@ export type ClassNames =
| "tooltip"
| "tooltip-text"
| "top-0"
| "top-3"
| "top-3\/4"
| "transition"
| "underline"
| "uppercase"
| "visible"
| "w-1"
| "w-auto"
| "w-fit"
| "w-full"
| "w-screen"
Expand Down

0 comments on commit a603d53

Please sign in to comment.