diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/kommentar-attachment/kommentar-attachment.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/kommentar-attachment/kommentar-attachment.e2e-spec.ts index 7dc5e038851cde3f74ca2a8dcae25d86e7d17ae9..aae9ce6f007151e53f039eb47cdfbb07a1ab0c04 100644 --- a/goofy-client/apps/goofy-e2e/src/integration/main-tests/kommentar-attachment/kommentar-attachment.e2e-spec.ts +++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/kommentar-attachment/kommentar-attachment.e2e-spec.ts @@ -26,7 +26,7 @@ import { UserE2E } from '../../../model/user'; import { VorgangE2E } from '../../../model/vorgang'; import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; import { VorgangPage } from '../../../page-objects/vorgang.po'; -import { dropCollections } from '../../../support/cypress-helper'; +import { dropCollections, readFileFromDownloads } from '../../../support/cypress-helper'; import { exist, notExist } from '../../../support/cypress.util'; import { getUserSabine, loginAsSabine } from '../../../support/user-util'; import { createVorgang, initVorgang } from '../../../support/vorgang-util'; @@ -121,4 +121,25 @@ describe('Kommentar attachments', () => { notExist(attachmentList.getItem(TEST_FILE_WITHOUT_CONTENT).getRoot()); }); }); + + describe('Download Kommentar attachments', () => { + it('should upload attachment', () => { + kommentarContainer.getRoot().click(); + uploadFile(attachmentContainer.getUploadInput(), TEST_FILE_WITH_CONTENT); + waitForSpinnerToDisappear(); + + kommentarContainer.getFormularSpeichernButton().click(); + waitForSpinnerToDisappear(); + + exist(attachmentList.getItem(TEST_FILE_WITH_CONTENT).getRoot()); + }); + + it('should download uploaded attachment', () => { + attachmentList.getItem(TEST_FILE_WITH_CONTENT).getDownloadButton().click(); + waitForSpinnerToDisappear(); + + exist(readFileFromDownloads(TEST_FILE_WITH_CONTENT)); + }); + }); + });