Skip to content

Commit

Permalink
Fix revise test
Browse files Browse the repository at this point in the history
  • Loading branch information
fhennig committed Dec 11, 2024
1 parent 2a282d3 commit d8d30a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions website/tests/pages/revise/revise.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ export class RevisePage {
});
await expect(this.page.getByTestId('discard_metadata_file')).toBeEnabled();
}

public async downloadMetadataTemplate() {

Check failure on line 37 in website/tests/pages/revise/revise.page.ts

View workflow job for this annotation

GitHub Actions / Check format and types

Member downloadMetadataTemplate should be declared before all private instance method definitions
const downloadPromise = this.page.waitForEvent('download');
await this.page.getByText('a template', { exact: true }).click();
return downloadPromise;
}
}
4 changes: 1 addition & 3 deletions website/tests/pages/submission/template.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ test.describe('The submit page', () => {

test('should download the metadata file template for revision', async ({
revisePage,
submitPage,
loginAsTestUser,
browserName,
}) => {
Expand All @@ -33,8 +32,7 @@ test.describe('The submit page', () => {
const { groupId } = await loginAsTestUser();
await revisePage.goto(groupId);

// TODO 'submitPage' here seems wrong? Investigate
const download = await submitPage.downloadMetadataTemplate();
const download = await revisePage.downloadMetadataTemplate();

expect(download.suggestedFilename()).toBe('Test_Dummy_Organism_metadata_revision_template.tsv');
const content = await getDownloadedContent(download);
Expand Down

0 comments on commit d8d30a8

Please sign in to comment.