refactor: migrate project upload (#796)

* refactor: migrate project upload
This commit is contained in:
Carlos Valente
2024-03-01 22:59:00 +01:00
committed by GitHub
parent 8df419d835
commit 5b01329c37
54 changed files with 698 additions and 1134 deletions
+6 -8
View File
@@ -7,19 +7,17 @@ test('test project file upload', async ({ page }) => {
await page.getByRole('button', { name: 'Rundown menu' }).click();
await page.getByRole('menuitem', { name: 'Delete all events' }).click();
await page.getByRole('button', { name: 'Import project file' }).click();
await page.getByRole('button', { name: 'Application settings' }).click();
await page.getByRole('button', { name: 'Project', exact: true }).click();
// workaround to upload file on hidden input
// https://playwright.dev/docs/api/class-filechooser
const [fileChooser] = await Promise.all([
page.waitForEvent('filechooser'),
await page.getByText('Click to select Ontime project').click(),
]);
const fileChooserPromise = page.waitForEvent('filechooser');
await page.getByRole('button', { name: 'Import' }).click();
const fileChooser = await fileChooserPromise;
await fileChooser.setFiles(fileToUpload);
// there is only one step for normal imports
await page.getByRole('button', { name: 'Import' }).click();
await page.getByRole('button', { name: 'close' }).click();
// asset test events
await page.getByText('Albania').click();
+1 -1
View File
@@ -4,7 +4,7 @@ test('test aliases feature, it should redirect to given alias', async ({ page })
await page.goto('http://localhost:4001/editor');
// open settings
await page.getByRole('button', { name: 'Settings' }).click();
await page.getByRole('button', { name: 'Settings deprecated' }).click();
await page.getByRole('tab', { name: 'URL Aliases' }).click();
// create alias