mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-09 18:57:49 +02:00
Add tests for roadmaps, guides and videos
This commit is contained in:
7
tests/guides.spec.ts
Normal file
7
tests/guides.spec.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { expect, test } from '@playwright/test';
|
||||||
|
|
||||||
|
test(`guides`, async ({ page }) => {
|
||||||
|
await page.goto('/guides');
|
||||||
|
|
||||||
|
await expect(page).toHaveScreenshot({ fullPage: true });
|
||||||
|
});
|
BIN
tests/guides.spec.ts-snapshots/guides-1-chromium-darwin.png
Normal file
BIN
tests/guides.spec.ts-snapshots/guides-1-chromium-darwin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 262 KiB |
@@ -4,6 +4,12 @@ import { test, expect } from '@playwright/test';
|
|||||||
|
|
||||||
const roadmapIds = fs.readdirSync(path.join(process.cwd(), 'src/roadmaps'));
|
const roadmapIds = fs.readdirSync(path.join(process.cwd(), 'src/roadmaps'));
|
||||||
|
|
||||||
|
test(`roadmaps`, async ({ page }) => {
|
||||||
|
await page.goto('/roadmaps');
|
||||||
|
|
||||||
|
await expect(page).toHaveScreenshot({ fullPage: true });
|
||||||
|
});
|
||||||
|
|
||||||
for (const roadmapId of roadmapIds) {
|
for (const roadmapId of roadmapIds) {
|
||||||
test(`roadmap ${roadmapId}`, async ({ page }) => {
|
test(`roadmap ${roadmapId}`, async ({ page }) => {
|
||||||
await page.goto(`/${roadmapId}`);
|
await page.goto(`/${roadmapId}`);
|
||||||
|
BIN
tests/roadmap.spec.ts-snapshots/roadmaps-1-chromium-darwin.png
Normal file
BIN
tests/roadmap.spec.ts-snapshots/roadmaps-1-chromium-darwin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1006 KiB |
7
tests/videos.spec.ts
Normal file
7
tests/videos.spec.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { expect, test } from '@playwright/test';
|
||||||
|
|
||||||
|
test(`videos`, async ({ page }) => {
|
||||||
|
await page.goto('/videos');
|
||||||
|
|
||||||
|
await expect(page).toHaveScreenshot({ fullPage: true });
|
||||||
|
});
|
BIN
tests/videos.spec.ts-snapshots/videos-1-chromium-darwin.png
Normal file
BIN
tests/videos.spec.ts-snapshots/videos-1-chromium-darwin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 331 KiB |
Reference in New Issue
Block a user