Skip to content

Commit 3b5d3fb

Browse files
committed
load chromatic e2e to new project
1 parent 16abb57 commit 3b5d3fb

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
- name: Run Chromatic
7878
uses: chromaui/action@latest
7979
with:
80-
projectToken: fee8e66c9916
80+
projectToken: chpt_7691c1ff8d1f07d
8181
playwright: true
8282
exitZeroOnChanges: true
8383
forceRebuild: true

chromatic.config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2+
"$schema": "https://www.chromatic.com/config-file.schema.json",
23
"projectId": "Project:6629cd26b1440f2cc20b94c0",
34
"zip": true,
45
"buildScriptName": "build-storybook:chromatic",
56
"onlyChanged": true
6-
}
7+
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"storybook": "storybook dev -p 6006",
1717
"build-storybook": "storybook build",
1818
"build-storybook:chromatic": "storybook build --test",
19-
"chromatic": "CHROMATIC_ARCHIVE_LOCATION=tests/e2e/__results__ chromatic --project-token fee8e66c9916",
19+
"chromatic": "chromatic --project-token fee8e66c9916",
2020
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
2121
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",
2222
"markdown-checker": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/markdownChecker.ts",
@@ -26,7 +26,8 @@
2626
"test:e2e": "playwright test",
2727
"test:e2e:ui": "playwright test --ui",
2828
"test:e2e:debug": "playwright test --debug",
29-
"test:e2e:report": "playwright show-report"
29+
"test:e2e:report": "playwright show-report",
30+
"test:e2e:chromatic": "chromatic --playwright --project-token chpt_7691c1ff8d1f07d"
3031
},
3132
"dependencies": {
3233
"@crowdin/crowdin-api-client": "^1.25.0",

tests/e2e/home.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test.describe("Homepage", () => {
88

99
await expect(page).toHaveTitle(/Ethereum.org/)
1010

11-
await takeSnapshot(page, "Page loaded", testInfo)
11+
await takeSnapshot(page, "initial-load", testInfo)
1212
})
1313

1414
test("search functionality", async ({ page }) => {
@@ -48,7 +48,7 @@ test.describe("Homepage", () => {
4848

4949
await page.goto("/")
5050

51-
await takeSnapshot(page, "Mobile page loaded", testInfo)
51+
await takeSnapshot(page, "mobile-initial-load", testInfo)
5252

5353
const nav = page.getByRole("navigation", { name: "Primary" })
5454
const menuButton = nav.getByRole("button", {
@@ -59,7 +59,7 @@ test.describe("Homepage", () => {
5959
// Open the mobile menu
6060
await menuButton.click()
6161

62-
await takeSnapshot(page, "Mobile menu opened", testInfo)
62+
await takeSnapshot(page, "mobile-menu-opened", testInfo)
6363

6464
// Check that navigation links are visible in the mobile menu
6565
const sidebar = page.getByRole("dialog", { name: /ethereum.org/i })

0 commit comments

Comments
 (0)