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

OZG-7021 improve tests

parent 45924c77
No related branches found
No related tags found
No related merge requests found
...@@ -2,11 +2,11 @@ export class LoginPage { ...@@ -2,11 +2,11 @@ export class LoginPage {
private readonly locatorLogin: string = '#kc-login'; private readonly locatorLogin: string = '#kc-login';
private readonly locatorBarrierefreiheitLink: string = '#kc-barrierefreiheit'; private readonly locatorBarrierefreiheitLink: string = '#kc-barrierefreiheit';
public getLogin() { public getLogin(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.get(this.locatorLogin); return cy.get(this.locatorLogin);
} }
public getBarrierefreiheitLink() { public getBarrierefreiheitLink(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.get(this.locatorBarrierefreiheitLink); return cy.get(this.locatorBarrierefreiheitLink);
} }
} }
...@@ -33,11 +33,11 @@ export function notContainClass(element: Cypress.Chainable<Element>, cssClass: s ...@@ -33,11 +33,11 @@ export function notContainClass(element: Cypress.Chainable<Element>, cssClass: s
element.should('not.have.class', cssClass); 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'); 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'); element.should('not.exist');
} }
......
...@@ -2,11 +2,11 @@ export class LoginPage { ...@@ -2,11 +2,11 @@ export class LoginPage {
private readonly locatorLogin: string = '#kc-login'; private readonly locatorLogin: string = '#kc-login';
private readonly locatorBarrierefreiheitLink: string = '#kc-barrierefreiheit'; private readonly locatorBarrierefreiheitLink: string = '#kc-barrierefreiheit';
public getLogin() { public getLogin(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.get(this.locatorLogin); return cy.get(this.locatorLogin);
} }
public getBarrierefreiheitLink() { public getBarrierefreiheitLink(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.get(this.locatorBarrierefreiheitLink); return cy.get(this.locatorBarrierefreiheitLink);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment