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

OZG-6967 more PR fixes

parent 950c08f9
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ export class OrganisationseinheitenSignaturE2EComponent { ...@@ -6,7 +6,7 @@ export class OrganisationseinheitenSignaturE2EComponent {
private readonly saveSignatureButton: string = 'save-button'; private readonly saveSignatureButton: string = 'save-button';
public getOrganisationsEinheitName(): Cypress.Chainable<Element> { public getOrganisationsEinheitName(): Cypress.Chainable<Element> {
return cy.getTestElement(this.organisationsEinheitName).should('exist'); return cy.getTestElement(this.organisationsEinheitName);
} }
public getSignatureText(): Cypress.Chainable<Element> { public getSignatureText(): Cypress.Chainable<Element> {
......
import { notContainClass } from '../../support/cypress.util'; import { containClass, exist, haveText, notContainClass } from '../../support/cypress.util';
export class OrganisationsEinheitenE2EComponent { export class OrganisationsEinheitenE2EComponent {
private readonly organisationsEinheitenList: string = 'organisations-einheit-list'; private readonly organisationsEinheitenList: string = 'organisations-einheit-list';
...@@ -10,11 +10,11 @@ export class OrganisationsEinheitenE2EComponent { ...@@ -10,11 +10,11 @@ export class OrganisationsEinheitenE2EComponent {
private readonly errorText: string = 'Organisationseinheit wurde nicht in den PVOG-Daten gefunden.'; private readonly errorText: string = 'Organisationseinheit wurde nicht in den PVOG-Daten gefunden.';
public getOrganisationsEinheitList(): Cypress.Chainable<Element> { public getOrganisationsEinheitList(): Cypress.Chainable<Element> {
return cy.getTestElement(this.organisationsEinheitenList).should('exist'); return cy.getTestElement(this.organisationsEinheitenList);
} }
public getListItemByName(name: string): Cypress.Chainable<JQuery<HTMLElement>> { public getListItemByName(name: string): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.getTestElement(this.organisationsEinheitenName).contains(name).should('exist'); return cy.getTestElement(this.organisationsEinheitenName).contains(name);
} }
public openOrganisationsEinheit(name: string): void { public openOrganisationsEinheit(name: string): void {
...@@ -25,19 +25,19 @@ export class OrganisationsEinheitenE2EComponent { ...@@ -25,19 +25,19 @@ export class OrganisationsEinheitenE2EComponent {
this.getListItemByName(name) this.getListItemByName(name)
.parents('a') .parents('a')
.within(() => { .within(() => {
cy.getTestElement(this.organisationsEinheitenID).should('have.text', id); haveText(cy.getTestElement(this.organisationsEinheitenID), id);
}); });
} }
public elementIsShownAsError(name: string): void { public elementIsShownAsError(name: string): void {
this.getListItemByName(name).closest('ods-list-item').should('have.class', this.errorColor); containClass(this.getListItemByName(name).closest('ods-list-item'), this.errorColor);
} }
public getErrorIconInElement(name: string): Cypress.Chainable<JQuery<HTMLAnchorElement>> { public getErrorIconInElement(name: string): Cypress.Chainable<JQuery<HTMLAnchorElement>> {
return this.getListItemByName(name) return this.getListItemByName(name)
.parents('a') .parents('a')
.within(() => { .within(() => {
cy.getTestElement(this.errorIcon).should('exist'); exist(cy.getTestElement(this.errorIcon));
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment