From d83a691d9cd8b0bb95992b70f42d9eff6f7c0d6c Mon Sep 17 00:00:00 2001 From: Albert <Albert.Bruns@mgm-tp.com> Date: Tue, 29 Apr 2025 14:21:08 +0200 Subject: [PATCH] OZG-7773 CR Anmerkungen --- .../postfach-nachricht-mark-unread.cy.ts | 24 +++++++++---------- .../src/helper/postfach/postfach.helper.ts | 8 +++---- .../src/helper/postfach/postfach.verifier.ts | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-nachricht-mark-unread.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-nachricht-mark-unread.cy.ts index 160e551aff..5fa3d4ebee 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-nachricht-mark-unread.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-nachricht-mark-unread.cy.ts @@ -63,47 +63,47 @@ describe('Postfach Nachrichten mark unread', () => { dropCollections(); }); - describe('new message symbol', () => { - it('should not display badge', () => { + describe('mail icon', () => { + it('should not have unread badge', () => { vorgangNavigator.openVorgang(vorgang.name); postfachVerifier.verifyMailIconWithoutBadgeExists(); }); - it('should display badge on new message', () => { + it('should have unread badge', () => { vorgangNavigator.openVorgang(vorgangWithReply.name); postfachVerifier.verifyMailIconWithBadgeExists(); }); - it('should not display badge after reading message', () => { - postfachHelper.goToPostfach(); + it('should not have unread badge after messages were read', () => { + postfachHelper.navigateToPostfach(); postfachMailPage.getSubnavigation().getBackButton().click(); postfachVerifier.verifyMailIconWithoutBadgeExists(); }); }); - describe('mail unread button', () => { - it('should display icon button in subnavigation', () => { - postfachHelper.goToPostfach(); + describe('mark as unread button', () => { + it('should be displayed as action button', () => { + postfachHelper.navigateToPostfach(); exist(postfachMailPage.getSubnavigation().getMailUnreadButton()); }); - it('should navigate back and not show badge on icon button click', () => { + it('should navigate back and mark messages as unread', () => { postfachMailPage.getSubnavigation().getMailUnreadButton().click(); postfachVerifier.verifyMailIconWithBadgeExists(); }); - it('should display button below mails', () => { - postfachHelper.goToPostfach(); + it('should be displayed as button', () => { + postfachHelper.navigateToPostfach(); exist(postfachMailPage.getMailUnreadButton()); }); - it('should navigate back and not show badge on button click', () => { + it('should navigate back and mark messages as unread', () => { postfachMailPage.getMailUnreadButton().click(); postfachVerifier.verifyMailIconWithBadgeExists(); diff --git a/alfa-client/apps/alfa-e2e/src/helper/postfach/postfach.helper.ts b/alfa-client/apps/alfa-e2e/src/helper/postfach/postfach.helper.ts index 4c910969d1..29040f6639 100644 --- a/alfa-client/apps/alfa-e2e/src/helper/postfach/postfach.helper.ts +++ b/alfa-client/apps/alfa-e2e/src/helper/postfach/postfach.helper.ts @@ -4,12 +4,12 @@ import { exist } from '../../support/cypress.util'; import { E2EAppHelper } from '../app.helper'; export class E2EPostfachHelper { - appHelper: E2EAppHelper = new E2EAppHelper(); - postfachMailPage: PostfachMailPage = new PostfachMailPage(); + private readonly appHelper: E2EAppHelper = new E2EAppHelper(); + private readonly postfachMailPage: PostfachMailPage = new PostfachMailPage(); - public goToPostfach(): void { + public navigateToPostfach(): void { this.appHelper.navigateRelative('postfach'); - exist(this.postfachMailPage.getRoot()); waitForSpinnerToDisappear(); + exist(this.postfachMailPage.getRoot()); } } diff --git a/alfa-client/apps/alfa-e2e/src/helper/postfach/postfach.verifier.ts b/alfa-client/apps/alfa-e2e/src/helper/postfach/postfach.verifier.ts index bf5346a1be..d20b3070f6 100644 --- a/alfa-client/apps/alfa-e2e/src/helper/postfach/postfach.verifier.ts +++ b/alfa-client/apps/alfa-e2e/src/helper/postfach/postfach.verifier.ts @@ -2,7 +2,7 @@ import { VorgangPage } from '../../page-objects/vorgang.po'; import { exist, notExist } from '../../support/cypress.util'; export class E2EPostfachVerifier { - vorgangPage: VorgangPage = new VorgangPage(); + private readonly vorgangPage: VorgangPage = new VorgangPage(); verifyMailIconWithoutBadgeExists(): void { exist(this.vorgangPage.getPostfachMailcontainer().getMailIcon()); -- GitLab