mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
V2 e2e (#320)
* chore: cleanup handling of a bad read * chore: configure e2e testing * chore: version bump
This commit is contained in:
@@ -8,7 +8,7 @@ test.describe('test view navigation feature', () => {
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'Clock' }).click();
|
||||
await page.getByRole('link', { name: 'Clock', exact: true }).click();
|
||||
await page.locator('data-test-id=clock-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/clock');
|
||||
|
||||
@@ -37,12 +37,6 @@ test.describe('test view navigation feature', () => {
|
||||
const errorBoundary = await page.locator('data-test-id=error-container');
|
||||
await expect(errorBoundary).toHaveCount(0);
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'PiP' }).click();
|
||||
await page.locator('data-test-id=pip-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/pip');
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'Studio Clock' }).click();
|
||||
@@ -57,8 +51,8 @@ test.describe('test view navigation feature', () => {
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'Timer' }).click();
|
||||
await page.getByRole('link', { name: 'Timer', exact: true }).click();
|
||||
await page.locator('data-test-id=timer-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/timer');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -11,4 +11,4 @@ test.describe('minimal view behaviour can be changed through params', () => {
|
||||
const navBar = await page.locator('data-test-id=nav-logo');
|
||||
await expect(navBar).toHaveCount(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
+10
-7
@@ -8,29 +8,32 @@ test('test', async ({ context }) => {
|
||||
|
||||
// stage timer message
|
||||
await editorPage.getByPlaceholder('Shown in stage timer').click();
|
||||
await expect(editorPage.getByPlaceholder('Shown in stage timer')).toBeEnabled(true);
|
||||
|
||||
await editorPage.getByPlaceholder('Shown in stage timer').fill('testing stage');
|
||||
await editorPage.getByRole('button', { name: 'toggle timer screen message' }).click();
|
||||
await editorPage.getByRole('button', { name: /toggle timer screen message/i }).click({ timeout: 5000 });
|
||||
|
||||
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 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.getByText('testing public').click();
|
||||
await featurePage.getByText('testing public').click({ timeout: 10000 });
|
||||
|
||||
// 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();
|
||||
// increase the timeout to accommodate animation
|
||||
await featurePage.getByText('testing lower').click({ timeout: 10000 });
|
||||
|
||||
// on air state
|
||||
await editorPage.getByRole('button', { name: 'Toggle On Air' }).click();
|
||||
await editorPage.getByTestId('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');
|
||||
Reference in New Issue
Block a user