Skip to content
Snippets Groups Projects
Commit 176326f6 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6368 updated tests

parent d5f913f5
No related branches found
No related tags found
No related merge requests found
import { haveValue, typeText } from '../../support/cypress.util';
export class PostfachE2EComponent {
private readonly signaturText: string = 'signatur-text';
private readonly signaturText: string = 'signature-textarea';
private readonly saveSignaturButton: string = 'save-button';
public getSignaturText(): any {
......@@ -12,6 +12,10 @@ export class PostfachE2EComponent {
typeText(this.getSignaturText(), signatur);
}
public clearSignatur(): void {
this.getSignaturText().type('{selectAll}{del}');
}
public getSaveButton(): Cypress.Chainable<Element> {
return cy.getTestElement(this.saveSignaturButton);
}
......
......@@ -17,15 +17,11 @@ describe('Login and Logout', () => {
});
it('should display logo', () => {
// waitForSpinnerToDisappear();
exist(header.getLogo());
});
it('should keep user logged in on reload page', () => {
reload();
// waitForSpinnerToDisappear();
exist(header.getLogo());
});
......
import { BuildInfoE2EComponent } from '../../components/buildinfo/buildinfo.e2e.component';
import { HeaderE2EComponent } from '../../page-objects/header.po';
import { MainPage } from '../../page-objects/main.po';
import { exist } from '../../support/cypress.util';
import { loginAsAriane } from '../../support/user-util';
describe('Buildinfo', () => {
const mainPage: MainPage = new MainPage();
const header: HeaderE2EComponent = mainPage.getHeader();
const buildInfo: BuildInfoE2EComponent = mainPage.getBuildInfo();
before(() => {
it('should login as Ariane', () => {
loginAsAriane();
});
describe('get buildinfo', () => {
it('should show version', () => {
exist(buildInfo.getVersion());
header.getCurrentUserProfile().logout();
});
});
});
import { PostfachE2EComponent } from '../../components/postfach/postfach.e2e.component';
import { HeaderE2EComponent } from '../../page-objects/header.po';
import { MainPage } from '../../page-objects/main.po';
import { MainPage, waitForSpinnerToDisappear } from '../../page-objects/main.po';
import { exist } from '../../support/cypress.util';
import { loginAsAriane } from '../../support/user-util';
......@@ -16,14 +16,17 @@ describe('Signatur', () => {
});
it('should show Signatur input', () => {
// waitForSpinnerToDisappear();
waitForSpinnerToDisappear();
exist(postfachTab.getSignaturText());
// postfachTab.setSignatur(signaturText);
// postfachTab.saveSignatur();
postfachTab.clearSignatur();
postfachTab.setSignatur(signaturText);
postfachTab.saveSignatur();
// postfachTab.signatureContains(signaturText);
// postfachTab.scrollbarIsPresent();
postfachTab.signatureContains(signaturText);
postfachTab.scrollbarIsPresent();
header.getCurrentUserProfile().logout();
});
});
......@@ -106,7 +106,7 @@ export function enterWith(
}
export function typeText(element: Cypress.Chainable<JQuery<HTMLElement>>, value: string): void {
element.clear().type(value);
element.type(value);
}
export function backspaceOn(element: any): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment