Skip to content

Commit

Permalink
Skip webkit for download test
Browse files Browse the repository at this point in the history
  • Loading branch information
NotWoods committed Aug 9, 2024
1 parent 3cfbb7b commit 85bf75d
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions tests/e2e/export.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,28 @@ test.describe('Editor Export', () => {
await page.goto('/editor');
});

test('export selected size and max size', async ({ page }) => {
test('export selected size and max size', async ({ page, browserName }) => {
// Open export dialog
await page.getByRole('button', { name: 'Export' }).click();
await expect(page.getByRole('dialog', { name: 'Export' })).toBeVisible();

// Check 128x128 in addition to the default Max size
await page.getByLabel('128x128').check();

const downloadMaxSize = page.waitForEvent(
'download',
(download) => download.suggestedFilename() === 'maskable_icon.png',
);
const download128 = page.waitForEvent(
'download',
(download) => download.suggestedFilename() === 'maskable_icon_x128.png',
);
await page.getByRole('button', { name: 'Download' }).click();
if (browserName !== 'webkit') {
const downloadMaxSize = page.waitForEvent(
'download',
(download) => download.suggestedFilename() === 'maskable_icon.png',
);
const download128 = page.waitForEvent(
'download',
(download) => download.suggestedFilename() === 'maskable_icon_x128.png',
);
await page.getByRole('button', { name: 'Download' }).click();

await downloadMaxSize;
await download128;
await downloadMaxSize;
await download128;
}
});

test('JSON preview shows manifest corresponding to selected checkboxes', async ({
Expand Down

0 comments on commit 85bf75d

Please sign in to comment.