Files
ontime/e2e/tests/features/201-message-control.spec.ts
T
Carlos Valente 062dc0c914 refactor: pass HTTP to integration controller (#652)
* refactor: pass HTTP to integration controller

* refactor: deprecate onair control

* refactor: remove playback router
2023-12-19 21:44:43 +01:00

36 lines
1.6 KiB
TypeScript

import { test } from '@playwright/test';
test('message control sends messages to screens', async ({ context }) => {
const editorPage = await context.newPage();
const featurePage = await context.newPage();
await editorPage.goto('http://localhost:4001/messagecontrol');
// public screen message
await editorPage.getByPlaceholder('Shown in public and backstage screens').click();
await editorPage.getByPlaceholder('Shown in public and backstage screens').fill('testing public');
await editorPage.getByRole('button', { name: 'Toggle Public / Backstage screen message' }).click();
await featurePage.goto('http://localhost:4001/public');
await featurePage.waitForLoadState('load', { timeout: 5000 });
await featurePage.getByText('testing public').click({ timeout: 5000 });
// lower third message
await editorPage.getByPlaceholder('Shown in lower third').click();
await editorPage.getByPlaceholder('Shown in lower third').fill('testing lower');
await editorPage.getByRole('button', { name: /toggle lower third message/i }).click();
await featurePage.goto('http://localhost:4001/lower');
await featurePage.waitForLoadState('load', { timeout: 5000 });
await featurePage.getByText('testing lower').click({ timeout: 5000 });
// stage timer message
await editorPage.getByPlaceholder('Timer').click();
await editorPage.getByPlaceholder('Timer').fill('testing stage');
await editorPage.getByRole('button', { name: /toggle timer/i }).click({ timeout: 5000 });
await featurePage.goto('http://localhost:4001/timer');
await featurePage.waitForLoadState('load', { timeout: 5000 });
await featurePage.getByText('testing stage').click();
});