Url presets (#807)

This commit is contained in:
Carlos Valente
2024-03-08 23:10:43 +01:00
committed by GitHub
parent 10d7273ec0
commit ad71793cf3
54 changed files with 544 additions and 1109 deletions
+4 -4
View File
@@ -13,19 +13,19 @@ test('test project file upload', async ({ page }) => {
// workaround to upload file on hidden input
// https://playwright.dev/docs/api/class-filechooser
const fileChooserPromise = page.waitForEvent('filechooser');
await page.getByRole('button', { name: 'Import' }).click();
await page.getByRole('button', { name: 'Import', exact: true }).click();
const fileChooser = await fileChooserPromise;
await fileChooser.setFiles(fileToUpload);
await page.getByRole('button', { name: 'close' }).click();
// asset test events
const firstTitle = page.getByTestId('entry-1').getByTestId('block__title')
const firstTitle = page.getByTestId('entry-1').getByTestId('block__title');
await expect(firstTitle).toHaveValue('Albania');
const secondTitle = page.getByTestId('entry-2').getByTestId('block__title')
const secondTitle = page.getByTestId('entry-2').getByTestId('block__title');
await expect(secondTitle).toHaveValue('Latvia');
const thirdTitle = page.getByTestId('entry-3').getByTestId('block__title')
const thirdTitle = page.getByTestId('entry-3').getByTestId('block__title');
await expect(thirdTitle).toHaveValue('Lithuania');
});