Skip to content
Snippets Groups Projects
Commit 4499b9dc authored by OZGCloud's avatar OZGCloud
Browse files

OZG-3365 OZG-3399 E2E test for Alfa logo

parent 9a6400cc
Branches
Tags
No related merge requests found
...@@ -25,8 +25,8 @@ import { App } from 'apps/goofy-e2e/src/model/app'; ...@@ -25,8 +25,8 @@ import { App } from 'apps/goofy-e2e/src/model/app';
import { getApp } from 'apps/goofy-e2e/src/support/app-util'; import { getApp } from 'apps/goofy-e2e/src/support/app-util';
import { UserE2E } from '../../../model/user'; import { UserE2E } from '../../../model/user';
import { HeaderE2EComponent } from '../../../page-objects/header.po'; import { HeaderE2EComponent } from '../../../page-objects/header.po';
import { MainPage } from '../../../page-objects/main.po'; import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po';
import { exist, haveText } from '../../../support/cypress.util'; import { exist } from '../../../support/cypress.util';
import { getUserSabine } from '../../../support/user-util'; import { getUserSabine } from '../../../support/user-util';
describe('Login and Logout', () => { describe('Login and Logout', () => {
...@@ -49,8 +49,9 @@ describe('Login and Logout', () => { ...@@ -49,8 +49,9 @@ describe('Login and Logout', () => {
.get('#kc-login').click(); .get('#kc-login').click();
}) })
it('should display Goofy', () => { it('should display Alfa logo', () => {
haveText(header.getTitle(), app.title); waitForSpinnerToDisappear();
exist(header.getLogo());
}) })
it('should logout', () => { it('should logout', () => {
......
...@@ -74,7 +74,7 @@ describe('Wiedervorlage should be authorized by role', () => { ...@@ -74,7 +74,7 @@ describe('Wiedervorlage should be authorized by role', () => {
visitUrl(vorgangInStatusNeuUrl); visitUrl(vorgangInStatusNeuUrl);
waitForSpinnerToDisappear(); waitForSpinnerToDisappear();
exist(mainPage.getHeader().getTitle()); exist(mainPage.getHeader().getLogo());
notExist(wiedervorlagePage.getRoot()); notExist(wiedervorlagePage.getRoot());
}) })
...@@ -84,7 +84,7 @@ describe('Wiedervorlage should be authorized by role', () => { ...@@ -84,7 +84,7 @@ describe('Wiedervorlage should be authorized by role', () => {
visitUrl(vorgangInStatusInBearbeitungUrl); visitUrl(vorgangInStatusInBearbeitungUrl);
waitForSpinnerToDisappear(); waitForSpinnerToDisappear();
exist(mainPage.getHeader().getTitle()); exist(mainPage.getHeader().getLogo());
contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN); contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN);
notExist(wiedervorlagePage.getRoot()); notExist(wiedervorlagePage.getRoot());
}) })
...@@ -93,7 +93,7 @@ describe('Wiedervorlage should be authorized by role', () => { ...@@ -93,7 +93,7 @@ describe('Wiedervorlage should be authorized by role', () => {
visitUrl(vorgangInStatusAbgeschlossenUrl); visitUrl(vorgangInStatusAbgeschlossenUrl);
waitForSpinnerToDisappear(); waitForSpinnerToDisappear();
exist(mainPage.getHeader().getTitle()); exist(mainPage.getHeader().getLogo());
notExist(wiedervorlagePage.getRoot()); notExist(wiedervorlagePage.getRoot());
notExist(wiedervorlageSubnavigation.getRoot()); notExist(wiedervorlageSubnavigation.getRoot());
contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN); contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN);
...@@ -103,7 +103,7 @@ describe('Wiedervorlage should be authorized by role', () => { ...@@ -103,7 +103,7 @@ describe('Wiedervorlage should be authorized by role', () => {
visitUrl(vorgangInStatusBeschiedenUrl); visitUrl(vorgangInStatusBeschiedenUrl);
waitForSpinnerToDisappear(); waitForSpinnerToDisappear();
exist(mainPage.getHeader().getTitle()); exist(mainPage.getHeader().getLogo());
notExist(wiedervorlagePage.getRoot()); notExist(wiedervorlagePage.getRoot());
notExist(wiedervorlageSubnavigation.getRoot()); notExist(wiedervorlageSubnavigation.getRoot());
contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN); contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN);
......
...@@ -26,7 +26,7 @@ import { UserSettingsE2EComponent } from "../components/user-settings/user-setti ...@@ -26,7 +26,7 @@ import { UserSettingsE2EComponent } from "../components/user-settings/user-setti
export class HeaderE2EComponent { export class HeaderE2EComponent {
private readonly locatorTitle: string = 'title'; private readonly locatorLogo: string = 'alfa-logo';
private readonly locatorRoot: string = 'header'; private readonly locatorRoot: string = 'header';
private readonly locatorNavigationToggle: string = 'navigation-toggle'; private readonly locatorNavigationToggle: string = 'navigation-toggle';
...@@ -37,8 +37,8 @@ export class HeaderE2EComponent { ...@@ -37,8 +37,8 @@ export class HeaderE2EComponent {
return cy.getTestElement(this.locatorRoot); return cy.getTestElement(this.locatorRoot);
} }
public getTitle() { public getLogo() {
return cy.getTestElement(this.locatorTitle); return cy.getTestElement(this.locatorLogo);
} }
public getUserSettings(): UserSettingsE2EComponent { public getUserSettings(): UserSettingsE2EComponent {
......
<a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }"> <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> </a>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment