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

OZG-7237 fix Revoke test for EA

parent 6fc6e6ef
No related branches found
No related tags found
No related merge requests found
...@@ -27,20 +27,10 @@ import localeDeExtra from '@angular/common/locales/extra/de'; ...@@ -27,20 +27,10 @@ import localeDeExtra from '@angular/common/locales/extra/de';
import { VorgangFormularButtonsE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-formular-buttons.e2e.components'; import { VorgangFormularButtonsE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-formular-buttons.e2e.components';
import { dropCollections } from 'apps/alfa-e2e/src/support/cypress-helper'; import { dropCollections } from 'apps/alfa-e2e/src/support/cypress-helper';
import { loginAsEmil } from 'apps/alfa-e2e/src/support/user-util'; import { loginAsEmil } from 'apps/alfa-e2e/src/support/user-util';
import { import { buildVorgang, createVorgang, initVorgaenge, objectIds } from 'apps/alfa-e2e/src/support/vorgang-util';
buildVorgang,
createVorgang,
initVorgaenge,
objectIds,
} from 'apps/alfa-e2e/src/support/vorgang-util';
import { SnackBarE2EComponent } from '../../../components/ui/snackbar.e2e.component'; import { SnackBarE2EComponent } from '../../../components/ui/snackbar.e2e.component';
import { VorgangListE2EComponent } from '../../../components/vorgang/vorgang-list.e2e.component'; import { VorgangListE2EComponent } from '../../../components/vorgang/vorgang-list.e2e.component';
import { import { VorgangE2E, VorgangMessagesE2E, VorgangStatusE2E, vorgangStatusLabelE2E } from '../../../model/vorgang';
VorgangE2E,
VorgangMessagesE2E,
VorgangStatusE2E,
vorgangStatusLabelE2E,
} from '../../../model/vorgang';
import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po';
import { VorgangPage } from '../../../page-objects/vorgang.po'; import { VorgangPage } from '../../../page-objects/vorgang.po';
import { contains, exist, haveText, notExist } from '../../../support/cypress.util'; import { contains, exist, haveText, notExist } from '../../../support/cypress.util';
...@@ -53,8 +43,7 @@ describe('Vorgang Zurueckholen', () => { ...@@ -53,8 +43,7 @@ describe('Vorgang Zurueckholen', () => {
const snackBar: SnackBarE2EComponent = mainPage.getSnackBar(); const snackBar: SnackBarE2EComponent = mainPage.getSnackBar();
const vorgangPage: VorgangPage = new VorgangPage(); const vorgangPage: VorgangPage = new VorgangPage();
const vorgangFormularButtons: VorgangFormularButtonsE2EComponent = const vorgangFormularButtons: VorgangFormularButtonsE2EComponent = vorgangPage.getFormularButtons();
vorgangPage.getFormularButtons();
const vorgangZurueckholen: VorgangE2E = { const vorgangZurueckholen: VorgangE2E = {
...createVorgang(), ...createVorgang(),
...@@ -89,10 +78,7 @@ describe('Vorgang Zurueckholen', () => { ...@@ -89,10 +78,7 @@ describe('Vorgang Zurueckholen', () => {
describe('by button', () => { describe('by button', () => {
it('should have status Verworfen', () => { it('should have status Verworfen', () => {
haveText( haveText(vorgangPage.getVorgangDetailHeader().getStatus(), vorgangStatusLabelE2E[vorgangZurueckholen.status]);
vorgangPage.getVorgangDetailHeader().getStatus(),
vorgangStatusLabelE2E[vorgangZurueckholen.status],
);
}); });
it('should show snackBar', () => { it('should show snackBar', () => {
...@@ -110,10 +96,7 @@ describe('Vorgang Zurueckholen', () => { ...@@ -110,10 +96,7 @@ describe('Vorgang Zurueckholen', () => {
}); });
it('should have status Neu', () => { it('should have status Neu', () => {
haveText( haveText(vorgangPage.getVorgangDetailHeader().getStatus(), vorgangStatusLabelE2E[VorgangStatusE2E.NEU]);
vorgangPage.getVorgangDetailHeader().getStatus(),
vorgangStatusLabelE2E[VorgangStatusE2E.NEU],
);
}); });
it('should have button annehmen und verwerfen', () => { it('should have button annehmen und verwerfen', () => {
...@@ -128,10 +111,7 @@ describe('Vorgang Zurueckholen', () => { ...@@ -128,10 +111,7 @@ describe('Vorgang Zurueckholen', () => {
}); });
it('should have status Neu', () => { it('should have status Neu', () => {
haveText( haveText(vorgangList.getListItem(vorgangZurueckholen.name).getStatus(), vorgangStatusLabelE2E[VorgangStatusE2E.NEU]);
vorgangList.getListItem(vorgangZurueckholen.name).getStatus(),
vorgangStatusLabelE2E[VorgangStatusE2E.NEU],
);
}); });
}); });
}); });
...@@ -145,11 +125,8 @@ describe('Vorgang Zurueckholen', () => { ...@@ -145,11 +125,8 @@ describe('Vorgang Zurueckholen', () => {
}); });
describe('by icon-button', () => { describe('by icon-button', () => {
it('should have status Neu', () => { it('should have status Verworfen', () => {
haveText( haveText(vorgangPage.getVorgangDetailHeader().getStatus(), vorgangStatusLabelE2E[VorgangStatusE2E.VERWORFEN]);
vorgangPage.getVorgangDetailHeader().getStatus(),
vorgangStatusLabelE2E[vorgangZurueckholenRevoke.status],
);
}); });
it('should show snackBar', () => { it('should show snackBar', () => {
...@@ -170,10 +147,7 @@ describe('Vorgang Zurueckholen', () => { ...@@ -170,10 +147,7 @@ describe('Vorgang Zurueckholen', () => {
it('should show status Verworfen after progressbar dissapear', () => { it('should show status Verworfen after progressbar dissapear', () => {
notExist(vorgangPage.getProgressBar()); notExist(vorgangPage.getProgressBar());
haveText( haveText(vorgangPage.getVorgangDetailHeader().getStatus(), vorgangStatusLabelE2E[VorgangStatusE2E.VERWORFEN]);
vorgangPage.getVorgangDetailHeader().getStatus(),
vorgangStatusLabelE2E[VorgangStatusE2E.VERWORFEN],
);
}); });
it('should have button zurueckholen', () => { it('should have button zurueckholen', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment