test: alias feature (#602)

This commit is contained in:
Carlos Valente
2023-11-20 11:45:17 +01:00
committed by GitHub
parent 1b55dbc170
commit afa62a6e38
2 changed files with 31 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
import { test, expect } 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' }).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.getByText('Select an event to follow').click();
});