1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

chore: adds visual comparison for aside menu only (#2319)

* chore: adds visual comparison for aside menu only

* adds missing files
This commit is contained in:
Amir Raminfar
2023-07-26 10:03:07 -07:00
committed by GitHub
parent baf3cc70f8
commit 0ff031e361
6 changed files with 18 additions and 10 deletions

18
e2e/visual.spec.ts Normal file
View File

@@ -0,0 +1,18 @@
import { test, expect } from "@playwright/test";
test.beforeEach(async ({ page }) => {
await page.goto("http://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({});
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -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. */
// {