mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-31 04:59:50 +02:00
Add tests for roadmap pages and homepage
This commit is contained in:
13
tests/roadmap.spec.ts
Normal file
13
tests/roadmap.spec.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import path from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
const roadmapIds = fs.readdirSync(path.join(process.cwd(), 'src/roadmaps'));
|
||||
|
||||
for (const roadmapId of roadmapIds) {
|
||||
test(`roadmap ${roadmapId}`, async ({ page }) => {
|
||||
await page.goto(`/${roadmapId}`);
|
||||
|
||||
await expect(page).toHaveScreenshot({ fullPage: true });
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user