1
0
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:
Kamran Ahmed
2023-01-15 15:23:27 +04:00
parent af9e266190
commit cbd79ef299
34 changed files with 152 additions and 2 deletions

13
tests/roadmap.spec.ts Normal file
View 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 });
});
}