diff --git a/alfa-client/.gitignore b/alfa-client/.gitignore index 04f312c3c83b214e8861cfb2bd52cda003ff7916..a69cc6f2555e13e9a76cb9fe95054f68cee336bf 100644 --- a/alfa-client/.gitignore +++ b/alfa-client/.gitignore @@ -12,6 +12,7 @@ junit.xml .scannerwork test-report.xml /.angular/cache/* +apps/alfa-e2e/.env # dependencies /node_modules @@ -26,6 +27,8 @@ test-report.xml *.sublime-workspace # IDE - VSCode +!.vscode + .vscode/* !.vscode/user-settings.json !.vscode/settings.json diff --git a/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-bescheid-wizard.e2e.component.ts b/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-bescheid-wizard.e2e.component.ts index 9e0f6784b1f9f88bfdfcc492ca198dfa47babbbb..17d751a99d64ce4c1fac63beb76ee18f4f365346 100644 --- a/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-bescheid-wizard.e2e.component.ts +++ b/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-bescheid-wizard.e2e.component.ts @@ -46,7 +46,9 @@ export class VorgangBescheidWizardE2EComponent { 'bescheiderstellung-abbrechen-entwurf-speichern'; private readonly uploadBescheidFile: string = '-single-file-upload-button'; private readonly uploadAttachment: string = 'Anhang_hochladen-file-upload-button'; + private readonly mailTextArea: string = 'Text-textarea-editor'; private readonly saveBescheid: string = 'save-button'; + private readonly sendBescheid: string = 'send-button'; private readonly confirmAndSaveButton: string = 'confirm-and-save-button'; private readonly fileBescheidValid: string = 'Bescheid_validpdf-file-item'; @@ -58,6 +60,9 @@ export class VorgangBescheidWizardE2EComponent { '[data-test-id="bescheid-document"] ods-spinner-icon'; private readonly attachmentUploadSpinner: string = '[data-test-id="bescheid-attachments"] ods-spinner-icon'; + private readonly bescheidSaveSpinner: string = + '[data-test-id="confirm-and-save-button"] ods-spinner-icon'; + private readonly sendenSpinner: string = '[data-test-id="send-button"] ods-spinner-icon'; private locatorRoot: string = 'bescheid-wizard'; @@ -143,11 +148,11 @@ export class VorgangBescheidWizardE2EComponent { return cy.getTestElement(this.uploadAttachment); } - public getFileBescheidValid() { + public getFileBescheidValidInWizard() { return cy.getTestElement(this.locatorRoot).find(`[data-test-id=${this.fileBescheidValid}]`); } - public getFileAnhangValid() { + public getFileAnhangValidInWizard() { return cy.getTestElement(this.locatorRoot).find(`[data-test-id=${this.fileAnhangValid}]`); } @@ -175,10 +180,26 @@ export class VorgangBescheidWizardE2EComponent { return cy.get(this.attachmentUploadSpinner); } + public getBescheidSaveSpinner() { + return cy.get(this.bescheidSaveSpinner); + } + + public getSendenSpinner() { + return cy.get(this.sendenSpinner); + } + + public getMailTextArea() { + return cy.get(this.mailTextArea); + } + public getSaveButton() { return cy.getTestElement(this.saveBescheid); } + public getSendButton() { + return cy.getTestElement(this.sendBescheid); + } + public getResultBox() { return cy.getTestElement(this.bescheidResultBox); } diff --git a/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-bescheide.e2e.component.ts b/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-bescheide.e2e.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..ad4807ed780de509f4d74cc6470c3af166154ed0 --- /dev/null +++ b/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-bescheide.e2e.component.ts @@ -0,0 +1,46 @@ +export class VorgangBescheideE2EComponent { + private readonly bescheidContainer: string = 'bescheid-container-in-vorgang'; + private readonly bescheidExpansionPanel: string = 'bescheid-expansion-panel'; + private readonly beschiedenDate: string = 'beschieden-date'; + private readonly bewilligtIcon: string = 'bewilligt-icon'; + private readonly abgelehntIcon: string = 'abgelehnt-icon'; + private readonly bescheidListItem: string = 'vorgang-list-item-bescheid-status'; + + private readonly fileBescheidValid: string = 'Bescheid_validpdf-file-item'; + private readonly fileAnhangValid: string = 'Anhang_validpdf-file-item'; + + public getElementFromFileName(filename: string) { + return filename.replace(/\./g, '') + '-file-item'; + } + + public getBescheidContainer() { + return cy.getTestElement(this.bescheidContainer); + } + public getBescheidExpansionPanel() { + return cy.getTestElement(this.bescheidExpansionPanel).find(`[role="button"]`); + } + + public getBeschiedenDateInHeader() { + return cy.getTestElement(this.beschiedenDate); + } + + public getBewilligtIconInHeader() { + return cy.getTestElement(this.bewilligtIcon); + } + + public getAbgelehntIconInHeader() { + return cy.getTestElement(this.abgelehntIcon); + } + + public getBescheidListItem() { + return cy.getTestElement(this.bescheidListItem); + } + + public getFileBescheidValidInVorgang() { + return cy.getTestElement(this.fileBescheidValid); + } + + public getFileAnhangValidInVorgang() { + return cy.getTestElement(this.fileAnhangValid); + } +} diff --git a/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-formular.e2e.component.ts b/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-formular.e2e.component.ts index 262f8449c33319364bb2fff0853e92c8f2225412..7cbf56b323b60afa837fc79bae7b9b296e28448a 100644 --- a/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-formular.e2e.component.ts +++ b/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang-formular.e2e.component.ts @@ -23,7 +23,10 @@ */ import { getElement, getTestElement } from '../../support/cypress-helper'; import { ExpansionPanelE2Eomponent } from '../ui/expansion-panel.e2e.component'; -import { VorgangFormularDatenHistorieE2EComponent } from './vorgang.formular-daten.historie.e2e.component'; +import { + VorgangFormularDatenHistorieE2EComponent, + VorgangFormularDatenHistorieItemE2EComponent, +} from './vorgang.formular-daten.historie.e2e.component'; export class VorgangFormularDatenE2EComponent { private readonly locatorRoot: string = 'formulardaten-panel'; @@ -85,4 +88,8 @@ export class VorgangFormularDatenE2EComponent { public getHistorieContainer(): VorgangFormularDatenHistorieE2EComponent { return this.historieContainer; } + + public getHistorieItemByIndex(index: number): VorgangFormularDatenHistorieItemE2EComponent { + return this.getHistorieContainer().getListItemByIndex(index); + } } diff --git a/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang.formular-daten.historie.e2e.component.ts b/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang.formular-daten.historie.e2e.component.ts index d5286aa695acb9684e9b7ae74e3d3361768b0995..2b0fe296fec1a11d59f843624c441ae14788dea9 100644 --- a/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang.formular-daten.historie.e2e.component.ts +++ b/alfa-client/apps/alfa-e2e/src/components/vorgang/vorgang.formular-daten.historie.e2e.component.ts @@ -86,6 +86,10 @@ export class VorgangFormularDatenHistorieItemE2EComponent { public getAktenzeichen(): AktenzeichenHistorieItemE2EComponent { return new AktenzeichenHistorieItemE2EComponent(this.locatorRoot); } + + public getBescheid(): BescheidHistorieItemE2EComponent { + return new BescheidHistorieItemE2EComponent(this.locatorRoot); + } } export class PostfachNachrichtHistorieItemE2EComponent { @@ -184,3 +188,31 @@ export class AktenzeichenHistorieItemE2EComponent { return this.getRoot().findTestElementWithClass(this.text); } } + +export class BescheidHistorieItemE2EComponent { + private readonly root: string; + + private readonly status: string = 'historie-item-bescheid-status'; + private readonly bescheidDokument: string = 'historie-item-bescheid-document'; + private readonly bescheidAnhaenge: string = 'historie-item-attachment'; + + constructor(rootLocator: string) { + this.root = rootLocator; + } + + public getRoot() { + return getTestElement(this.root); + } + + public getStatus() { + return cy.getTestElementWithClass(this.status); + } + + public getBescheidDokumentText() { + return cy.getTestElementWithClass(this.bescheidDokument); + } + + public getBescheidAnhaengeText() { + return cy.getTestElementWithClass(this.bescheidAnhaenge); + } +} diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/historie/historie.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/historie/historie.cy.ts index ae9a6014d59268674b5d447c3df239dac5ba053f..b77418721634cec4ce8415acb396c5413a883e36 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/historie/historie.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/historie/historie.cy.ts @@ -241,9 +241,8 @@ describe('Historie', () => { describe('vorgang order', () => { it('assign user', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(0); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(0); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.ASSIGN_USER); @@ -254,9 +253,8 @@ describe('Historie', () => { describe('kommentar order', () => { it('create kommentar', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(1); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(1); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.CREATE_KOMMENTAR); @@ -270,9 +268,8 @@ describe('Historie', () => { }); it('edit kommentar', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(2); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(2); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.EDIT_KOMMENTAR); @@ -291,9 +288,8 @@ describe('Historie', () => { describe('forward order', () => { it('forward vorgang', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(3); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(3); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.FORWARD_VORGANG); @@ -301,10 +297,9 @@ describe('Historie', () => { notExist(historieItem.getExpandButton()); }); - it('foward successful', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(4); + it('forward successful', () => { + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(4); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.FORWARD_SUCCESSFUL); @@ -312,10 +307,9 @@ describe('Historie', () => { notExist(historieItem.getExpandButton()); }); - it('foward failed', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(5); + it('forward failed', () => { + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(5); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.FORWARD_FAILED); @@ -326,9 +320,8 @@ describe('Historie', () => { describe('postfach nachricht order', () => { it('send postfach mail', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(6); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(6); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.SEND_POSTFACH_NACHRICHT); @@ -349,9 +342,8 @@ describe('Historie', () => { }); it('send postfach nachricht', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(7); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(7); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.SEND_POSTFACH_NACHRICHT); @@ -372,9 +364,8 @@ describe('Historie', () => { }); it('receive postfach nachricht', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(8); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(8); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.RECEIVE_POSTFACH_NACHRICHT); @@ -396,9 +387,8 @@ describe('Historie', () => { }); it('resend postfach nachricht', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(9); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(9); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.RESEND_POSTFACH_NACHRICHT); @@ -408,9 +398,8 @@ describe('Historie', () => { describe('wiedervorlage order', () => { it('create wiedervorlage', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(10); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(10); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.CREATE_WIEDERVORLAGE); @@ -430,9 +419,8 @@ describe('Historie', () => { }); it('edit wiedervorlage', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(11); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(11); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.EDIT_WIEDERVORLAGE); @@ -455,9 +443,8 @@ describe('Historie', () => { }); it('wiedervorlage erledigen', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(12); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(12); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.WIEDERVORLAGE_ERLEDIGEN); @@ -466,9 +453,8 @@ describe('Historie', () => { }); it('wiedervorlage wiedereroeffnen', () => { - const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular - .getHistorieContainer() - .getListItemByIndex(13); + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(13); exist(historieItem.getRoot()); contains(historieItem.getHeadline(), HistorieHeadlineE2E.WIEDERVORLAGE_WIEDEREROEFFNEN); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-abbrechen.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-abbrechen.cy.ts index d3918d76697c26fc19c9667448851a064d124207..c2943c6ef548e9872c2e2e6ad16eefff928ed4c6 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-abbrechen.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-abbrechen.cy.ts @@ -25,7 +25,7 @@ import { buildVorgang, initVorgaenge, objectIds } from '../../../support/vorgang registerLocaleData(localeDe, 'de', localeDeExtra); -describe('Bescheid Wizard', () => { +describe('Bescheid abbrechen', () => { const mainPage: MainPage = new MainPage(); const vorgangList: VorgangListE2EComponent = mainPage.getVorgangList(); @@ -84,8 +84,8 @@ describe('Bescheid Wizard', () => { vorgangFormularButtons.getBescheidenButton().click(); contains(bescheidWizard.getStatusText(), bewilligtText + ' ' + getAdjustedDateGerman(0)); bescheidWizard.getWeiterButton().click(); - notExist(bescheidWizard.getFileAnhangValid()); - notExist(bescheidWizard.getFileBescheidValid()); + notExist(bescheidWizard.getFileAnhangValidInWizard()); + notExist(bescheidWizard.getFileBescheidValidInWizard()); }); it('should save all data after clicking X and confirm save', () => { @@ -110,8 +110,8 @@ describe('Bescheid Wizard', () => { contains(bescheidWizard.getStatusText(), abgelehntText + ' ' + getAdjustedDateGerman(-1)); bescheidWizard.getWeiterButton().click(); - exist(bescheidWizard.getFileAnhangValid()); - exist(bescheidWizard.getFileBescheidValid()); + exist(bescheidWizard.getFileAnhangValidInWizard()); + exist(bescheidWizard.getFileBescheidValidInWizard()); }); }); }); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-dokumente-hochladen.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-dokumente-hochladen.cy.ts index 3d11a1a9baa58f0c1bcba190014d42679ac4682c..fecc0d94c2591421c36835b202e9e9b5e4ab2653 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-dokumente-hochladen.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-dokumente-hochladen.cy.ts @@ -25,7 +25,7 @@ import { buildVorgang, initVorgaenge, objectIds } from '../../../support/vorgang registerLocaleData(localeDe, 'de', localeDeExtra); -describe('Bescheid Wizard', () => { +describe('Bescheid Dokumente hochladen', () => { const mainPage: MainPage = new MainPage(); const vorgangList: VorgangListE2EComponent = mainPage.getVorgangList(); @@ -72,19 +72,19 @@ describe('Bescheid Wizard', () => { it('should upload manual Bescheid file', () => { uploadFile(bescheidWizard.getUploadBescheidButton(), TEST_FILE_BESCHEID_VALID); notExist(bescheidWizard.getBescheidUploadSpinner()); - exist(bescheidWizard.getFileBescheidValid()); + exist(bescheidWizard.getFileBescheidValidInWizard()); }); it('should upload attachment file', () => { uploadFile(bescheidWizard.getUploadAttachmentButton(), TEST_FILE_BESCHEID_ANHANG_VALID); - exist(bescheidWizard.getFileAnhangValid()); + exist(bescheidWizard.getFileAnhangValidInWizard()); }); it('should still show files after clicking Weiter and step 2', () => { bescheidWizard.getWeiterButton().click(); bescheidWizard.getStepButton2().click(); - exist(bescheidWizard.getFileBescheidValid()); - exist(bescheidWizard.getFileAnhangValid()); + exist(bescheidWizard.getFileBescheidValidInWizard()); + exist(bescheidWizard.getFileAnhangValidInWizard()); }); it('should still show file after closing the Wizard and continue working', () => { @@ -94,8 +94,8 @@ describe('Bescheid Wizard', () => { vorgangFormularButtons.getBescheidenButton().click(); bescheidWizard.getWeiterButton().click(); - exist(bescheidWizard.getFileBescheidValid()); - exist(bescheidWizard.getFileAnhangValid()); + exist(bescheidWizard.getFileBescheidValidInWizard()); + exist(bescheidWizard.getFileAnhangValidInWizard()); }); it('should delete files on clicking X button', () => { @@ -104,13 +104,13 @@ describe('Bescheid Wizard', () => { bescheidWizard.getElementFromFileName(TEST_FILE_BESCHEID_ANHANG_VALID), ) .click(); - notExist(bescheidWizard.getFileAnhangValid()); - exist(bescheidWizard.getFileBescheidValid()); + notExist(bescheidWizard.getFileAnhangValidInWizard()); + exist(bescheidWizard.getFileBescheidValidInWizard()); bescheidWizard .getDeleteButtonOfElement(bescheidWizard.getElementFromFileName(TEST_FILE_BESCHEID_VALID)) .click(); - notExist(bescheidWizard.getFileBescheidValid()); + notExist(bescheidWizard.getFileBescheidValidInWizard()); }); it('should be able to attach all valid types of files', () => { diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-historie.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-historie.cy.ts new file mode 100644 index 0000000000000000000000000000000000000000..b9a09543c6ded4a523dace6b809bc2c4a6263eec --- /dev/null +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-historie.cy.ts @@ -0,0 +1,198 @@ +import { registerLocaleData } from '@angular/common'; +import localeDe from '@angular/common/locales/de'; +import localeDeExtra from '@angular/common/locales/extra/de'; +import { VorgangBescheidWizardE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-bescheid-wizard.e2e.component'; +import { VorgangBescheideE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-bescheide.e2e.component'; +import { VorgangFormularButtonsE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-formular-buttons.e2e.components'; +import { VorgangFormularDatenE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-formular.e2e.component'; +import { VorgangSubnavigationE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-subnavigation'; +import { + BescheidHistorieItemE2EComponent, + VorgangFormularDatenHistorieItemE2EComponent, +} from 'apps/alfa-e2e/src/components/vorgang/vorgang.formular-daten.historie.e2e.component'; +import { HistorieHeadlineE2E } from 'apps/alfa-e2e/src/model/historie'; +import { VorgangE2E, VorgangStatusE2E } from 'apps/alfa-e2e/src/model/vorgang'; +import { + TEST_FILE_BESCHEID_ANHANG_VALID, + TEST_FILE_BESCHEID_VALID, +} from 'apps/alfa-e2e/src/support/data.util'; +import { uploadFile } from 'apps/alfa-e2e/src/support/file-upload'; +import { getAdjustedDateGerman } from 'apps/alfa-e2e/src/support/tech.util'; +import 'cypress-real-events/support'; +import { VorgangListE2EComponent } from '../../../components/vorgang/vorgang-list.e2e.component'; +import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; +import { VorgangPage } from '../../../page-objects/vorgang.po'; +import { dropCollections } from '../../../support/cypress-helper'; +import { contains, enterWith, exist, notExist } from '../../../support/cypress.util'; +import { getUserSabine, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { buildVorgang, initVorgaenge, objectIds } from '../../../support/vorgang-util'; + +registerLocaleData(localeDe, 'de', localeDeExtra); + +describe('Bescheid History', () => { + const mainPage: MainPage = new MainPage(); + const vorgangList: VorgangListE2EComponent = mainPage.getVorgangList(); + + const bewilligtText: string = 'Bewilligt am'; + const abgelehntText: string = 'Abgelehnt am'; + const einAnhangText: string = 'Es existiert ein Anhang'; + const zweiAnhaengeText: string = 'Es existieren 2 Anhänge'; + + const vorgangPage: VorgangPage = new VorgangPage(); + const bescheidWizard: VorgangBescheidWizardE2EComponent = vorgangPage.getBescheidWizard(); + + const bescheidSpeichernVorgang: VorgangE2E = { + ...buildVorgang(objectIds[0], 'Bescheid speichern Vorgang'), + status: VorgangStatusE2E.IN_BEARBEITUNG, + }; + + const bescheidSingleVorgang: VorgangE2E = { + ...buildVorgang(objectIds[1], 'Bescheid ohne Attachment Vorgang'), + status: VorgangStatusE2E.IN_BEARBEITUNG, + }; + + const bescheidSendenVorgang: VorgangE2E = { + ...buildVorgang(objectIds[2], 'Bescheid senden Vorgang'), + status: VorgangStatusE2E.IN_BEARBEITUNG, + }; + + const vorgangDatenFormular: VorgangFormularDatenE2EComponent = + vorgangPage.getFormularDatenContainer(); + + const vorgangFormularButtons: VorgangFormularButtonsE2EComponent = + vorgangPage.getFormularButtons(); + + const vorgangSubnavigationButtons: VorgangSubnavigationE2EComponent = + vorgangPage.getSubnavigation(); + + const bescheide: VorgangBescheideE2EComponent = vorgangPage.getBescheide(); + + before(() => { + initVorgaenge([bescheidSpeichernVorgang, bescheidSingleVorgang, bescheidSendenVorgang]); + initUsermanagerUsers(); + + loginAsSabine(); + + waitForSpinnerToDisappear(); + exist(vorgangList.getRoot()); + }); + + after(() => { + dropCollections(); + }); + + describe('Show Bescheid notes in history', () => { + const userName: string = `${getUserSabine().firstName} ${getUserSabine().lastName}`; + + describe('Show history entry after saving Bescheid', () => { + it('should show Bescheid entry on history tab after saving', () => { + vorgangList.getListItem(bescheidSpeichernVorgang.name).getRoot().click(); + waitForSpinnerToDisappear(); + + vorgangFormularButtons.getBescheidenButton().click(); + enterWith(bescheidWizard.getDateInput(), getAdjustedDateGerman(-1)); + bescheidWizard.getWeiterButton().click(); + uploadFile(bescheidWizard.getUploadBescheidButton(), TEST_FILE_BESCHEID_VALID); + notExist(bescheidWizard.getBescheidUploadSpinner()); + uploadFile(bescheidWizard.getUploadAttachmentButton(), TEST_FILE_BESCHEID_ANHANG_VALID); + notExist(bescheidWizard.getAttachmentUploadSpinner()); + bescheidWizard.getWeiterButton().click(); + bescheidWizard.getSaveButton().click(); + bescheidWizard.getConfirmAndSaveButton().click(); + waitForSpinnerToDisappear(); + vorgangDatenFormular.getHistorieTab().click(); + + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(0); + + contains(historieItem.getHeadline(), HistorieHeadlineE2E.BESCHEID_ERSTELLT); + contains(historieItem.getUser(), userName); + }); + + it('should show detailed info after click on arrow', () => { + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(0); + const bescheidItem: BescheidHistorieItemE2EComponent = historieItem.getBescheid(); + historieItem.getExpandButton().click(); + + contains(bescheidItem.getStatus(), bewilligtText); + contains(bescheidItem.getStatus(), getAdjustedDateGerman(-1)); + exist(bescheidItem.getBescheidDokumentText()); + contains(bescheidItem.getBescheidAnhaengeText(), einAnhangText); + }); + + it('should show single text for Bescheid without attachment', () => { + vorgangSubnavigationButtons.getBackButton().click(); + vorgangList.getListItem(bescheidSingleVorgang.name).getRoot().click(); + waitForSpinnerToDisappear(); + + vorgangFormularButtons.getBescheidenButton().click(); + enterWith(bescheidWizard.getDateInput(), getAdjustedDateGerman(-1)); + bescheidWizard.getWeiterButton().click(); + uploadFile(bescheidWizard.getUploadBescheidButton(), TEST_FILE_BESCHEID_VALID); + notExist(bescheidWizard.getBescheidUploadSpinner()); + bescheidWizard.getWeiterButton().click(); + bescheidWizard.getSaveButton().click(); + bescheidWizard.getConfirmAndSaveButton().click(); + waitForSpinnerToDisappear(); + vorgangDatenFormular.getHistorieTab().click(); + + const historieItem: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(0); + const bescheidItem: BescheidHistorieItemE2EComponent = historieItem.getBescheid(); + historieItem.getExpandButton().click(); + + contains(bescheidItem.getStatus(), bewilligtText); + contains(bescheidItem.getStatus(), getAdjustedDateGerman(-1)); + exist(bescheidItem.getBescheidDokumentText()); + notExist(bescheidItem.getBescheidAnhaengeText()); + }); + }); + + describe('Show history entry after sending Bescheid', () => { + it('should show Bescheid entry on history tab after sending message', () => { + vorgangSubnavigationButtons.getBackButton().click(); + vorgangList.getListItem(bescheidSendenVorgang.name).getRoot().click(); + waitForSpinnerToDisappear(); + + vorgangFormularButtons.getBescheidenButton().click(); + bescheidWizard.getAbgelehntButton().click(); + enterWith(bescheidWizard.getDateInput(), getAdjustedDateGerman(1)); + bescheidWizard.getWeiterButton().click(); + uploadFile(bescheidWizard.getUploadBescheidButton(), TEST_FILE_BESCHEID_VALID); + notExist(bescheidWizard.getBescheidUploadSpinner()); + uploadFile(bescheidWizard.getUploadAttachmentButton(), TEST_FILE_BESCHEID_ANHANG_VALID); + notExist(bescheidWizard.getAttachmentUploadSpinner()); + uploadFile(bescheidWizard.getUploadAttachmentButton(), TEST_FILE_BESCHEID_ANHANG_VALID); + notExist(bescheidWizard.getAttachmentUploadSpinner()); + bescheidWizard.getWeiterButton().click(); + bescheidWizard.getSendButton().click(); + exist(bescheidWizard.getSendenSpinner()); + notExist(bescheidWizard.getSendenSpinner()); + + vorgangDatenFormular.getHistorieTab().click(); + const historieItemExpand: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(0); + const bescheidItem: BescheidHistorieItemE2EComponent = historieItemExpand.getBescheid(); + historieItemExpand.getExpandButton().click(); + + contains(bescheidItem.getStatus(), abgelehntText); + contains(bescheidItem.getStatus(), getAdjustedDateGerman(1)); + exist(bescheidItem.getBescheidDokumentText()); + contains(bescheidItem.getBescheidAnhaengeText(), zweiAnhaengeText); + }); + + it('should show history entries for sent Bescheid and message', () => { + const historieItemSent: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(1); + contains(historieItemSent.getHeadline(), HistorieHeadlineE2E.BESCHEID_VERSCHICKT); + contains(historieItemSent.getUser(), userName); + + const historieItemMessage: VorgangFormularDatenHistorieItemE2EComponent = + vorgangDatenFormular.getHistorieItemByIndex(3); + contains(historieItemMessage.getHeadline(), HistorieHeadlineE2E.SEND_POSTFACH_NACHRICHT); + contains(historieItemMessage.getUser(), userName); + }); + }); + }); +}); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-info-anzeigen.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-info-anzeigen.cy.ts new file mode 100644 index 0000000000000000000000000000000000000000..dd926439b5d110258be4ea3f702018343668ea53 --- /dev/null +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-info-anzeigen.cy.ts @@ -0,0 +1,178 @@ +import { registerLocaleData } from '@angular/common'; +import localeDe from '@angular/common/locales/de'; +import localeDeExtra from '@angular/common/locales/extra/de'; +import { VorgangBescheidWizardE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-bescheid-wizard.e2e.component'; +import { VorgangBescheideE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-bescheide.e2e.component'; +import { VorgangFormularButtonsE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-formular-buttons.e2e.components'; +import { VorgangSubnavigationE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-subnavigation'; +import { + VorgangE2E, + VorgangStatusE2E, + vorgangStatusLabelE2E, +} from 'apps/alfa-e2e/src/model/vorgang'; +import { + TEST_FILE_BESCHEID_ANHANG_VALID, + TEST_FILE_BESCHEID_VALID, +} from 'apps/alfa-e2e/src/support/data.util'; +import { uploadFile } from 'apps/alfa-e2e/src/support/file-upload'; +import { getAdjustedDateGerman } from 'apps/alfa-e2e/src/support/tech.util'; +import 'cypress-real-events/support'; +import { VorgangListE2EComponent } from '../../../components/vorgang/vorgang-list.e2e.component'; +import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; +import { VorgangPage } from '../../../page-objects/vorgang.po'; +import { countDownloadFiles, dropCollections } from '../../../support/cypress-helper'; +import { + contains, + enterWith, + exist, + haveLength, + haveText, + notBeVisible, + notExist, + visible, +} from '../../../support/cypress.util'; +import { initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { buildVorgang, initVorgaenge, objectIds } from '../../../support/vorgang-util'; + +registerLocaleData(localeDe, 'de', localeDeExtra); + +describe('Bescheid Info anzeigen', () => { + const mainPage: MainPage = new MainPage(); + const vorgangList: VorgangListE2EComponent = mainPage.getVorgangList(); + + const abgelehntText: string = 'Abgelehnt am'; + const fortsetzenText: string = 'Bescheiden fortsetzen'; + const entwurfText: string = '(Entwurf)'; + + const vorgangPage: VorgangPage = new VorgangPage(); + const bescheidWizard: VorgangBescheidWizardE2EComponent = vorgangPage.getBescheidWizard(); + + const bescheidVorgang: VorgangE2E = { + ...buildVorgang(objectIds[0], 'Wizard Vorgang'), + status: VorgangStatusE2E.IN_BEARBEITUNG, + }; + + const vorgangFormularButtons: VorgangFormularButtonsE2EComponent = + vorgangPage.getFormularButtons(); + + const vorgangSubnavigationButtons: VorgangSubnavigationE2EComponent = + vorgangPage.getSubnavigation(); + + const bescheide: VorgangBescheideE2EComponent = vorgangPage.getBescheide(); + + before(() => { + initVorgaenge([bescheidVorgang]); + initUsermanagerUsers(); + + loginAsSabine(); + + waitForSpinnerToDisappear(); + exist(vorgangList.getRoot()); + }); + + after(() => { + dropCollections(); + }); + + describe('Show Bescheid Entwurf info on details page', () => { + it('should show Entwurf on details page', () => { + notExist(bescheide.getBescheidListItem()); + vorgangList.getListItem(bescheidVorgang.name).getRoot().click(); + waitForSpinnerToDisappear(); + + vorgangFormularButtons.getBescheidenButton().click(); + bescheidWizard.getAbgelehntButton().click(); + enterWith(bescheidWizard.getDateInput(), getAdjustedDateGerman(-1)); + bescheidWizard.getWeiterButton().click(); + bescheidWizard.getCloseButton().click(); + bescheidWizard.getCloseSpeichernButton().click(); + haveText( + vorgangPage.getVorgangDetailHeader().getStatus(), + vorgangStatusLabelE2E[VorgangStatusE2E.IN_BEARBEITUNG], + ); + + exist(bescheide.getBescheidContainer()); + + contains(bescheide.getBescheidContainer(), abgelehntText + ' ' + getAdjustedDateGerman(-1)); + + contains(bescheide.getBescheidContainer(), entwurfText); + }); + + it('should show caption Bescheid fortsetzen on button', () => { + contains(vorgangFormularButtons.getBescheidenButton(), fortsetzenText); + }); + + it('should show complete info after saving Bescheid', () => { + vorgangFormularButtons.getBescheidenButton().click(); + enterWith(bescheidWizard.getDateInput(), getAdjustedDateGerman(-2)); + bescheidWizard.getWeiterButton().click(); + uploadFile(bescheidWizard.getUploadBescheidButton(), TEST_FILE_BESCHEID_VALID); + notExist(bescheidWizard.getBescheidUploadSpinner()); + uploadFile(bescheidWizard.getUploadAttachmentButton(), TEST_FILE_BESCHEID_ANHANG_VALID); + notExist(bescheidWizard.getAttachmentUploadSpinner()); + + bescheidWizard.getWeiterButton().click(); + bescheidWizard.getSaveButton().click(); + bescheidWizard.getConfirmAndSaveButton().click(); + waitForSpinnerToDisappear(); + + exist(bescheide.getBescheidContainer()); + + contains(bescheide.getBescheidContainer(), abgelehntText); + + exist(bescheide.getFileBescheidValidInVorgang()); + exist(bescheide.getFileAnhangValidInVorgang()); + }); + + it('should show date and Beschieden icon on top of Vorgang page', () => { + exist(bescheide.getBeschiedenDateInHeader()); + exist(bescheide.getAbgelehntIconInHeader()); + contains(bescheide.getBeschiedenDateInHeader(), getAdjustedDateGerman(-2)); + }); + + it('should (not) show Bescheid container when I open/close the panel', () => { + bescheide.getBescheidExpansionPanel().click(); + notBeVisible(bescheide.getBescheidContainer()); + + bescheide.getBescheidExpansionPanel().click(); + visible(bescheide.getBescheidContainer()); + }); + + it('should download both attachments', () => { + bescheide.getFileBescheidValidInVorgang().click(); + bescheide.getFileAnhangValidInVorgang().click(); + countDownloadFiles().then((count) => { + expect(count).to.eq(2); + }); + }); + + it('should show second Bescheid after reopening Vorgang and creating new Bescheid', () => { + vorgangFormularButtons.getWiedereroeffnenButton().click(); + vorgangFormularButtons.getBescheidenButton().click(); + bescheidWizard.getAbgelehntButton().click(); + bescheidWizard.getWeiterButton().click(); + uploadFile(bescheidWizard.getUploadBescheidButton(), TEST_FILE_BESCHEID_VALID); + notExist(bescheidWizard.getBescheidUploadSpinner()); + bescheidWizard.getWeiterButton().click(); + bescheidWizard.getSaveButton().click(); + bescheidWizard.getConfirmAndSaveButton().click(); + exist(bescheidWizard.getBescheidSaveSpinner()); + notExist(bescheidWizard.getBescheidSaveSpinner()); + + haveLength(bescheide.getBescheidContainer(), 2); + }); + + it('should show info on top of Vorgang page', () => { + exist(bescheide.getBeschiedenDateInHeader()); + exist(bescheide.getAbgelehntIconInHeader()); + contains(bescheide.getBeschiedenDateInHeader(), getAdjustedDateGerman(0)); + }); + + it('should show info on list page', () => { + vorgangSubnavigationButtons.getBackButton().click(); + + exist(bescheide.getBescheidListItem()); + contains(bescheide.getBescheidListItem(), 'abgelehnt'); + }); + }); +}); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-nur-speichern.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-nur-speichern.cy.ts index f2ec81bd978db6546305b15d971815000b7fb811..513765da9a9da8ef6b83513da483219ca3365584 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-nur-speichern.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-nur-speichern.cy.ts @@ -25,7 +25,7 @@ import { buildVorgang, initVorgaenge, objectIds } from '../../../support/vorgang registerLocaleData(localeDe, 'de', localeDeExtra); -describe('Bescheid Wizard', () => { +describe('Bescheid speichern', () => { const mainPage: MainPage = new MainPage(); const vorgangList: VorgangListE2EComponent = mainPage.getVorgangList(); @@ -74,8 +74,8 @@ describe('Bescheid Wizard', () => { bescheidWizard.getSaveButton().click(); contains(bescheidWizard.getStatusText(), abgelehntText + ' ' + getAdjustedDateGerman(-1)); - exist(bescheidWizard.getFileAnhangValid()); - exist(bescheidWizard.getFileBescheidValid()); + exist(bescheidWizard.getFileAnhangValidInWizard()); + exist(bescheidWizard.getFileBescheidValidInWizard()); contains(bescheidWizard.getResultBox(), manuellText); exist(bescheidWizard.getConfirmAndSaveButton()); }); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-senden.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-senden.cy.ts new file mode 100644 index 0000000000000000000000000000000000000000..b052d9316bdc8fed5dc4c4a59f7c11734d703b60 --- /dev/null +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-senden.cy.ts @@ -0,0 +1,115 @@ +import { registerLocaleData } from '@angular/common'; +import localeDe from '@angular/common/locales/de'; +import localeDeExtra from '@angular/common/locales/extra/de'; +import { + PostfachMailE2EComponent, + PostfachMailListItem, +} from 'apps/alfa-e2e/src/components/postfach/postfach-mail.e2e.component'; +import { VorgangBescheidWizardE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-bescheid-wizard.e2e.component'; +import { VorgangFormularButtonsE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-formular-buttons.e2e.components'; +import { VorgangE2E, VorgangStatusE2E } from 'apps/alfa-e2e/src/model/vorgang'; +import { PostfachMailPage } from 'apps/alfa-e2e/src/page-objects/postfach-mail.component.po'; +import { + TEST_FILE_BESCHEID_ANHANG_VALID, + TEST_FILE_BESCHEID_VALID, +} from 'apps/alfa-e2e/src/support/data.util'; +import { uploadFile } from 'apps/alfa-e2e/src/support/file-upload'; +import { getAdjustedDateGerman } from 'apps/alfa-e2e/src/support/tech.util'; +import 'cypress-real-events/support'; +import { VorgangListE2EComponent } from '../../../components/vorgang/vorgang-list.e2e.component'; +import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; +import { VorgangPage } from '../../../page-objects/vorgang.po'; +import { dropCollections } from '../../../support/cypress-helper'; +import { contains, enterWith, exist, notExist } from '../../../support/cypress.util'; +import { initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { buildVorgang, initVorgaenge, objectIds } from '../../../support/vorgang-util'; + +registerLocaleData(localeDe, 'de', localeDeExtra); + +describe('Bescheid senden', () => { + const mainPage: MainPage = new MainPage(); + const vorgangList: VorgangListE2EComponent = mainPage.getVorgangList(); + + const abgelehntText: string = 'Ihr Antrag wurde abgelehnt'; + const mailText: string = 'Ihr Bescheid zum Antrag'; + + const vorgangPage: VorgangPage = new VorgangPage(); + const bescheidWizard: VorgangBescheidWizardE2EComponent = vorgangPage.getBescheidWizard(); + const postfachMailContainer: PostfachMailE2EComponent = vorgangPage.getPostfachMailcontainer(); + const postfachMailPage: PostfachMailPage = new PostfachMailPage(); + + const bescheidSendenVorgang: VorgangE2E = { + ...buildVorgang(objectIds[0], 'Bescheid senden Vorgang'), + status: VorgangStatusE2E.IN_BEARBEITUNG, + }; + + const vorgangFormularButtons: VorgangFormularButtonsE2EComponent = + vorgangPage.getFormularButtons(); + + before(() => { + initVorgaenge([bescheidSendenVorgang]); + initUsermanagerUsers(); + + loginAsSabine(); + + waitForSpinnerToDisappear(); + exist(vorgangList.getRoot()); + }); + + after(() => { + dropCollections(); + }); + + describe('Send Bescheid message', () => { + describe('Show mail with attachments', () => { + it('should show mail to sender', () => { + vorgangList.getListItem(bescheidSendenVorgang.name).getRoot().click(); + waitForSpinnerToDisappear(); + + vorgangFormularButtons.getBescheidenButton().click(); + bescheidWizard.getAbgelehntButton().click(); + enterWith(bescheidWizard.getDateInput(), getAdjustedDateGerman(1)); + bescheidWizard.getWeiterButton().click(); + uploadFile(bescheidWizard.getUploadBescheidButton(), TEST_FILE_BESCHEID_VALID); + notExist(bescheidWizard.getBescheidUploadSpinner()); + uploadFile(bescheidWizard.getUploadAttachmentButton(), TEST_FILE_BESCHEID_ANHANG_VALID); + notExist(bescheidWizard.getAttachmentUploadSpinner()); + bescheidWizard.getWeiterButton().click(); + + bescheidWizard.getSendButton().click(); + waitForSpinnerToDisappear(); + + const postfachMailItem: PostfachMailListItem = postfachMailContainer.getListItem(mailText); + + exist(postfachMailItem.getRoot()); + }); + + it('should contain correct text and both attachments', () => { + const postfachMailItem: PostfachMailListItem = postfachMailContainer.getListItem(mailText); + + postfachMailItem.getRoot().click(); + waitForSpinnerToDisappear(); + + const postfachListItem: PostfachMailListItem = postfachMailPage.getListItem(mailText); + + contains(postfachMailPage.getMailText(), abgelehntText); + + exist( + postfachListItem + .getAttachmentContainer() + .getList() + .getItem(TEST_FILE_BESCHEID_VALID) + .getRoot(), + ); + + exist( + postfachListItem + .getAttachmentContainer() + .getList() + .getItem(TEST_FILE_BESCHEID_ANHANG_VALID) + .getRoot(), + ); + }); + }); + }); +}); diff --git a/alfa-client/apps/alfa-e2e/src/model/historie.ts b/alfa-client/apps/alfa-e2e/src/model/historie.ts index 32c7933764d7661336372f872661b1bd498ac2a8..4953299af7d1a0f7f7882a9dfb628b9e539e9dc8 100644 --- a/alfa-client/apps/alfa-e2e/src/model/historie.ts +++ b/alfa-client/apps/alfa-e2e/src/model/historie.ts @@ -39,6 +39,8 @@ export enum HistorieHeadlineE2E { WIEDERVORLAGE_WIEDEREROEFFNEN = 'eine Wiedervorlage als offen markiert.', AKTENZEICHEN_GEAENDERT = 'das Aktenzeichen geändert', AKTENZEICHEN_GELOESCHT = 'das Aktenzeichen gelöscht', + BESCHEID_ERSTELLT = 'einen Bescheid erstellt.', + BESCHEID_VERSCHICKT = 'einen Bescheid per Nachricht verschickt.', } export class HistorieE2E { diff --git a/alfa-client/apps/alfa-e2e/src/page-objects/postfach-mail.component.po.ts b/alfa-client/apps/alfa-e2e/src/page-objects/postfach-mail.component.po.ts index 8d072a9c8dc43fe7ff5a8a8263e1bdb32ced7e03..bdc5117cb20b887bf36518c3d69e953658dab84a 100644 --- a/alfa-client/apps/alfa-e2e/src/page-objects/postfach-mail.component.po.ts +++ b/alfa-client/apps/alfa-e2e/src/page-objects/postfach-mail.component.po.ts @@ -29,6 +29,7 @@ export class PostfachMailPage { private readonly breadcrump: string = 'postfach-breadcrump'; private readonly root: string = 'postfach-mail-list'; private readonly downloadButton: string = 'postfach-pdf-export-button'; + private readonly mailText: string = 'postfach-outgoing-nachricht'; private readonly subnavigation: PostfachMailSubnavigation = new PostfachMailSubnavigation(); @@ -51,4 +52,8 @@ export class PostfachMailPage { getDownloadButton() { return cy.getTestElement(this.downloadButton); } + + getMailText() { + return cy.getTestElement(this.mailText); + } } diff --git a/alfa-client/apps/alfa-e2e/src/page-objects/vorgang.po.ts b/alfa-client/apps/alfa-e2e/src/page-objects/vorgang.po.ts index 44f6c51044be9065646a91a1b9b7471bffdf40e6..835cc89685361d2d76198e0c331c3a81107fbce8 100644 --- a/alfa-client/apps/alfa-e2e/src/page-objects/vorgang.po.ts +++ b/alfa-client/apps/alfa-e2e/src/page-objects/vorgang.po.ts @@ -29,6 +29,7 @@ import { FixedDialogE2EComponent } from '../components/ui/fixed-dialog.e2e.compo import { VorgangAktenzeichenEditE2EComponent } from '../components/vorgang/vorgang-aktenzeichen-edit.e2e.component'; import { AntragstellerE2EComponent } from '../components/vorgang/vorgang-antragsteller.e2e.component'; import { VorgangBescheidWizardE2EComponent } from '../components/vorgang/vorgang-bescheid-wizard.e2e.component'; +import { VorgangBescheideE2EComponent } from '../components/vorgang/vorgang-bescheide.e2e.component'; import { VorgangDetailHeaderE2EComponent } from '../components/vorgang/vorgang-detail-header.e2e.component'; import { VorgangFormularButtonsE2EComponent } from '../components/vorgang/vorgang-formular-buttons.e2e.components'; import { VorgangFormularDatenE2EComponent } from '../components/vorgang/vorgang-formular.e2e.component'; @@ -51,6 +52,7 @@ export class VorgangPage { new VorgangAktenzeichenEditE2EComponent(); private readonly bescheidWizard: VorgangBescheidWizardE2EComponent = new VorgangBescheidWizardE2EComponent(); + private readonly bescheide: VorgangBescheideE2EComponent = new VorgangBescheideE2EComponent(); private readonly wiedervorlagen: WiedervorlagenInVorgangE2EComponent = new WiedervorlagenInVorgangE2EComponent(); private readonly forwardingContainer: VorgangForwardingE2EComponent = @@ -102,6 +104,10 @@ export class VorgangPage { return this.bescheidWizard; } + public getBescheide(): VorgangBescheideE2EComponent { + return this.bescheide; + } + public getAttachmentContainer(): AttachmentContainerE2EComponent { return this.attachmentContainer; } diff --git a/alfa-client/libs/bescheid/src/lib/bescheid-list-in-vorgang-container/bescheid-list-in-vorgang/bescheid-list-in-vorgang.component.html b/alfa-client/libs/bescheid/src/lib/bescheid-list-in-vorgang-container/bescheid-list-in-vorgang/bescheid-list-in-vorgang.component.html index 0f97585d1731dfd4dc2ed98138719e258add3912..8c0d2203d740cd0bba3db4dc9d8642178677d0ae 100644 --- a/alfa-client/libs/bescheid/src/lib/bescheid-list-in-vorgang-container/bescheid-list-in-vorgang/bescheid-list-in-vorgang.component.html +++ b/alfa-client/libs/bescheid/src/lib/bescheid-list-in-vorgang-container/bescheid-list-in-vorgang/bescheid-list-in-vorgang.component.html @@ -1,6 +1,7 @@ <div class="flex max-w-xl flex-col gap-4"> <ods-bescheid-container *ngFor="let bescheid of bescheidList | toEmbeddedResources: bescheidListLinkRel.BESCHEID_LIST" + data-test-id="bescheid-container-in-vorgang" > <ods-bescheid-status-text [bewilligt]="bescheid.bewilligt" diff --git a/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-area/vorgang-detail-area.component.html b/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-area/vorgang-detail-area.component.html index 222ea00eec815c3eaacc9bf26fbbceeb70cfa29d..ab08e19db0339b7d1aa5352adca61c0778cb7f95 100644 --- a/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-area/vorgang-detail-area.component.html +++ b/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-area/vorgang-detail-area.component.html @@ -39,10 +39,9 @@ ></alfa-vorgang-detail-formular-daten> <div *ngIf="vorgangResource | hasLink: vorgangWithEingangLinkRel.BESCHEIDE"> - <ozgcloud-expansion-panel headline="Bescheid"> - <alfa-bescheid-list-in-vorgang-container - data-test-id="bescheid-container-in-vorgang" - ></alfa-bescheid-list-in-vorgang-container> + <ozgcloud-expansion-panel headline="Bescheid" data-test-id="bescheid-expansion-panel"> + <alfa-bescheid-list-in-vorgang-container data-test-id="bescheid-container-in-vorgang"> + </alfa-bescheid-list-in-vorgang-container> </ozgcloud-expansion-panel> </div>