Files
ontime/e2e/tests/features/message-control.spec.ts
T
Carlos Valente de9a7a87fd V2 monorepo (#285)
* refactor(project structure): UI

* refactor(project structure): extract utilities

* refactor(project structure): remove unused

* refactor(project structure): electron

* refactor(project structure): server

refactor: migrate to vitest

refactor: monorepo config

* refactor: extract application menu

* refactor: exit process

* refactor: extract tray menu

* chore: electron build

* Added Seconds in studio clock #282
---------

Co-authored-by: Fabian Posenau <fabian@fphome.de>

---------

Co-authored-by: Fabian Posenau <fabian.p99@gmx.de>
Co-authored-by: Fabian Posenau <fabian@fphome.de>
2023-02-14 22:02:15 +01:00

39 lines
1.7 KiB
TypeScript

import { expect, test } from '@playwright/test';
test('test', async ({ context }) => {
const editorPage = await context.newPage();
const featurePage = await context.newPage();
await editorPage.goto('http://localhost:4001/messagecontrol');
// stage timer message
await editorPage.getByPlaceholder('Shown in stage timer').click();
await editorPage.getByPlaceholder('Shown in stage timer').fill('testing stage');
await editorPage.getByRole('button', { name: 'toggle timer screen message' }).click();
await featurePage.goto('http://localhost:4001/timer');
await featurePage.getByText('testing stage').click();
// public screen message
await editorPage.getByPlaceholder('Shown in public screens').click();
await editorPage.getByPlaceholder('Shown in public screens').fill('testing public');
await editorPage.getByRole('button', { name: /toggle public screen message/i }).click();
await featurePage.goto('http://localhost:4001/public');
await featurePage.getByText('testing public').click();
// 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.getByText('testing lower').click();
// on air state
await editorPage.getByRole('button', { name: 'Toggle On Air' }).click();
await featurePage.goto('http://localhost:4001/studio');
await featurePage.getByText('ON AIR').click();
const onAirActive = await featurePage.locator('data-testid=on-air-enabled');
await expect(onAirActive).toHaveText(/on air/i);
});