mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 08:23:55 +00:00
cf206e6220
* chore: upgrade vite * fix: inconsistentCjsInterop for ReactQR * chore: e2e tests should use relativve path and get host from playwright config * refactor: drop qr code dependency --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
45 lines
1.7 KiB
TypeScript
45 lines
1.7 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
test('redirect', async ({ context }) => {
|
|
const controllerPage = await context.newPage();
|
|
const remotePage = await context.newPage();
|
|
|
|
await controllerPage.goto('/editor?settings=network__clients');
|
|
await remotePage.goto('/timer');
|
|
|
|
await controllerPage.getByTestId('not-self-redirect').click();
|
|
await controllerPage.getByRole('textbox', { name: 'http://localhost:' }).click();
|
|
await controllerPage.getByRole('textbox', { name: 'http://localhost:' }).fill('studio');
|
|
await controllerPage.getByLabel('Redirect', { exact: true }).click();
|
|
|
|
await expect(remotePage.getByTestId('studio-view')).toBeVisible();
|
|
});
|
|
|
|
test('identify', async ({ context }) => {
|
|
const controllerPage = await context.newPage();
|
|
const remotePage = await context.newPage();
|
|
|
|
await controllerPage.goto('/editor?settings=network__clients');
|
|
await remotePage.goto('/timer');
|
|
|
|
await controllerPage.getByTestId('not-self-identify').click();
|
|
|
|
await expect(remotePage.getByTestId('identify-overlay')).toBeVisible();
|
|
});
|
|
|
|
test('rename', async ({ context }) => {
|
|
const controllerPage = await context.newPage();
|
|
const remotePage = await context.newPage();
|
|
|
|
await controllerPage.goto('/editor?settings=network__clients');
|
|
await remotePage.goto('/timer');
|
|
|
|
await controllerPage.getByTestId('not-self-rename').click();
|
|
await controllerPage.getByPlaceholder('new name').click();
|
|
await controllerPage.getByPlaceholder('new name').fill('test');
|
|
await controllerPage.getByRole('button', { name: 'Submit' }).click();
|
|
await controllerPage.getByTestId('not-self-identify').click();
|
|
|
|
await expect(remotePage.getByTestId('identify-overlay')).toContainText('test');
|
|
});
|