mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 02:13:48 +00:00
feat: V2 ontime menu (#259)
This commit is contained in:
@@ -8,11 +8,11 @@ test('test', async ({ context }) => {
|
||||
|
||||
// stage timer message
|
||||
await editorPage.getByPlaceholder('Shown in stage timer').click();
|
||||
await editorPage.getByPlaceholder('Shown in stage timer').fill('testing');
|
||||
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').click();
|
||||
await featurePage.getByText('testing stage').click();
|
||||
|
||||
// public screen message
|
||||
await editorPage.getByPlaceholder('Shown in public screens').click();
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test.describe('test view navigation feature', () => {
|
||||
test('user flow through links', async ({ page }) => {
|
||||
// default view is timer view
|
||||
await page.goto('http://localhost:4001/');
|
||||
await page.locator('data-test-id=timer-view');
|
||||
|
||||
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.locator('data-test-id=clock-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/clock');
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'Minimal Timer' }).click();
|
||||
await page.locator('data-test-id=minimal-timer');
|
||||
await expect(page).toHaveURL('http://localhost:4001/minimal');
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'Backstage' }).click();
|
||||
await page.locator('data-test-id=backstage-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/backstage');
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'Public' }).click();
|
||||
await page.locator('data-test-id=public-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/public');
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'Lower Thirds' }).click();
|
||||
await expect(page).toHaveURL('http://localhost:4001/lower');
|
||||
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();
|
||||
await page.locator('data-test-id=studio-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/studio');
|
||||
|
||||
await page.getByRole('button', { name: 'toggle menu' }).click();
|
||||
await page.locator('data-test-id=navigation-menu');
|
||||
await page.getByRole('link', { name: 'Countdown' }).click();
|
||||
await page.locator('data-test-id=countdown-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/countdown');
|
||||
|
||||
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.locator('data-test-id=timer-view');
|
||||
await expect(page).toHaveURL('http://localhost:4001/timer');
|
||||
});
|
||||
});
|
||||
@@ -39,40 +39,4 @@ test.describe('pages routes are available', () => {
|
||||
await page.getByTestId('panel-info').click();
|
||||
});
|
||||
});
|
||||
|
||||
test.describe('client routes', () => {
|
||||
test('stage timer', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/timer');
|
||||
await page.getByTestId('timer-view').click();
|
||||
});
|
||||
test('clock', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/clock');
|
||||
await page.getByTestId('clock-view').click();
|
||||
});
|
||||
test('minimal timer', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/minimal');
|
||||
await page.getByTestId('minimal-timer').click();
|
||||
});
|
||||
test('backstage', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/backstage');
|
||||
await page.getByTestId('backstage-view').click();
|
||||
});
|
||||
test('public', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/public');
|
||||
await page.getByTestId('public-view').click();
|
||||
});
|
||||
test('pip', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/pip');
|
||||
await page.getByTestId('pip-view').click();
|
||||
});
|
||||
test('studio clock', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/studio');
|
||||
await page.getByTestId('studio-view').click();
|
||||
});
|
||||
test('lower', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/lower');
|
||||
const errorBoundary = await page.locator('data-test-id=error-container');
|
||||
await expect(errorBoundary).toHaveCount(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user