Skip to content

Commit

Permalink
chore: adds visual comparison for aside menu only (amir20#2319)
Browse files Browse the repository at this point in the history
* chore: adds visual comparison for aside menu only

* adds missing files
  • Loading branch information
amir20 committed Jul 26, 2023
1 parent baf3cc7 commit 0ff031e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
18 changes: 18 additions & 0 deletions e2e/visual.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { test, expect } from "@playwright/test";

test.beforeEach(async ({ page }) => {
await page.goto("https://dozzle:8080/");
});

test.describe("default", () => {
test("homepage", async ({ page }) => {
await expect(page.locator("aside")).toHaveScreenshot({});
});
});

test.describe("dark", () => {
test.use({ colorScheme: "dark" });
test("homepage", async ({ page }) => {
await expect(page.locator("aside")).toHaveScreenshot({});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,11 @@ export default defineConfig({
use: { ...devices["Desktop Chrome"] },
},

{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},

{
name: "Mobile Chrome",
use: { ...devices["Pixel 5"] },
testMatch: "**/visual.spec.ts",
},
{
name: "Mobile Safari",
use: { ...devices["iPhone 12"] },
testMatch: "**/visual.spec.ts",
},

/* Test against branded browsers. */
// {
Expand Down

0 comments on commit 0ff031e

Please sign in to comment.