diff --git a/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten-signatur.e2e.component.ts b/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten-signatur.e2e.component.ts index b41da21bfa3fbe0619050fcf5053d7a749f4835c..041bf093208cf29e77862ebab47324e04691eb14 100644 --- a/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten-signatur.e2e.component.ts +++ b/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten-signatur.e2e.component.ts @@ -6,7 +6,7 @@ export class OrganisationseinheitenSignaturE2EComponent { private readonly saveSignatureButton: string = 'save-button'; public getOrganisationsEinheitName(): Cypress.Chainable<Element> { - return cy.getTestElement(this.organisationsEinheitName).should('exist'); + return cy.getTestElement(this.organisationsEinheitName); } public getSignatureText(): Cypress.Chainable<Element> { diff --git a/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component.ts b/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component.ts index 7e535d5b824d7ce4f6c406d7eca9a0ea0aa6390d..f2c4e6ad137d219cc60a2055192098136270ec3f 100644 --- a/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component.ts +++ b/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component.ts @@ -1,4 +1,4 @@ -import { notContainClass } from '../../support/cypress.util'; +import { containClass, exist, haveText, notContainClass } from '../../support/cypress.util'; export class OrganisationsEinheitenE2EComponent { private readonly organisationsEinheitenList: string = 'organisations-einheit-list'; @@ -10,11 +10,11 @@ export class OrganisationsEinheitenE2EComponent { private readonly errorText: string = 'Organisationseinheit wurde nicht in den PVOG-Daten gefunden.'; 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>> { - return cy.getTestElement(this.organisationsEinheitenName).contains(name).should('exist'); + return cy.getTestElement(this.organisationsEinheitenName).contains(name); } public openOrganisationsEinheit(name: string): void { @@ -25,19 +25,19 @@ export class OrganisationsEinheitenE2EComponent { this.getListItemByName(name) .parents('a') .within(() => { - cy.getTestElement(this.organisationsEinheitenID).should('have.text', id); + haveText(cy.getTestElement(this.organisationsEinheitenID), id); }); } 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>> { return this.getListItemByName(name) .parents('a') .within(() => { - cy.getTestElement(this.errorIcon).should('exist'); + exist(cy.getTestElement(this.errorIcon)); }); }