mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 22:24:11 +00:00
refactor: migrate project upload (#796)
* refactor: migrate project upload
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user