mirror of
https://github.com/penpot/penpot.git
synced 2025-06-26 00:06:59 +02:00
✨ Setup temporary visual regression testing for the design system
This commit is contained in:
parent
c3c6879a2f
commit
d4dc87a740
4 changed files with 21 additions and 2 deletions
|
@ -32,7 +32,7 @@
|
||||||
"compile:cljs": "clojure -M:dev:shadow-cljs compile main",
|
"compile:cljs": "clojure -M:dev:shadow-cljs compile main",
|
||||||
"watch": "node ./scripts/watch.js",
|
"watch": "node ./scripts/watch.js",
|
||||||
"e2e:server": "node ./scripts/e2e-server.js",
|
"e2e:server": "node ./scripts/e2e-server.js",
|
||||||
"e2e:test": "playwright test",
|
"e2e:test": "playwright test --project default",
|
||||||
"storybook:compile": "yarn run compile && clojure -M:dev:shadow-cljs compile storybook",
|
"storybook:compile": "yarn run compile && clojure -M:dev:shadow-cljs compile storybook",
|
||||||
"storybook:watch": "yarn run storybook:compile && concurrently \"clojure -M:dev:shadow-cljs watch storybook\" \"storybook dev -p 6006\" \"yarn run watch\"",
|
"storybook:watch": "yarn run storybook:compile && concurrently \"clojure -M:dev:shadow-cljs watch storybook\" \"storybook dev -p 6006\" \"yarn run watch\"",
|
||||||
"storybook:build": "yarn run storybook:compile && storybook build"
|
"storybook:build": "yarn run storybook:compile && storybook build"
|
||||||
|
|
|
@ -39,8 +39,17 @@ export default defineConfig({
|
||||||
/* Configure projects for major browsers */
|
/* Configure projects for major browsers */
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
name: "chromium",
|
name: "default",
|
||||||
use: { ...devices["Desktop Chrome"] },
|
use: { ...devices["Desktop Chrome"] },
|
||||||
|
testDir: "./playwright/ui/specs",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ds",
|
||||||
|
use: { ...devices["Desktop Chrome"] },
|
||||||
|
testDir: "./playwright/ui/visual-specs",
|
||||||
|
expect: {
|
||||||
|
toHaveScreenshot: { maxDiffPixelRatio: 0.01 },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
10
frontend/playwright/ui/visual-specs/example.spec.js
Normal file
10
frontend/playwright/ui/visual-specs/example.spec.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import { test, expect } from "@playwright/test";
|
||||||
|
import { LoginPage } from "../pages/LoginPage";
|
||||||
|
|
||||||
|
test("Shows login form correctly", async ({ page }) => {
|
||||||
|
await LoginPage.initWithLoggedOutUser(page);
|
||||||
|
const loginPage = new LoginPage(page);
|
||||||
|
await page.goto("/#/auth/login");
|
||||||
|
|
||||||
|
await expect(page).toHaveScreenshot();
|
||||||
|
});
|
Binary file not shown.
After Width: | Height: | Size: 152 KiB |
Loading…
Add table
Add a link
Reference in a new issue