Skip to content

Commit 2ef2b39

Browse files
committed
feat: test that all tools are loading
1 parent b430bae commit 2ef2b39

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/tools/all-tools.e2e.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { expect, test } from '@playwright/test';
2+
import _ from 'lodash';
3+
import { toolsByCategory } from './index';
4+
5+
for (const tool of _.flatten(toolsByCategory.map(category => category.components))) {
6+
test.describe(`Tool - ${tool.name}`, () => {
7+
test.beforeEach(async ({ page }) => {
8+
await page.goto(tool.path);
9+
});
10+
11+
test('Loads correctly (has correct title)', async ({ page }) => {
12+
await expect(page).toHaveTitle(`${tool.name} - IT Tools`);
13+
});
14+
});
15+
}

0 commit comments

Comments
 (0)