mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
Client remote control (#930)
--------- Co-authored-by: kellhogs <fabianpos99@gmail.com> Co-authored-by: Carlos Valente <carlosvalente@pm.me> Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
70e8fbf327
commit
a15eb0db4c
@@ -0,0 +1,44 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test('redirect', async ({ context }) => {
|
||||
const controllerPage = await context.newPage();
|
||||
const remotePage = await context.newPage();
|
||||
|
||||
await controllerPage.goto('http://localhost:4001/editor?settings=network__clients');
|
||||
await remotePage.goto('http://localhost:4001/timer');
|
||||
|
||||
await controllerPage.getByTestId('not-self-redirect').click();
|
||||
await controllerPage.getByPlaceholder('minimal?key=0000ffff').click();
|
||||
await controllerPage.getByPlaceholder('minimal?key=0000ffff').fill('clock');
|
||||
await controllerPage.getByRole('button', { name: 'Submit' }).click();
|
||||
|
||||
await expect(remotePage.getByTestId('clock-view')).toBeVisible();
|
||||
});
|
||||
|
||||
test('identify', async ({ context }) => {
|
||||
const controllerPage = await context.newPage();
|
||||
const remotePage = await context.newPage();
|
||||
|
||||
await controllerPage.goto('http://localhost:4001/editor?settings=network__clients');
|
||||
await remotePage.goto('http://localhost:4001/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('http://localhost:4001/editor?settings=network__clients');
|
||||
await remotePage.goto('http://localhost:4001/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');
|
||||
});
|
||||
Reference in New Issue
Block a user