Skip to content

Commit

Permalink
tests(website): skip download tests in webkit
Browse files Browse the repository at this point in the history
webkit seems to ignore the content disposition header.
It doesn't download the file, instead it displays it.

resolves #2963
  • Loading branch information
fengelniederhammer committed Oct 7, 2024
1 parent 006c181 commit 1701df8
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion website/tests/pages/submission/template.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import type { Download } from '@playwright/test';
import { expect, test } from '../../e2e.fixture.ts';

test.describe('The submit page', () => {
test('should download the metadata file template for submission', async ({ submitPage, loginAsTestUser }) => {
test('should download the metadata file template for submission', async ({
submitPage,
loginAsTestUser,
browserName,
}) => {
skipDownloadTestInWebkit(browserName);

const { groupId } = await loginAsTestUser();
await submitPage.goto(groupId);

Expand All @@ -18,7 +24,10 @@ test.describe('The submit page', () => {
revisePage,
submitPage,
loginAsTestUser,
browserName,
}) => {
skipDownloadTestInWebkit(browserName);

const { groupId } = await loginAsTestUser();
await revisePage.goto(groupId);

Expand All @@ -37,4 +46,12 @@ test.describe('The submit page', () => {
readable.on('end', () => resolve(data));
});
}

function skipDownloadTestInWebkit(browserName: 'chromium' | 'firefox' | 'webkit') {
test.skip(
browserName === 'webkit',
'webkit seems to ignore the content disposition header.\n' +
"It doesn't download the file, instead it displays it.",
);
}
});

0 comments on commit 1701df8

Please sign in to comment.