From dbbda324f27b893450e36779219e7a51160b8eb6 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Tue, 19 Nov 2024 14:43:32 +0100
Subject: [PATCH] OZG-6967 more PR fixes

---
 .../organisationseinheiten-signatur.e2e.component.ts |  2 +-
 .../organisationseinheiten.e2e.component.ts          | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

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 b41da21bfa..041bf09320 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 7e535d5b82..f2c4e6ad13 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));
       });
   }
 
-- 
GitLab