-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlc-pages.spec.js
executable file
·49 lines (44 loc) · 1.94 KB
/
lc-pages.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import {test, expect} from '@playwright/test';
test.describe('test lc chapter pages', () => {
test('lc city links use lower case names in url', async ({page}) => {
await page.goto('/mitmachen/correlaidx', {waitUntil: 'networkidle'});
await page.getByRole('link', {name: 'Berlin'}).click();
await page.waitForURL('**/mitmachen/correlaidx/berlin/', {
waitUntil: 'networkidle',
});
await expect(page.getByRole('heading', {name: 'Berlin'})).toHaveCount(1);
await page.goto('/mitmachen/correlaidx/', {waitUntil: 'networkidle'});
await page.getByRole('link', {name: 'Hamburg'}).click();
await page.waitForURL('**/mitmachen/correlaidx/hamburg/', {
waitUntil: 'networkidle',
});
await expect(page.getByRole('heading', {name: 'Hamburg'})).toHaveCount(1);
await page.goto('/mitmachen/correlaidx/', {waitUntil: 'networkidle'});
await page.getByRole('link', {name: 'Rhein-Main'}).click();
await page.waitForURL('**/mitmachen/correlaidx/rheinmain/', {
waitUntil: 'networkidle',
});
await expect(page.getByRole('heading', {name: 'Rhein-Main'})).toHaveCount(
1,
);
await page.goto('/en/volunteering/correlaidx', {waitUntil: 'networkidle'});
await page.getByRole('link', {name: 'Berlin'}).click();
await page.waitForURL('**/en/volunteering/correlaidx/berlin/', {
waitUntil: 'networkidle',
});
await expect(page.getByRole('heading', {name: 'Berlin'})).toHaveCount(1);
});
test('lc links in projects', async ({page}) => {
await page.goto('/daten-nutzen/projektdatenbank/', {
waitUntil: 'networkidle',
});
await page.getByTestId('filter-search').fill('Mannheim');
await page.getByRole('link', {name: 'CorrelAidX Mannheim'}).first().click();
await page.waitForURL('**/mitmachen/correlaidx/mannheim/', {
waitUntil: 'networkidle',
});
await expect(
page.getByRole('heading', {name: 'Mannheim', exact: true}),
).toHaveCount(1);
});
});