mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
refactor: gather group metadata
This commit is contained in:
@@ -13,7 +13,7 @@ test('project file upload', async ({ page }) => {
|
||||
await page.getByRole('button', { name: 'Delete all' }).click();
|
||||
|
||||
await page.getByRole('button', { name: 'toggle settings' }).click();
|
||||
await page.getByRole('button', { name: 'Project', exact: true }).click();
|
||||
await page.getByRole('button', { name: 'Manage projects' }).click();
|
||||
|
||||
// workaround to upload file on hidden input
|
||||
// https://playwright.dev/docs/api/class-filechooser
|
||||
@@ -39,14 +39,14 @@ test('project file download', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/editor');
|
||||
|
||||
await page.getByRole('button', { name: 'toggle settings' }).click();
|
||||
await page.getByRole('button', { name: 'Project', exact: true }).click();
|
||||
await page.getByRole('button', { name: 'Manage projects' }).click();
|
||||
|
||||
// workaround to download
|
||||
// https://playwright.dev/docs/api/class-download
|
||||
const downloadPromise = page.waitForEvent('download');
|
||||
|
||||
await page
|
||||
.getByRole('row', { name: /^e2e-test-db/ })
|
||||
.getByRole('row', { name: /.*currently loaded/i })
|
||||
.getByLabel('Options')
|
||||
.click();
|
||||
await page.getByRole('menuitem', { name: 'Download' }).click();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('Copy Past', async ({ page }) => {
|
||||
test('Copy-paste', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/rundown');
|
||||
|
||||
// clear rundown
|
||||
await page.getByRole('button', { name: 'Clear rundown' }).click();
|
||||
await page.getByRole('button', { name: 'Delete all' }).click();
|
||||
|
||||
//create event
|
||||
// create event
|
||||
await page.getByRole('button', { name: 'Create Event' }).click();
|
||||
await page.getByTestId('entry-1').click();
|
||||
await page.getByLabel('Cue', { exact: true }).click();
|
||||
@@ -18,22 +18,22 @@ test('Copy Past', async ({ page }) => {
|
||||
await page.getByTestId('block__title').fill('test');
|
||||
await page.getByTestId('block__title').press('Enter');
|
||||
|
||||
//copy past below
|
||||
// copy paste below
|
||||
await page.locator('div').filter({ hasText: /^4$/ }).click();
|
||||
await page.locator('div').filter({ hasText: /^4$/ }).press('Control+c');
|
||||
await page.locator('div').filter({ hasText: /^4$/ }).press('Control+v');
|
||||
|
||||
//assert
|
||||
// assert
|
||||
await expect(page.getByTestId('entry-2')).toBeVisible();
|
||||
await expect(page.getByTestId('entry-2').getByTestId('block__title')).toHaveValue('test');
|
||||
await expect(page.getByTestId('entry-2').locator('#event-block')).toContainText('5');
|
||||
|
||||
//copy past above
|
||||
// copy paste above
|
||||
await page.locator('div').filter({ hasText: /^5$/ }).click();
|
||||
await page.locator('div').filter({ hasText: /^5$/ }).press('Control+c');
|
||||
await page.locator('div').filter({ hasText: /^5$/ }).press('Control+Shift+v');
|
||||
|
||||
//assert
|
||||
// assert
|
||||
await expect(page.getByTestId('entry-2')).toBeVisible();
|
||||
await expect(page.getByTestId('entry-2').getByTestId('block__title')).toHaveValue('test');
|
||||
await expect(page.getByTestId('entry-2').locator('#event-block')).toContainText('4.1');
|
||||
@@ -46,17 +46,17 @@ test('Move', async ({ page }) => {
|
||||
await page.getByRole('button', { name: 'Clear rundown' }).click();
|
||||
await page.getByRole('button', { name: 'Delete all' }).click();
|
||||
|
||||
//create events
|
||||
// create events
|
||||
await page.getByRole('button', { name: 'Create Event' }).click();
|
||||
await page.getByRole('button', { name: 'Event' }).nth(4).click();
|
||||
await page.getByRole('button', { name: 'Event', exact: true }).nth(1).click();
|
||||
|
||||
//copy move down
|
||||
// copy move down
|
||||
await page.getByTestId('entry-1').locator('#event-block').getByText('1').click();
|
||||
await page.getByTestId('entry-1').locator('#event-block div').filter({ hasText: '1' }).press('Alt+Control+ArrowDown');
|
||||
await expect(page.getByTestId('entry-2').locator('#event-block')).toContainText('1');
|
||||
|
||||
//copy move up
|
||||
// copy move up
|
||||
await page.getByTestId('entry-3').locator('#event-block').getByText('3').click();
|
||||
await page.getByTestId('entry-3').locator('#event-block div').filter({ hasText: '3' }).press('Alt+Control+ArrowUp');
|
||||
await page.getByTestId('entry-2').locator('div').filter({ hasText: /^3$/ }).press('Alt+Control+ArrowUp');
|
||||
@@ -70,18 +70,25 @@ test('Add block', async ({ page }) => {
|
||||
await page.getByRole('button', { name: 'Clear rundown' }).click();
|
||||
await page.getByRole('button', { name: 'Delete all' }).click();
|
||||
|
||||
//create events
|
||||
// create events
|
||||
await page.getByRole('button', { name: 'Create Event' }).click();
|
||||
await page.getByPlaceholder(/event title/i).fill('test');
|
||||
await page.getByTestId('entry-1').click();
|
||||
await page.getByTestId('block__title').press('Escape');
|
||||
|
||||
//add block below
|
||||
// add block below
|
||||
await page.getByTestId('entry-1').locator('#event-block div').filter({ hasText: '1' }).press('Alt+B');
|
||||
await expect(page.getByPlaceholder('Block title')).toBeVisible();
|
||||
await page.getByPlaceholder(/block title/i).fill('block below');
|
||||
|
||||
//add block above
|
||||
// add block above
|
||||
await page.getByTestId('entry-1').locator('#event-block div').filter({ hasText: '1' }).press('Alt+Shift+B');
|
||||
await expect(page.getByTestId('entry-0').getByTestId('block__title')).toBeVisible();
|
||||
await page
|
||||
.getByPlaceholder(/block title/i)
|
||||
.first()
|
||||
.fill('block above');
|
||||
|
||||
await expect(page.getByTestId(/block__title/i).first()).toHaveValue('block above');
|
||||
await expect(page.getByTestId(/block__title/i).nth(2)).toHaveValue('block below');
|
||||
await expect(page.getByTestId('entry-1').getByTestId(/block__title/)).toHaveValue('test');
|
||||
});
|
||||
|
||||
test('Add delay', async ({ page }) => {
|
||||
|
||||
Vendored
+14
-14
@@ -31,7 +31,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 36000000,
|
||||
"timeEnd": 37200000,
|
||||
@@ -60,7 +60,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 37500000,
|
||||
"timeEnd": 38700000,
|
||||
@@ -89,7 +89,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 39000000,
|
||||
"timeEnd": 40200000,
|
||||
@@ -118,7 +118,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 40500000,
|
||||
"timeEnd": 41700000,
|
||||
@@ -147,7 +147,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 42000000,
|
||||
"timeEnd": 43200000,
|
||||
@@ -192,7 +192,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 47100000,
|
||||
"timeEnd": 48300000,
|
||||
@@ -221,7 +221,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 48600000,
|
||||
"timeEnd": 49800000,
|
||||
@@ -250,7 +250,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 50100000,
|
||||
"timeEnd": 51300000,
|
||||
@@ -279,7 +279,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 51600000,
|
||||
"timeEnd": 52800000,
|
||||
@@ -308,7 +308,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 53100000,
|
||||
"timeEnd": 54300000,
|
||||
@@ -353,7 +353,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 56100000,
|
||||
"timeEnd": 57300000,
|
||||
@@ -382,7 +382,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 57600000,
|
||||
"timeEnd": 58800000,
|
||||
@@ -411,7 +411,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 59100000,
|
||||
"timeEnd": 60300000,
|
||||
@@ -440,7 +440,7 @@
|
||||
"endAction": "none",
|
||||
"timerType": "count-down",
|
||||
"countToEnd": false,
|
||||
"linkStart": null,
|
||||
"linkStart": false,
|
||||
"timeStrategy": "lock-end",
|
||||
"timeStart": 60600000,
|
||||
"timeEnd": 61800000,
|
||||
|
||||
Reference in New Issue
Block a user