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';
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 { loginAsEmil } from 'apps/alfa-e2e/src/support/user-util';
import {
buildVorgang,
createVorgang,
initVorgaenge,
objectIds,
} from 'apps/alfa-e2e/src/support/vorgang-util';
import { buildVorgang, createVorgang, initVorgaenge, objectIds } from 'apps/alfa-e2e/src/support/vorgang-util';
import { SnackBarE2EComponent } from '../../../components/ui/snackbar.e2e.component';
import { VorgangListE2EComponent } from '../../../components/vorgang/vorgang-list.e2e.component';
import {
VorgangE2E,
VorgangMessagesE2E,
VorgangStatusE2E,
vorgangStatusLabelE2E,
} from '../../../model/vorgang';
import { VorgangE2E, VorgangMessagesE2E, VorgangStatusE2E, vorgangStatusLabelE2E } from '../../../model/vorgang';
import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po';
import { VorgangPage } from '../../../page-objects/vorgang.po';
import { contains, exist, haveText, notExist } from '../../../support/cypress.util';
......@@ -53,8 +43,7 @@ describe('Vorgang Zurueckholen', () => {
const snackBar: SnackBarE2EComponent = mainPage.getSnackBar();
const vorgangPage: VorgangPage = new VorgangPage();
const vorgangFormularButtons: VorgangFormularButtonsE2EComponent =
vorgangPage.getFormularButtons();
const vorgangFormularButtons: VorgangFormularButtonsE2EComponent = vorgangPage.getFormularButtons();
const vorgangZurueckholen: VorgangE2E = {
...createVorgang(),
......@@ -89,10 +78,7 @@ describe('Vorgang Zurueckholen', () => {
describe('by button', () => {
it('should have status Verworfen', () => {
haveText(
vorgangPage.getVorgangDetailHeader().getStatus(),
vorgangStatusLabelE2E[vorgangZurueckholen.status],
);
haveText(vorgangPage.getVorgangDetailHeader().getStatus(), vorgangStatusLabelE2E[vorgangZurueckholen.status]);
});
it('should show snackBar', () => {
......@@ -110,10 +96,7 @@ describe('Vorgang Zurueckholen', () => {
});
it('should have status Neu', () => {
haveText(
vorgangPage.getVorgangDetailHeader().getStatus(),
vorgangStatusLabelE2E[VorgangStatusE2E.NEU],
);
haveText(vorgangPage.getVorgangDetailHeader().getStatus(), vorgangStatusLabelE2E[VorgangStatusE2E.NEU]);
});
it('should have button annehmen und verwerfen', () => {
......@@ -128,10 +111,7 @@ describe('Vorgang Zurueckholen', () => {
});
it('should have status Neu', () => {
haveText(
vorgangList.getListItem(vorgangZurueckholen.name).getStatus(),
vorgangStatusLabelE2E[VorgangStatusE2E.NEU],
);
haveText(vorgangList.getListItem(vorgangZurueckholen.name).getStatus(), vorgangStatusLabelE2E[VorgangStatusE2E.NEU]);
});
});
});
......@@ -145,11 +125,8 @@ describe('Vorgang Zurueckholen', () => {
});
describe('by icon-button', () => {
it('should have status Neu', () => {
haveText(
vorgangPage.getVorgangDetailHeader().getStatus(),
vorgangStatusLabelE2E[vorgangZurueckholenRevoke.status],
);
it('should have status Verworfen', () => {
haveText(vorgangPage.getVorgangDetailHeader().getStatus(), vorgangStatusLabelE2E[VorgangStatusE2E.VERWORFEN]);
});
it('should show snackBar', () => {
......@@ -170,10 +147,7 @@ describe('Vorgang Zurueckholen', () => {
it('should show status Verworfen after progressbar dissapear', () => {
notExist(vorgangPage.getProgressBar());
haveText(
vorgangPage.getVorgangDetailHeader().getStatus(),
vorgangStatusLabelE2E[VorgangStatusE2E.VERWORFEN],
);
haveText(vorgangPage.getVorgangDetailHeader().getStatus(), vorgangStatusLabelE2E[VorgangStatusE2E.VERWORFEN]);
});
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