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

OZG-4310 remove OE tests from branch

parent be6383bc
No related branches found
No related tags found
No related merge requests found
import { exist, haveValue, typeText } from '../../support/cypress.util';
export class OrganisationseinheitenE2EComponent {
private readonly einheitenList: string = 'organisations-einheit-list';
private readonly einheitenItem: string = 'organisations-einheit-list-item';
public getOETable(): Cypress.Chainable<Element> {
return cy.getTestElement(this.einheitenList);
}
public getOEItemsList(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.getTestElement(this.einheitenItem);
}
public getOEItem(value: number): Cypress.Chainable<JQuery<HTMLElement>> {
return this.getOEItemsList().get(value);
}
public stringExistsInOEEntryNumber(phrase: string, user: string): void {
this.getUserEntry(user).within(() => {
exist(cy.contains(phrase));
});
}
public getSignaturText(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.getTestElement(this.signaturText);
}
public setSignatur(signatur: string): void {
typeText(this.getSignaturText(), signatur);
}
public clearSignatur(): void {
this.getSignaturText().type('{selectAll}{del}');
}
public getSaveButton(): Cypress.Chainable<Element> {
return cy.getTestElement(this.saveSignaturButton);
}
public saveSignatur(): void {
this.getSaveButton().click();
}
public signatureIs(compare: string): void {
haveValue(this.getSignaturText(), compare);
}
public scrollbarIsPresent(): void {
this.getSignaturText().then((textarea) => {
const scrollHeight: number = textarea[0].scrollHeight;
const clientHeight: number = textarea[0].clientHeight;
expect(scrollHeight).to.be.greaterThan(clientHeight);
});
}
}
import { OrganisationseinheitenE2EComponent } from '../../components/organisationseinheiten/organisationseinheiten.e2e.component';
import { MainPage, waitForSpinnerToDisappear } from '../../page-objects/main.po';
import { exist } from '../../support/cypress.util';
import { loginAsAriane } from '../../support/user-util';
describe('Signatur', () => {
const mainPage: MainPage = new MainPage();
const organisationseinheitenTab: OrganisationseinheitenE2EComponent = new OrganisationseinheitenE2EComponent();
before(() => {
loginAsAriane();
});
it('should show table of Organisationseinheiten', () => {
waitForSpinnerToDisappear();
mainPage.clickOrganisationseinheitenTab();
exist(organisationseinheitenTab.getOETable());
});
it('should show defined data ', () => {
organisationseinheitenTab.stringExistsInOEEntryNumber();
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment