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
No related branches found
No related tags found
No related merge requests found
......@@ -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', () => {
......
......@@ -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);
......
......@@ -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 {
......
<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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment