mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 11:20:36 +08:00
We use the cache Github action to store snapshots when pushing to master and then load them in pull requests and run the visual tests against it. This way we don't have to commit the images to the repository and always get diffs to the latest master. Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
26 lines
898 B
TypeScript
26 lines
898 B
TypeScript
import { test, expect, projectFixtureUrl } from "@tests/support/fixtures.js";
|
|
|
|
test("source tree page", async ({ page }) => {
|
|
await page.goto(projectFixtureUrl);
|
|
await expect(page).toHaveScreenshot();
|
|
});
|
|
|
|
test("commits page", async ({ page }) => {
|
|
await page.goto(
|
|
`${projectFixtureUrl}/remotes/hyn1mjueopwzrmb18c3zmgg8ei8qunn5wpg76ouymytfqkfxqx7bun/history`,
|
|
);
|
|
await expect(page).toHaveScreenshot({ fullPage: true });
|
|
});
|
|
|
|
test("commit page", async ({ page }) => {
|
|
await page.goto(
|
|
`${projectFixtureUrl}/remotes/hyn1mjueopwzrmb18c3zmgg8ei8qunn5wpg76ouymytfqkfxqx7bun/commits/d6318f7f3d9c15b8ac6dd52267c53220d00f0982`,
|
|
);
|
|
await expect(page).toHaveScreenshot({ fullPage: true });
|
|
});
|
|
|
|
test("markdown rendering", async ({ page }) => {
|
|
await page.goto(`${projectFixtureUrl}/tree/main/markdown/cheatsheet.md`);
|
|
await expect(page).toHaveScreenshot({ fullPage: true });
|
|
});
|