Skip to content

Commit 87950ef

Browse files
committed
test: set initial screenshots
1 parent ad465b8 commit 87950ef

16 files changed

+9308
-1319
lines changed

__tests__/example.spec.ts

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// example.spec.ts
2+
import { test, expect } from '@playwright/test';
3+
import {default as domains} from '../domains.json';
4+
5+
const stagingUrl = 'https://staging-docs-page-website-euw1-dzpolnxswq-ew.a.run.app';
6+
7+
// skip these as these are not working (user error)
8+
const skipList = ['dokumentacja.otwartaturystyka.pl']
9+
10+
domains.forEach(domain => {
11+
if (!skipList.includes(domain[0])) {
12+
test(`${domain[0]}`, async ({ page }) => {
13+
14+
const response = await page.goto(`https://${domain[0]}`);
15+
16+
expect(response).toBeDefined();
17+
expect(response!.status()).toBe(200);
18+
19+
const screenshotName = `${domain[1]}-original.png`;
20+
await expect(page).toHaveScreenshot(`${domain[1]}-original.png`);
21+
22+
await page.goto(`${stagingUrl}/${domain[1]}`)
23+
await expect(page).toHaveScreenshot(`${domain[1]}-original.png`);
24+
});
25+
}
26+
})
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"private": true,
3+
"workspaces": [
4+
"website",
5+
"packages/*",
6+
"api"
7+
],
38
"scripts": {
49
"dev": "concurrently \"yarn dev:api\" \"yarn dev:website\"",
510
"dev:website": "cd website && yarn dev",

0 commit comments

Comments
 (0)