Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint-css:check": "stylelint src/**/* --max-warnings=0",
"format": "prettier --write .",
"format:check": "prettier --check .",
"test:e2e": "playwright test"
"test:e2e": "playwright test",
"test:e2e:update": "playwright test --update-snapshots"
},
"dependencies": {
"@tanstack/react-query": "4.35.0",
Expand Down
17 changes: 14 additions & 3 deletions src/components/page/Index/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ test.describe("Index page", () => {
},
{ highchartsSeriesSelector, initialCheckedNumber },
);

const seriesList = await page.locator(highchartsSeriesSelector).all();
await expect(seriesList).toHaveLength(initialCheckedNumber);
});
});

Expand Down Expand Up @@ -190,4 +187,18 @@ test.describe("Index page", () => {
expect(chartTitle).not.toBe(chartTitle2);
});
});

test.describe("visual regression", () => {
test("initial render", async ({ page }) => {
await page.waitForFunction(
({ highchartsSeriesSelector, initialCheckedNumber }) => {
return document.querySelectorAll(highchartsSeriesSelector).length === initialCheckedNumber;
},
{ highchartsSeriesSelector, initialCheckedNumber },
);

await page.waitForTimeout(1000);
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot();
});
});
});
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.