From 5bd6318f4fe9507a581607e055ca9adfb1bd222a Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Tue, 10 Dec 2024 16:29:27 +0100
Subject: [PATCH] OZG-7021 improve tests

---
 alfa-client/apps/admin-e2e/src/page-objects/login.po.ts | 4 ++--
 alfa-client/apps/admin-e2e/src/support/cypress.util.ts  | 4 ++--
 alfa-client/apps/alfa-e2e/src/page-objects/login.po.ts  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/alfa-client/apps/admin-e2e/src/page-objects/login.po.ts b/alfa-client/apps/admin-e2e/src/page-objects/login.po.ts
index e44d469b42..73005caaf6 100644
--- a/alfa-client/apps/admin-e2e/src/page-objects/login.po.ts
+++ b/alfa-client/apps/admin-e2e/src/page-objects/login.po.ts
@@ -2,11 +2,11 @@ export class LoginPage {
   private readonly locatorLogin: string = '#kc-login';
   private readonly locatorBarrierefreiheitLink: string = '#kc-barrierefreiheit';
 
-  public getLogin() {
+  public getLogin(): Cypress.Chainable<JQuery<HTMLElement>> {
     return cy.get(this.locatorLogin);
   }
 
-  public getBarrierefreiheitLink() {
+  public getBarrierefreiheitLink(): Cypress.Chainable<JQuery<HTMLElement>> {
     return cy.get(this.locatorBarrierefreiheitLink);
   }
 }
diff --git a/alfa-client/apps/admin-e2e/src/support/cypress.util.ts b/alfa-client/apps/admin-e2e/src/support/cypress.util.ts
index cf78eeaa8b..60db5d0f86 100644
--- a/alfa-client/apps/admin-e2e/src/support/cypress.util.ts
+++ b/alfa-client/apps/admin-e2e/src/support/cypress.util.ts
@@ -33,11 +33,11 @@ export function notContainClass(element: Cypress.Chainable<Element>, cssClass: s
   element.should('not.have.class', cssClass);
 }
 
-export function exist(element: Cypress.Chainable<Element>): void {
+export function exist(element: Cypress.Chainable<Element> | Cypress.Chainable<JQuery<HTMLElement>>): void {
   element.should('exist');
 }
 
-export function notExist(element: Cypress.Chainable<Element>): void {
+export function notExist(element: Cypress.Chainable<Element> | Cypress.Chainable<JQuery<HTMLElement>>): void {
   element.should('not.exist');
 }
 
diff --git a/alfa-client/apps/alfa-e2e/src/page-objects/login.po.ts b/alfa-client/apps/alfa-e2e/src/page-objects/login.po.ts
index e44d469b42..73005caaf6 100644
--- a/alfa-client/apps/alfa-e2e/src/page-objects/login.po.ts
+++ b/alfa-client/apps/alfa-e2e/src/page-objects/login.po.ts
@@ -2,11 +2,11 @@ export class LoginPage {
   private readonly locatorLogin: string = '#kc-login';
   private readonly locatorBarrierefreiheitLink: string = '#kc-barrierefreiheit';
 
-  public getLogin() {
+  public getLogin(): Cypress.Chainable<JQuery<HTMLElement>> {
     return cy.get(this.locatorLogin);
   }
 
-  public getBarrierefreiheitLink() {
+  public getBarrierefreiheitLink(): Cypress.Chainable<JQuery<HTMLElement>> {
     return cy.get(this.locatorBarrierefreiheitLink);
   }
 }
-- 
GitLab