refactor: small tweaks and fixes

This commit is contained in:
Carlos Valente
2024-03-06 22:42:20 +01:00
committed by GitHub
parent 8196ea584d
commit d22cc48565
61 changed files with 401 additions and 198 deletions
+9 -4
View File
@@ -1,4 +1,4 @@
import { test } from '@playwright/test';
import { test, expect } from '@playwright/test';
const fileToUpload = 'e2e/tests/fixtures/test-db.json';
@@ -20,7 +20,12 @@ test('test project file upload', async ({ page }) => {
await page.getByRole('button', { name: 'close' }).click();
// asset test events
await page.getByText('Albania').click();
await page.getByText('Latvia').click();
await page.getByText('Lithuania').click();
const firstTitle = page.getByTestId('entry-1').getByTestId('block__title')
await expect(firstTitle).toHaveValue('Albania');
const secondTitle = page.getByTestId('entry-2').getByTestId('block__title')
await expect(secondTitle).toHaveValue('Latvia');
const thirdTitle = page.getByTestId('entry-3').getByTestId('block__title')
await expect(thirdTitle).toHaveValue('Lithuania');
});
+4 -4
View File
@@ -64,11 +64,11 @@ test('delays are show correctly', async ({ page }) => {
await page.getByTestId('rundown').getByTestId('time-input-duration').click();
await page.getByTestId('rundown').getByTestId('time-input-duration').fill('10');
await page.getByTestId('rundown').getByTestId('time-input-duration').press('Enter');
await page.getByText('Event title').click();
await page.getByPlaceholder('Event title').fill('test');
await page.getByPlaceholder('Event title').press('Enter');
await page.getByTestId('block__title').click();
await page.getByTestId('block__title').fill('test');
await page.getByTestId('block__title').press('Enter');
await page.getByTestId('entry-1').getByText('test').click({ button: 'right' });
await page.locator('#event-block').getByText('1').click({ button: 'right' });
await page.getByRole('menuitem', { name: 'Toggle public' }).click();
// add a delay