Skip to content

Commit

Permalink
Removing some hardcoded variables in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ko committed Nov 2, 2023
1 parent d1eca8c commit ca54139
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test-cursor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ test("Custom cursor changes on mouse events", async ({ page }) => {
await page.hover("a");

// Ensure that the cursor size increases on the hover and the fill is transparent
await expect(cursorSelector).toHaveCSS("height", "40px");
await expect(cursorSelector).toHaveCSS("height", cursorSizeL);
await expect(cursorSelector).toHaveCSS(
"background",
"rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box",
);

// Also hover random entry in navbar (blog) and check that the cursor size increases
await page.getByRole("link", { name: "Projects" }).hover();
await expect(cursorSelector).toHaveCSS("height", "40px");
await expect(cursorSelector).toHaveCSS("height", cursorSizeL);
await expect(cursorSelector).toHaveCSS(
"background",
"rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box",
);

// // Move away from the link and ensure that the cursor size and fill return to initial values
await page.mouse.move(10, 10);
await expect(cursorSelector).toHaveCSS("height", "10px");
await expect(cursorSelector).toHaveCSS("height", cursorSizeS);
await expect(cursorSelector).toHaveCSS(
"background",
`${hexToRgb(
Expand Down

0 comments on commit ca54139

Please sign in to comment.