diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/login-logout.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/login-logout.e2e-spec.ts index ec84715d89a06e7a1387f35a20b0a80cefbc18ec..379ffa34b06d70af4b98921cf2a013fe29050014 100644 --- a/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/login-logout.e2e-spec.ts +++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/login-logout.e2e-spec.ts @@ -25,8 +25,8 @@ import { App } from 'apps/goofy-e2e/src/model/app'; import { getApp } from 'apps/goofy-e2e/src/support/app-util'; import { UserE2E } from '../../../model/user'; import { HeaderE2EComponent } from '../../../page-objects/header.po'; -import { MainPage } from '../../../page-objects/main.po'; -import { exist, haveText } from '../../../support/cypress.util'; +import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; +import { exist } from '../../../support/cypress.util'; import { getUserSabine } from '../../../support/user-util'; describe('Login and Logout', () => { @@ -49,8 +49,9 @@ describe('Login and Logout', () => { .get('#kc-login').click(); }) - it('should display Goofy', () => { - haveText(header.getTitle(), app.title); + it('should display Alfa logo', () => { + waitForSpinnerToDisappear(); + exist(header.getLogo()); }) it('should logout', () => { diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/wiedervorlage/wiedervorlage-authorize-by-role.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/wiedervorlage/wiedervorlage-authorize-by-role.e2e-spec.ts index 7016e8865386c7c6028235ac7c83dc2a6c1903e8..d00c8922b9e6c8159705a5fa252e406a3df90992 100644 --- a/goofy-client/apps/goofy-e2e/src/integration/main-tests/wiedervorlage/wiedervorlage-authorize-by-role.e2e-spec.ts +++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/wiedervorlage/wiedervorlage-authorize-by-role.e2e-spec.ts @@ -74,7 +74,7 @@ describe('Wiedervorlage should be authorized by role', () => { visitUrl(vorgangInStatusNeuUrl); waitForSpinnerToDisappear(); - exist(mainPage.getHeader().getTitle()); + exist(mainPage.getHeader().getLogo()); notExist(wiedervorlagePage.getRoot()); }) @@ -84,7 +84,7 @@ describe('Wiedervorlage should be authorized by role', () => { visitUrl(vorgangInStatusInBearbeitungUrl); waitForSpinnerToDisappear(); - exist(mainPage.getHeader().getTitle()); + exist(mainPage.getHeader().getLogo()); contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN); notExist(wiedervorlagePage.getRoot()); }) @@ -93,7 +93,7 @@ describe('Wiedervorlage should be authorized by role', () => { visitUrl(vorgangInStatusAbgeschlossenUrl); waitForSpinnerToDisappear(); - exist(mainPage.getHeader().getTitle()); + exist(mainPage.getHeader().getLogo()); notExist(wiedervorlagePage.getRoot()); notExist(wiedervorlageSubnavigation.getRoot()); contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN); @@ -103,7 +103,7 @@ describe('Wiedervorlage should be authorized by role', () => { visitUrl(vorgangInStatusBeschiedenUrl); waitForSpinnerToDisappear(); - exist(mainPage.getHeader().getTitle()); + exist(mainPage.getHeader().getLogo()); notExist(wiedervorlagePage.getRoot()); notExist(wiedervorlageSubnavigation.getRoot()); contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN); diff --git a/goofy-client/apps/goofy-e2e/src/page-objects/header.po.ts b/goofy-client/apps/goofy-e2e/src/page-objects/header.po.ts index 497a51e0e0e2b0ea82aa67144eb7bdf47f9c79e7..d70f7c5031ae95b5fa6157804f66dd5f9fcb8f7f 100644 --- a/goofy-client/apps/goofy-e2e/src/page-objects/header.po.ts +++ b/goofy-client/apps/goofy-e2e/src/page-objects/header.po.ts @@ -26,7 +26,7 @@ import { UserSettingsE2EComponent } from "../components/user-settings/user-setti export class HeaderE2EComponent { - private readonly locatorTitle: string = 'title'; + private readonly locatorLogo: string = 'alfa-logo'; private readonly locatorRoot: string = 'header'; private readonly locatorNavigationToggle: string = 'navigation-toggle'; @@ -37,8 +37,8 @@ export class HeaderE2EComponent { return cy.getTestElement(this.locatorRoot); } - public getTitle() { - return cy.getTestElement(this.locatorTitle); + public getLogo() { + return cy.getTestElement(this.locatorLogo); } public getUserSettings(): UserSettingsE2EComponent { diff --git a/goofy-client/libs/navigation/src/lib/header-container/header/header-logo/header-logo.component.html b/goofy-client/libs/navigation/src/lib/header-container/header/header-logo/header-logo.component.html index 11acab1e069357c446cec1355b73fc2643a12653..8597db34694a4c478889365a5a3ddf79fbc5598c 100644 --- a/goofy-client/libs/navigation/src/lib/header-container/header/header-logo/header-logo.component.html +++ b/goofy-client/libs/navigation/src/lib/header-container/header/header-logo/header-logo.component.html @@ -1,3 +1,3 @@ <a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }"> - <img src="/assets/img/logo.svg" alt="Alfa Logo"/> + <img src="/assets/img/logo.svg" alt="Alfa Logo" data-test-id="alfa-logo" /> </a>