mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-04 13:29:13 -04:00
feat: test that all tools are loading
This commit is contained in:
parent
b430baef40
commit
2ef2b39fbc
1 changed files with 15 additions and 0 deletions
15
src/tools/all-tools.e2e.spec.ts
Normal file
15
src/tools/all-tools.e2e.spec.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { expect, test } from '@playwright/test';
|
||||
import _ from 'lodash';
|
||||
import { toolsByCategory } from './index';
|
||||
|
||||
for (const tool of _.flatten(toolsByCategory.map(category => category.components))) {
|
||||
test.describe(`Tool - ${tool.name}`, () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(tool.path);
|
||||
});
|
||||
|
||||
test('Loads correctly (has correct title)', async ({ page }) => {
|
||||
await expect(page).toHaveTitle(`${tool.name} - IT Tools`);
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue