refactor: restructure settings

refactor: migrate react components
This commit is contained in:
Carlos Valente
2025-07-04 12:13:06 +02:00
parent a8ea1080f3
commit 5600235ba1
93 changed files with 711 additions and 906 deletions
+6 -2
View File
@@ -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();
+2 -2
View File
@@ -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);
});
+1 -3
View File
@@ -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();