mirror of
https://github.com/zonemaster/zonemaster-gui.git
synced 2025-06-06 18:39:23 +02:00

* API: move `check` to `run-test` * UI: update strings refering to "domain check" to "run test" * adapt e2e tests
27 lines
921 B
TypeScript
27 lines
921 B
TypeScript
const { test, expect } = require('@playwright/test');
|
|
|
|
import { goToHome, setLang } from './utils/app.utils';
|
|
|
|
test.describe('Redirection should properly work', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await goToHome(page);
|
|
await setLang(page, 'en');
|
|
});
|
|
|
|
test('/ should redirect to /run-test', async ({ page, baseURL }) => {
|
|
await page.goto( baseURL + '/' );
|
|
await expect(page).toHaveURL( baseURL + '/en/run-test' );
|
|
});
|
|
|
|
test('/domain_check should redirect to /run-test', async ({ page, baseURL }) => {
|
|
await page.goto( baseURL + '/domain_check' );
|
|
await expect(page).toHaveURL( baseURL + '/en/run-test' );
|
|
});
|
|
|
|
test('/test/<test-id> should redirect to /result/<test-id>', async ({ page, baseURL }) => {
|
|
const testID = '226f6d4f44ae3f80';
|
|
|
|
await page.goto( baseURL + '/test/' + testID );
|
|
await expect(page).toHaveURL( baseURL + '/en/result/' + testID );
|
|
});
|
|
});
|