Rundown modes (#864)

* refactor: simplify settings

* refactor: quick add around selection

* refactor: no action menu in delay block

* refactor: no action menu in event block

* style: context menu dark

* refactor: context menu actions
This commit is contained in:
Carlos Valente
2024-04-02 20:09:27 +02:00
committed by GitHub
parent 01000f8837
commit 10852eecdd
22 changed files with 276 additions and 331 deletions
+10 -11
View File
@@ -4,27 +4,26 @@ test('CRUD operations on the rundown', async ({ page }) => {
await page.goto('http://localhost:4001/editor');
// clear rundown
await page.getByRole('button', { name: 'Run mode' }).click();
await page.getByRole('button', { name: 'Rundown menu' }).click();
await page.getByRole('menuitem', { name: 'Delete all events' }).click();
await page.getByRole('button', { name: 'Edit mode' }).click();
await page.getByRole('button', { name: 'Clear rundown' }).click();
// create event from the rundown empty button
await page.getByRole('button', { name: 'Create Event' }).click();
// create blocks using the quick add buttons
await page.getByRole('button', { name: 'Block' }).click();
await page.getByRole('button', { name: 'Delay' }).click();
await page.getByTestId('quick-add-event').click();
await page.getByRole('button', { name: 'Block' }).nth(1).click();
await page.getByRole('button', { name: 'Delay' }).nth(1).click();
await page.getByRole('button', { name: 'Event', exact: true }).nth(1).click();
// test quick add options - start is last end
// test quick add options - star2+5-t is last end
await page.getByTestId('entry-2').getByTestId('time-input-duration').fill('20m');
await page.getByTestId('quick-add-event').click();
await expect(page.getByLabel('Link to previous')).toBeChecked();
await page.getByRole('button', { name: 'Event', exact: true }).nth(1).click();
await expect(page.getByLabel('Link to previous').nth(1)).toBeChecked();
expect(await page.getByTestId('entry-3').getByTestId('time-input-timeStart').inputValue()).toContain('00:30:00');
// test quick add options - event is public
await expect(page.getByLabel('Event is public')).toBeChecked();
await page.getByTestId('quick-add-event').click();
await expect(page.getByLabel('Event is public').nth(1)).toBeChecked();
await page.getByRole('button', { name: 'Event', exact: true }).nth(1).click();
await expect(page.getByTestId('entry-4').locator('#block-status')).toHaveAttribute('data-ispublic', 'true');
});