mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
Url presets (#807)
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
test('test aliases feature, it should redirect to given alias', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/editor');
|
||||
|
||||
// open settings
|
||||
await page.getByRole('button', { name: 'Settings deprecated' }).click();
|
||||
await page.getByRole('tab', { name: 'URL Aliases' }).click();
|
||||
|
||||
// create alias
|
||||
await page.getByRole('button', { name: 'Add new' }).click();
|
||||
await page.getByTestId('field__alias_1').fill('testing');
|
||||
await page.getByTestId('field__url_1').fill('countdown');
|
||||
await page.getByTestId('field__enable_1').click();
|
||||
await page.getByRole('button', { name: 'Save', exact: true }).click();
|
||||
await page.getByRole('button', { name: 'Close' }).click();
|
||||
|
||||
// make sure alias works
|
||||
await page.goto('http://localhost:4001/testing');
|
||||
await page.getByTestId('countdown__select').click();
|
||||
});
|
||||
@@ -0,0 +1,29 @@
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
test('test URL preset feature, it should redirect to given URL', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/editor');
|
||||
|
||||
// open settings
|
||||
await page.getByRole('button', { name: 'Application settings' }).click();
|
||||
await page.getByRole('button', { name: 'General' }).click();
|
||||
|
||||
// create preset
|
||||
await page.getByTestId('url-preset-form').scrollIntoViewIfNeeded();
|
||||
|
||||
await page.getByRole('button', { name: 'New' }).scrollIntoViewIfNeeded();
|
||||
await page.getByRole('button', { name: 'New' }).click();
|
||||
|
||||
await page.getByTestId('field__alias_0').click();
|
||||
await page.getByTestId('field__alias_0').fill('testing');
|
||||
|
||||
await page.getByTestId('field__url_0').click();
|
||||
await page.getByTestId('field__url_0').fill('countdown');
|
||||
|
||||
await page.getByTestId('field__enable_0').click();
|
||||
|
||||
await page.getByTestId('url-preset-form').getByRole('button', { name: 'Save', exact: true }).click();
|
||||
|
||||
// make sure preset works
|
||||
await page.goto('http://localhost:4001/testing');
|
||||
await page.getByTestId('countdown__select').click();
|
||||
});
|
||||
Reference in New Issue
Block a user