Skip to content
Snippets Groups Projects
Commit f1c3127b authored by OZGCloud's avatar OZGCloud
Browse files

OZG-7237 separate steps for delete download folder and download file

parent 776f00c2
No related branches found
No related tags found
No related merge requests found
......@@ -40,18 +40,12 @@ import {
deleteDownloadFolder,
dropCollections,
interceptWithResponse,
wait,
} from '../../../support/cypress-helper';
import { exist, notExist } from '../../../support/cypress.util';
import { LinkRelE2E } from '../../../support/linkrels';
import { removeLinkFromResource } from '../../../support/tech.util';
import { initUsermanagerUsers, loginAsSabine } from '../../../support/user-util';
import {
buildVorgang,
createVorgang,
initVorgaenge,
objectIds,
} from '../../../support/vorgang-util';
import { buildVorgang, createVorgang, initVorgaenge, objectIds } from '../../../support/vorgang-util';
describe('Postfach Nachrichten', () => {
const vorgangList: VorgangListE2EComponent = new MainPage().getVorgangList();
......@@ -89,9 +83,7 @@ describe('Postfach Nachrichten', () => {
});
function modifyResponse(req: CyHttpMessages.IncomingHttpRequest): void {
req.reply((res) =>
res.send(removeLinkFromResource(res.body, LinkRelE2E.POSTFACH_NACHRICHTEN)),
);
req.reply((res) => res.send(removeLinkFromResource(res.body, LinkRelE2E.POSTFACH_NACHRICHTEN)));
}
it('navigate to vorgangDetail', () => {
......@@ -116,25 +108,23 @@ describe('Postfach Nachrichten', () => {
exist(postfachMailContainer.getDownloadButtonWithLabel());
});
it(
'should have 1 file in download folder after click on download',
{ defaultCommandTimeout: 30000 },
() => {
it('should delete download folder and click download', { defaultCommandTimeout: 30000 }, () => {
deleteDownloadFolder();
postfachMailContainer.getDownloadButtonWithLabel().click();
waitForSpinnerToDisappear();
});
it('should have 1 file in download folder', () => {
countDownloadFiles().then((count) => {
expect(count).to.eq(1);
});
},
);
});
});
describe('by download button on nachrichten details page', () => {
it('should show an overview of all nachrichten after clicking on nachricht', () => {
postfachMailContainer.getList().click();
wait(3000);
waitForSpinnerToDisappear();
exist(postfachMailPage.getRoot());
});
......@@ -143,19 +133,17 @@ describe('Postfach Nachrichten', () => {
exist(postfachMailPage.getDownloadButton());
});
it(
'should have 1 file in download folder after click on download',
{ defaultCommandTimeout: 30000 },
() => {
it('should delete download folder and click download', { defaultCommandTimeout: 30000 }, () => {
deleteDownloadFolder();
postfachMailPage.getDownloadButton().click();
wait(3000);
waitForSpinnerToDisappear();
});
it('should have 1 file in download folder', () => {
countDownloadFiles().then((count) => {
expect(count).to.eq(1);
});
},
);
});
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment