Skip to content
Snippets Groups Projects
Commit fe0d25e1 authored by Martin Küster's avatar Martin Küster
Browse files

Merge branch 'OZG-7473-e2e' into 'OZG-7473-save-statistic-fields'

Ozg 7473 e2e

See merge request !107
parents 8335b8f9 60246384
No related branches found
No related tags found
2 merge requests!107Ozg 7473 e2e,!104Administration: Neu hinzugefügte Felder für Statistik speichern
Showing
with 353 additions and 101 deletions
export class AggregationMappingFormE2EComponent {
private readonly rootElement: string = 'aggregation-mapping-form';
private readonly root: string = 'aggregation-mapping-form';
private readonly nameInput: string = 'aggregation-mapping-name-text-input';
private readonly formEngineInput: string = 'form-engine-name-text-input';
private readonly formIdInput: string = 'form-id-text-input';
......@@ -11,8 +12,8 @@ export class AggregationMappingFormE2EComponent {
private readonly saveButton: string = 'save-button';
private readonly cancelButton: string = 'cancel-button';
public getRootElement(): Cypress.Chainable<Element> {
return cy.getTestElement(this.rootElement);
public getRoot(): Cypress.Chainable<Element> {
return cy.getTestElement(this.root);
}
public getNameInput(): Cypress.Chainable<Element> {
......
import { getTestElement } from '../../support/cypress-helper';
import { convertToDataTestId } from '../../support/tech-util';
export class AggregationMappingE2EComponent {
private readonly headerText: string = 'aggregation-mapping-header-text';
private readonly listItemName: string = 'list-item-name';
private readonly listItemFormEngineName: string = 'list-item-form-engine-name';
private readonly listItemFormId: string = 'list-item-form-id';
private readonly weitereFelderAuswertenButton = 'weitere-felder-auswerten-button';
public getHeaderText(): Cypress.Chainable<Element> {
return cy.getTestElement(this.headerText);
}
public getListItemName(): Cypress.Chainable<Element> {
return cy.getTestElementWithClass(this.listItemName);
public getWeitereFelderAuswertenButton(): Cypress.Chainable<Element> {
return cy.getTestElement(this.weitereFelderAuswertenButton);
}
public getListItem(name: string): AggregationMappingListItemE2EComponent {
return new AggregationMappingListItemE2EComponent(name);
}
}
export class AggregationMappingListItemE2EComponent {
private root: string;
private readonly listItemName: string = 'list-item-name';
private readonly listItemFormEngineName: string = 'list-item-form-engine-name';
private readonly listItemFormId: string = 'list-item-form-id';
constructor(root: string) {
this.root = convertToDataTestId(root);
}
public getListItemFormEngineName(): Cypress.Chainable<Element> {
return cy.getTestElementWithClass(this.listItemFormEngineName);
public getRoot(): Cypress.Chainable<Element> {
return getTestElement(this.root);
}
public getListItemFormId(): Cypress.Chainable<Element> {
return cy.getTestElementWithClass(this.listItemFormId);
public getName(): Cypress.Chainable<Element> {
return this.getRoot().findTestElementWithClass(this.listItemName);
}
public getWeitereFelderAuswertenButton(): Cypress.Chainable<Element> {
return cy.getTestElement(this.weitereFelderAuswertenButton);
public getFormEngineName(): Cypress.Chainable<Element> {
return this.getRoot().findTestElementWithClass(this.listItemFormEngineName);
}
public getFormId(): Cypress.Chainable<Element> {
return this.getRoot().findTestElementWithClass(this.listItemFormId);
}
}
import { AggregationMapping, FieldMapping } from '@admin-client/reporting-shared';
import { E2EAggregationMappingVerifier } from 'apps/admin-e2e/src/helper/aggregation-mapping/aggregation-mapping.verifier';
import { AggregationMappingFormE2EComponent } from '../../../components/aggregation-mapping/aggregation-mapping-form.e2e.component';
import { AggregationMappingE2EComponent } from '../../../components/aggregation-mapping/aggregation-mapping.e2e.component';
import { E2EAggregationMappingHelper } from '../../../helper/aggregation-mapping/aggregation-mapping.helper';
......@@ -7,10 +8,11 @@ import { exist, notExist } from '../../../support/cypress.util';
import { loginAsDaria } from '../../../support/user-util';
describe('Aggregation Mapping hinzufügen', () => {
const component: AggregationMappingE2EComponent = new AggregationMappingE2EComponent();
const formComponent: AggregationMappingFormE2EComponent = new AggregationMappingFormE2EComponent();
const page: AggregationMappingE2EComponent = new AggregationMappingE2EComponent();
const form: AggregationMappingFormE2EComponent = new AggregationMappingFormE2EComponent();
const helper: E2EAggregationMappingHelper = new E2EAggregationMappingHelper();
const verifier: E2EAggregationMappingVerifier = new E2EAggregationMappingVerifier();
const fieldMapping0: FieldMapping = {
sourcePath: '/path/to/source/a',
......@@ -40,43 +42,45 @@ describe('Aggregation Mapping hinzufügen', () => {
});
it('should show "Weitere Felder auswerten" button', () => {
exist(component.getWeitereFelderAuswertenButton());
helper.openStatistik();
exist(page.getWeitereFelderAuswertenButton());
});
it('should show form after button click', () => {
component.getWeitereFelderAuswertenButton().click();
page.getWeitereFelderAuswertenButton().click();
exist(formComponent.getRootElement());
exist(form.getRoot());
});
it('should navigate to aggregation mapping on cancel', () => {
formComponent.getCancelButton().click();
form.getCancelButton().click();
exist(component.getWeitereFelderAuswertenButton());
exist(page.getWeitereFelderAuswertenButton());
});
it('should add data field in form', () => {
component.getWeitereFelderAuswertenButton().click();
formComponent.getAddFieldButton().click();
page.getWeitereFelderAuswertenButton().click();
form.getAddFieldButton().click();
exist(formComponent.getDataFieldInput(1));
exist(form.getDataFieldInput(1));
});
it('should fill out form with two data fields', () => {
helper.enterForm(aggregationMapping);
helper.fillFormular(aggregationMapping);
helper.verifyForm(aggregationMapping);
verifier.verifyForm(aggregationMapping);
});
it('should delete data fields', () => {
formComponent.getDataFieldDeleteButton(0).click();
form.getDataFieldDeleteButton(0).click();
notExist(formComponent.getDataFieldInput(1));
notExist(form.getDataFieldInput(1));
});
it('should show aggregation mapping in list after save', () => {
formComponent.getSaveButton().click();
form.getSaveButton().click();
helper.verifyAggregationMappingInList(aggregationMapping);
verifier.verifyAggregationMappingInList(aggregationMapping);
});
});
import { AggregationMapping, FieldMapping } from '@admin-client/reporting-shared';
import { AggregationMappingFormE2EComponent } from '../../components/aggregation-mapping/aggregation-mapping-form.e2e.component';
import { enterWith } from '../../support/cypress.util';
export class E2EAggregationMappingExecutor {
private formComponent: AggregationMappingFormE2EComponent = new AggregationMappingFormE2EComponent();
public fillFormular(aggregationMapping: AggregationMapping): void {
enterWith(this.formComponent.getNameInput(), aggregationMapping.name);
enterWith(this.formComponent.getFormEngineInput(), aggregationMapping.formIdentifier.formEngineName);
enterWith(this.formComponent.getFormIdInput(), aggregationMapping.formIdentifier.formId);
aggregationMapping.mappings.forEach((fieldMapping, index) => {
this.enterFieldMapping(fieldMapping, index);
});
}
private enterFieldMapping(fieldMapping: FieldMapping, index: number): void {
enterWith(this.formComponent.getSourceMappingFieldInput(index), fieldMapping.sourcePath);
enterWith(this.formComponent.getTargetMappingFieldInput(index), fieldMapping.targetPath);
}
}
import { AggregationMapping, FieldMapping } from '@admin-client/reporting-shared';
import { AggregationMappingFormE2EComponent } from '../../components/aggregation-mapping/aggregation-mapping-form.e2e.component';
import { AggregationMappingE2EComponent } from '../../components/aggregation-mapping/aggregation-mapping.e2e.component';
import { enterWith, haveText, haveValue } from '../../support/cypress.util';
import { AggregationMapping } from '@admin-client/reporting-shared';
import { E2EAggregationMappingExecutor } from './aggregation-mapping.executor';
import { E2EAggregationMapperNavigator } from './aggregation-mapping.navigator';
export class E2EAggregationMappingHelper {
private component: AggregationMappingE2EComponent = new AggregationMappingE2EComponent();
private formComponent: AggregationMappingFormE2EComponent = new AggregationMappingFormE2EComponent();
private readonly navigator: E2EAggregationMapperNavigator = new E2EAggregationMapperNavigator();
private readonly executor: E2EAggregationMappingExecutor = new E2EAggregationMappingExecutor();
public enterName(text: string): void {
enterWith(this.formComponent.getNameInput(), text);
public openStatistik(): void {
this.navigator.openStatistik();
}
public enterFormEngine(text: string): void {
enterWith(this.formComponent.getFormEngineInput(), text);
}
public enterFormId(text: string): void {
enterWith(this.formComponent.getFormIdInput(), text);
}
public enterSourcePath(text: string, index: number): void {
enterWith(this.formComponent.getSourceMappingFieldInput(index), text);
}
public enterTargetPath(text: string, index: number): void {
enterWith(this.formComponent.getTargetMappingFieldInput(index), text);
}
public enterFieldMapping(fieldMapping: FieldMapping, index: number): void {
this.enterSourcePath(fieldMapping.sourcePath, index);
this.enterTargetPath(fieldMapping.targetPath, index);
}
public enterForm(aggregationMapping: AggregationMapping): void {
this.enterName(aggregationMapping.name);
this.enterFormEngine(aggregationMapping.formIdentifier.formEngineName);
this.enterFormId(aggregationMapping.formIdentifier.formId);
aggregationMapping.mappings.forEach((fieldMapping, index) => {
this.enterFieldMapping(fieldMapping, index);
});
}
public verifyFieldMapping(fieldMapping: FieldMapping, index: number): void {
haveValue(this.formComponent.getSourceMappingFieldInput(index), fieldMapping.sourcePath);
haveValue(this.formComponent.getTargetMappingFieldInput(index), fieldMapping.targetPath);
}
public verifyForm(aggregationMapping: AggregationMapping): void {
haveValue(this.formComponent.getNameInput(), aggregationMapping.name);
haveValue(this.formComponent.getFormEngineInput(), aggregationMapping.formIdentifier.formEngineName);
haveValue(this.formComponent.getFormIdInput(), aggregationMapping.formIdentifier.formId);
aggregationMapping.mappings.forEach((fieldMapping, index) => {
this.verifyFieldMapping(fieldMapping, index);
});
}
public verifyAggregationMappingInList(aggregationMapping: AggregationMapping): void {
haveText(this.component.getListItemName(), aggregationMapping.name);
haveText(this.component.getListItemFormEngineName(), aggregationMapping.formIdentifier.formEngineName);
haveText(this.component.getListItemFormId(), aggregationMapping.formIdentifier.formId);
public fillFormular(aggregationMapping: AggregationMapping): void {
this.executor.fillFormular(aggregationMapping);
}
}
import { AggregationMappingE2EComponent } from '../../components/aggregation-mapping/aggregation-mapping.e2e.component';
import { MainPage } from '../../page-objects/main.po';
import { exist } from '../../support/cypress.util';
import { E2EAppHelper } from '../app.helper';
export class E2EAggregationMapperNavigator {
private readonly appHelper: E2EAppHelper = new E2EAppHelper();
private readonly mainPage: MainPage = new MainPage();
private readonly aggregationMappingPage: AggregationMappingE2EComponent = new AggregationMappingE2EComponent();
public openStatistik(): void {
this.appHelper.navigateToDomain();
this.mainPage.getStatistikNavigationItem().click();
exist(this.aggregationMappingPage.getHeaderText());
}
}
import { AggregationMapping, FieldMapping } from '@admin-client/reporting-shared';
import { AggregationMappingFormE2EComponent } from '../../components/aggregation-mapping/aggregation-mapping-form.e2e.component';
import {
AggregationMappingE2EComponent,
AggregationMappingListItemE2EComponent,
} from '../../components/aggregation-mapping/aggregation-mapping.e2e.component';
import { haveText, haveValue } from '../../support/cypress.util';
export class E2EAggregationMappingVerifier {
private component: AggregationMappingE2EComponent = new AggregationMappingE2EComponent();
private formComponent: AggregationMappingFormE2EComponent = new AggregationMappingFormE2EComponent();
public verifyFieldMapping(fieldMapping: FieldMapping, index: number): void {
haveValue(this.formComponent.getSourceMappingFieldInput(index), fieldMapping.sourcePath);
haveValue(this.formComponent.getTargetMappingFieldInput(index), fieldMapping.targetPath);
}
public verifyForm(aggregationMapping: AggregationMapping): void {
haveValue(this.formComponent.getNameInput(), aggregationMapping.name);
haveValue(this.formComponent.getFormEngineInput(), aggregationMapping.formIdentifier.formEngineName);
haveValue(this.formComponent.getFormIdInput(), aggregationMapping.formIdentifier.formId);
aggregationMapping.mappings.forEach((fieldMapping, index) => {
this.verifyFieldMapping(fieldMapping, index);
});
}
public verifyAggregationMappingInList(aggregationMapping: AggregationMapping): void {
const listItem: AggregationMappingListItemE2EComponent = this.component.getListItem(aggregationMapping.name);
haveText(listItem.getName(), aggregationMapping.name);
haveText(listItem.getFormEngineName(), aggregationMapping.formIdentifier.formEngineName);
haveText(listItem.getFormId(), aggregationMapping.formIdentifier.formId);
}
}
import { MainPage } from '../page-objects/main.po';
export class E2EAppHelper {
private readonly mainPage: MainPage = new MainPage();
public navigateToDomain(): void {
this.mainPage.getHeader().getLogo().click();
}
}
......@@ -31,7 +31,7 @@ export class MainPage {
private readonly benutzerNavigationItem: string = 'link-path-benutzer';
private readonly organisationEinheitNavigationItem: string = 'link-path-organisationseinheiten';
private readonly postfachNavigationItem: string = 'link-path-postfach';
private readonly statistikNavigationItem: string = 'link-path-statistik';
private readonly statistikNavigationItem: string = 'link-path-aggregation-mapping';
public getBuildInfo(): BuildInfoE2EComponent {
return this.buildInfo;
......
......@@ -21,6 +21,7 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { HttpMethod } from '@alfa-client/tech-shared';
import { Interception, RouteHandler, RouteMatcher } from 'cypress/types/net-stubbing';
import { OrganisationsEinheitE2E } from './organisationseinheit';
......@@ -31,7 +32,7 @@ enum CypressTasks {
enum MongoCollections {
ORGANISATIONS_EINHEIT = 'organisationsEinheit',
SETTINGS = 'settings',
AGGREGATION_MAPPING = 'aggregationMapping',
}
const DOWNLOAD_FOLDER: string = 'cypress/downloads';
......@@ -48,7 +49,7 @@ export function intercept(method: string, url: string): Cypress.Chainable<null>
return cy.intercept(method, url);
}
export function interceptWithResponse(method, url: RouteMatcher, response: RouteHandler): Cypress.Chainable<null> {
export function interceptWithResponse(method: HttpMethod, url: RouteMatcher, response: RouteHandler): Cypress.Chainable<null> {
return cy.intercept(method, url, response);
}
......@@ -110,6 +111,5 @@ export function initOrganisationsEinheitenData(data: OrganisationsEinheitE2E[]):
}
export function dropCollections() {
cy.task(CypressTasks.DROP_COLLECTIONS, [MongoCollections.ORGANISATIONS_EINHEIT]);
cy.task(CypressTasks.DROP_COLLECTIONS, [MongoCollections.SETTINGS]);
cy.task(CypressTasks.DROP_COLLECTIONS, [MongoCollections.ORGANISATIONS_EINHEIT, MongoCollections.AGGREGATION_MAPPING]);
}
......@@ -2,7 +2,7 @@ export class ForwardingDialogE2EComponent {
private readonly root: string = 'forwarding-dialog';
private readonly cancelButton: string = 'cancel-dialog-button';
private readonly cancelIconButton: string = 'cancel-dialog-icon-button';
private readonly forwardingButton: string = 'forwarding-button';
private readonly forwardingButton: string = 'forwarding-dialog-forwarding-button';
private readonly searchText: string = 'instant_search-text-input';
private readonly searchEntry: string = 'item-button';
private readonly forwardingItem: string = 'forwarding-item';
......
import { registerLocaleData } from '@angular/common';
import localeDe from '@angular/common/locales/de';
import localeDeExtra from '@angular/common/locales/extra/de';
import { E2EAppHelper } from 'apps/alfa-e2e/src/helper/app.helper';
import { E2EForwardingHelper } from 'apps/alfa-e2e/src/helper/forwarding/forwarding.helper';
import { E2EOrganisationsEinheit } from 'apps/alfa-e2e/src/model/organisationseinheit';
import { E2EVorgangVerifier } from '../../../helper/vorgang/vorgang.verifier';
import { VorgangE2E } from '../../../model/vorgang';
import { dropCollections } from '../../../support/cypress-helper';
import { createVorgang, initVorgang } from '../../../support/vorgang-util';
registerLocaleData(localeDe, 'de', localeDeExtra);
describe('Vorgang weiterleiten', () => {
const appHelper: E2EAppHelper = new E2EAppHelper();
const vorgangVerifier: E2EVorgangVerifier = new E2EVorgangVerifier();
const forwardingHelper: E2EForwardingHelper = new E2EForwardingHelper();
const vorgang: VorgangE2E = { ...createVorgang(), name: 'Weiterleitung' };
before(() => {
initVorgang(vorgang);
appHelper.loginAsSabine();
});
after(() => {
dropCollections();
});
it('should disable all functions after successfully forwarding', () => {
forwardingHelper.openForwarding(vorgang.name);
forwardingHelper.forwardTo(E2EOrganisationsEinheit.HAMBURG_STADTENTWAESSERUNG);
vorgangVerifier.verifyVorgangIsLocked();
});
});
import { VorgangListE2EComponent } from '../components/vorgang/vorgang-list.e2e.component';
import { MainPage, waitForSpinnerToDisappear } from '../page-objects/main.po';
import { exist } from '../support/cypress.util';
import { loginAsSabine } from '../support/user-util';
export class E2EAppHelper {
private readonly mainPage: MainPage = new MainPage();
private readonly vorgangList: VorgangListE2EComponent = new VorgangListE2EComponent();
public loginAsSabine(): void {
loginAsSabine();
this.waitAfterLogin();
}
private waitAfterLogin(): void {
waitForSpinnerToDisappear();
exist(this.vorgangList.getRoot());
}
public navigateToDomain(): void {
this.mainPage.getHeader().getLogo().click();
}
}
import { ForwardingDialogE2EComponent } from '../../components/vorgang/vorgang-forwarding-dialog.e2e.component';
import { waitForSpinnerToDisappear } from '../../page-objects/main.po';
import { exist } from '../../support/cypress.util';
export class E2EForwardingExecutor {
private readonly forwardingDialog = new ForwardingDialogE2EComponent();
public fillForwardingDialog(organisationsEinheit: string): void {
this.forwardingDialog.getSearchText().type(organisationsEinheit);
waitForSpinnerToDisappear();
this.forwardingDialog.clickSearchEntry(0);
exist(this.forwardingDialog.getForwardingItem());
this.forwardingDialog.getForwardingButton().click();
waitForSpinnerToDisappear();
}
}
import { E2EForwardingExecutor } from './forwarding.executor';
import { E2EForwardingNavigator } from './forwarding.navigator';
export class E2EForwardingHelper {
private readonly executor: E2EForwardingExecutor = new E2EForwardingExecutor();
private readonly navigator: E2EForwardingNavigator = new E2EForwardingNavigator();
public openForwarding(vorgangName: string): void {
this.navigator.openForwardDialog(vorgangName);
}
public forwardTo(organisationsEinheit: string): void {
this.executor.fillForwardingDialog(organisationsEinheit);
}
}
import { VorgangFormularButtonsE2EComponent } from '../../components/vorgang/vorgang-formular-buttons.e2e.components';
import { ForwardingDialogE2EComponent } from '../../components/vorgang/vorgang-forwarding-dialog.e2e.component';
import { exist } from '../../support/cypress.util';
import { E2EVorgangNavigator } from '../vorgang/vorgang.navigator';
export class E2EForwardingNavigator {
private readonly vorgangNavigator: E2EVorgangNavigator = new E2EVorgangNavigator();
private readonly formularButtons: VorgangFormularButtonsE2EComponent = new VorgangFormularButtonsE2EComponent();
private readonly forwardingDialog: ForwardingDialogE2EComponent = new ForwardingDialogE2EComponent();
public openForwardDialog(vorgangName: string): void {
this.vorgangNavigator.openVorgangDetailByName(vorgangName);
this.formularButtons.getForwardButton().click();
exist(this.forwardingDialog.getRoot());
}
}
import { VorgangListE2EComponent } from '../../components/vorgang/vorgang-list.e2e.component';
import { waitForSpinnerToDisappear } from '../../page-objects/main.po';
import { exist } from '../../support/cypress.util';
import { E2EAppHelper } from '../app.helper';
import { E2EVorgangVerifier } from './vorgang.verifier';
export class E2EVorgangNavigator {
private readonly appHelper: E2EAppHelper = new E2EAppHelper();
private readonly verifier: E2EVorgangVerifier = new E2EVorgangVerifier();
private readonly vorgangListPage = new VorgangListE2EComponent();
......@@ -12,4 +16,11 @@ export class E2EVorgangNavigator {
waitForSpinnerToDisappear();
this.verifier.verifyVorgangDetailOpen(vorgangName);
}
public openVorgang(vorgangName: string): void {
this.appHelper.navigateToDomain();
waitForSpinnerToDisappear();
exist(this.vorgangListPage.getRoot());
this.openVorgangDetailByName(vorgangName);
}
}
import { VorgangFormularButtonsE2EComponent } from '../../components/vorgang/vorgang-formular-buttons.e2e.components';
import { VorgangPage } from '../../page-objects/vorgang.po';
import { contains, exist, notExist } from '../../support/cypress.util';
export class E2EVorgangVerifier {
private readonly vorgangPage: VorgangPage = new VorgangPage();
private readonly formularButtons: VorgangFormularButtonsE2EComponent = new VorgangFormularButtonsE2EComponent();
public verifyVorgangDetailOpen(vorgangName: string): void {
exist(this.vorgangPage.getVorgangDetailHeader().getRoot());
......@@ -16,4 +18,25 @@ export class E2EVorgangVerifier {
public verifyNoForwardingButtonExists(): void {
notExist(this.vorgangPage.getFormularButtons().getForwardButton());
}
public verifyVorgangIsLocked(): void {
this.verifyFormularButtonsNotVisible();
notExist(this.vorgangPage.getWiedervorlagenContainer().getCreateWiedervorlageButton());
notExist(this.vorgangPage.getKommentarContainer().getHinzufuegenButton());
notExist(this.vorgangPage.getPostfachMailcontainer().getCreateButtonWithText());
notExist(this.vorgangPage.getPostfachMailcontainer().getCreateButtonWithoutText());
}
private verifyFormularButtonsNotVisible(): void {
notExist(this.formularButtons.getAbschliessenButton());
notExist(this.formularButtons.getBearbeitenButton());
notExist(this.formularButtons.getBescheidenButton());
notExist(this.formularButtons.getEndgueltigLoeschenButton());
notExist(this.formularButtons.getForwardButton());
notExist(this.formularButtons.getLoeschAnforderungZuruecknehmenButton());
notExist(this.formularButtons.getVerwerfenButton());
notExist(this.formularButtons.getWiedereroeffnenButton());
notExist(this.formularButtons.getZurueckholenButton());
notExist(this.formularButtons.getZurueckstellenButton());
}
}
export enum E2EOrganisationsEinheit {
HAMBURG_STADTENTWAESSERUNG = 'Wasserwerk - Hamburg Wasser - Hamburger Stadtentwässerung',
}
......@@ -21,10 +21,31 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { BinaryFileListLinkRel, BinaryFileListResource, BinaryFileResource, BinaryFileService, } from '@alfa-client/binary-file-shared';
import { CommandOrder, CommandResource, CommandResourceService, CommandService, CreateCommandProps, getEffectedResourceUrl, } from '@alfa-client/command-shared';
import {
BinaryFileListLinkRel,
BinaryFileListResource,
BinaryFileResource,
BinaryFileService,
} from '@alfa-client/binary-file-shared';
import {
CommandOrder,
CommandResource,
CommandResourceService,
CommandService,
CreateCommandProps,
getEffectedResourceUrl,
} from '@alfa-client/command-shared';
import { PostfachService } from '@alfa-client/postfach-shared';
import { createEmptyStateResource, createErrorStateResource, createStateResource, EMPTY_STRING, getEmbeddedResources, ResourceListService, ResourceRepository, StateResource, } from '@alfa-client/tech-shared';
import {
createEmptyStateResource,
createErrorStateResource,
createStateResource,
EMPTY_STRING,
getEmbeddedResources,
ResourceListService,
ResourceRepository,
StateResource,
} from '@alfa-client/tech-shared';
import { Mock, mock } from '@alfa-client/test-utils';
import { VorgangCommandService, VorgangService, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
import { TestBed } from '@angular/core/testing';
......@@ -35,19 +56,43 @@ import { createProblemDetail } from 'libs/tech-shared/test/error';
import { createVorgangWithEingangResource } from 'libs/vorgang-shared/test/vorgang';
import { EMPTY, Observable, of } from 'rxjs';
import { createBinaryFileListResource, createBinaryFileResource } from '../../../binary-file-shared/test/binary-file';
import { createCommandErrorStateResource, createCommandResource, createCommandStateResource, createCreateCommandProps, createSuccessfullyDoneCommandStateResource, } from '../../../command-shared/test/command';
import {
createCommandErrorStateResource,
createCommandResource,
createCommandStateResource,
createCreateCommandProps,
createSuccessfullyDoneCommandStateResource,
} from '../../../command-shared/test/command';
import { createFile } from '../../../tech-shared/test/file';
import { singleCold, singleColdCompleted } from '../../../tech-shared/test/marbles';
import { createBescheid, createBescheidDocument, createBescheidListResource, createBescheidResource } from '../test/bescheid';
import { createDocumentResource } from '../test/document';
import { BescheidFacade } from './+state/bescheid.facade';
import { BescheidLinkRel } from './bescheid.linkrel';
import { Bescheid, BESCHEID_UPLOADED_ATTACHMENTS, BescheidDocument, BescheidListResource, BescheidResource, BescheidStatus, BescheidWizardStep, createEmptyBescheidDocument, createEmptyUploadInProgress, createInitialWizard, } from './bescheid.model';
import {
Bescheid,
BESCHEID_UPLOADED_ATTACHMENTS,
BescheidDocument,
BescheidListResource,
BescheidResource,
BescheidStatus,
BescheidWizardStep,
createEmptyBescheidDocument,
createEmptyUploadInProgress,
createInitialWizard,
} from './bescheid.model';
import { BescheidService } from './bescheid.service';
import { DocumentLinkRel } from './document.linkrel';
import { DocumentResource } from './document.model';
import { BescheidListResourceService, BescheidResourceService, buildCreateBescheidDocumentFromFileProps, buildUpdateBescheidCommandProps, createBescheidListResourceService, createBescheidResourceService, } from '@alfa-client/bescheid-shared';
import {
BescheidListResourceService,
BescheidResourceService,
buildCreateBescheidDocumentFromFileProps,
buildUpdateBescheidCommandProps,
createBescheidListResourceService,
createBescheidResourceService,
} from '@alfa-client/bescheid-shared';
import { expect } from '@jest/globals';
import { cold } from 'jest-marbles';
import * as DateUtil from '../../../tech-shared/src/lib/date.util';
......@@ -147,7 +192,7 @@ describe('BescheidService', () => {
it('should reload postfach list', () => {
service.exit();
expect(postfachService.setPostfachMailOnReload).toHaveBeenCalled();
expect(postfachService._setPostfachMailOnReload).toHaveBeenCalled();
});
it('should clear uploaded files', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment