mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
Quick options (#814)
* refactor: link start is quick option * refactor: add default duration * chore: use last time by default
This commit is contained in:
@@ -67,9 +67,7 @@ test('delays are show correctly', async ({ page }) => {
|
||||
await page.getByTestId('block__title').click();
|
||||
await page.getByTestId('block__title').fill('test');
|
||||
await page.getByTestId('block__title').press('Enter');
|
||||
|
||||
await page.locator('#event-block').getByText('1').click({ button: 'right' });
|
||||
await page.getByRole('menuitem', { name: 'Toggle public' }).click();
|
||||
await expect(page.getByTestId('entry-1').locator('#block-status')).toHaveAttribute('data-ispublic', 'true');
|
||||
|
||||
// add a delay
|
||||
await page.getByRole('button', { name: 'Rundown menu' }).click();
|
||||
|
||||
@@ -18,12 +18,12 @@ test('CRUD operations on the rundown', async ({ page }) => {
|
||||
|
||||
// test quick add options - start is last end
|
||||
await page.getByTestId('entry-2').getByTestId('time-input-duration').fill('20m');
|
||||
await page.getByText('Start time is last end').click();
|
||||
await page.getByTestId('quick-add-event').click();
|
||||
expect(await page.getByTestId('entry-3').getByTestId('time-input-timeStart').inputValue()).toContain('00:20:00');
|
||||
await expect(page.getByLabel('Link to previous')).toBeChecked();
|
||||
expect(await page.getByTestId('entry-3').getByTestId('time-input-timeStart').inputValue()).toContain('00:30:00');
|
||||
|
||||
// test quick add options - event is public
|
||||
await page.locator('label').filter({ hasText: 'Event is public' }).click();
|
||||
await expect(page.getByLabel('Event is public')).toBeChecked();
|
||||
await page.getByTestId('quick-add-event').click();
|
||||
|
||||
await expect(page.getByTestId('entry-4').locator('#block-status')).toHaveAttribute('data-ispublic', 'true');
|
||||
|
||||
@@ -13,14 +13,12 @@ test('smoke test operator', async ({ page }) => {
|
||||
await page.getByTestId('time-input-duration').fill('1m');
|
||||
await page.getByTestId('time-input-duration').press('Enter');
|
||||
|
||||
await page.getByText('Start time is last end').click();
|
||||
await page.getByTestId('quick-add-event').click();
|
||||
await page.getByTestId('entry-2').getByTestId('lock__duration').click();
|
||||
await page.getByTestId('entry-2').getByTestId('time-input-duration').fill('1m');
|
||||
await page.getByTestId('entry-2').getByTestId('time-input-duration').press('Enter');
|
||||
await page.getByTestId('entry-2').getByTestId('time-input-duration').press('Enter');
|
||||
|
||||
await page.getByText('Start time is last end').click();
|
||||
await page.getByTestId('quick-add-event').click();
|
||||
await page.getByTestId('entry-3').getByTestId('lock__duration').click();
|
||||
await page.getByTestId('entry-3').getByTestId('time-input-duration').fill('1m');
|
||||
|
||||
Reference in New Issue
Block a user