mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 08:53:51 +00:00
refactor: restructure settings
refactor: migrate react components
This commit is contained in:
@@ -9,8 +9,12 @@ const fileToDownload = 'e2e/tests/fixtures/tmp/';
|
||||
test('project file upload', async ({ page }) => {
|
||||
await page.goto('http://localhost:4001/editor');
|
||||
|
||||
if (await page.getByText('Welcome to Ontime')) {
|
||||
await page.getByRole('button', { name: 'Close' }).click();
|
||||
// Try to close welcome modal if it appears (times out silently if not present)
|
||||
try {
|
||||
await page.getByText('Welcome to Ontime').waitFor({ timeout: 1000 });
|
||||
await page.getByRole('button', { name: 'close welcome modal' }).click();
|
||||
} catch {
|
||||
// Modal wasn't shown, continue with the test
|
||||
}
|
||||
|
||||
await page.getByRole('button', { name: 'Edit' }).click();
|
||||
|
||||
@@ -9,6 +9,6 @@ test('cuesheet displays events', async ({ page }) => {
|
||||
await expect(page.locator('#cuesheet')).toBeVisible();
|
||||
|
||||
// there should be 16 rows in the table (same as the amount of events in the rundown)
|
||||
const rowCount = await page.locator('#cuesheet tbody tr').count();
|
||||
expect(rowCount).toBe(16);
|
||||
await expect(page.getByTestId('cuesheet-event')).toHaveCount(14);
|
||||
await expect(page.getByTestId('cuesheet-block')).toHaveCount(2);
|
||||
});
|
||||
|
||||
@@ -5,11 +5,9 @@ test('URL preset feature, it should redirect to given URL', async ({ page }) =>
|
||||
|
||||
// open settings
|
||||
await page.getByRole('button', { name: 'Toggle settings' }).click();
|
||||
await page.getByRole('button', { name: 'Feature Settings' }).click();
|
||||
await page.getByRole('button', { name: 'URL Presets' }).click();
|
||||
|
||||
// create preset
|
||||
await page.getByTestId('url-preset-form').scrollIntoViewIfNeeded();
|
||||
|
||||
await page.getByTestId('url-preset-form').getByRole('button', { name: 'New' }).scrollIntoViewIfNeeded();
|
||||
await page.getByTestId('url-preset-form').getByRole('button', { name: 'New' }).click();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user