Skip to content
Snippets Groups Projects
Verified Commit d884436e authored by Sebastian Bergandy's avatar Sebastian Bergandy :keyboard:
Browse files

OZG-6988 add missing types

Sub task: OZG-67455
parent 22c8fd44
No related branches found
No related tags found
1 merge request!34OZG-6988 add e2e tests
...@@ -8,7 +8,7 @@ export class StatistikFieldsFormE2EComponent { ...@@ -8,7 +8,7 @@ export class StatistikFieldsFormE2EComponent {
private readonly locatorSaveButton: string = 'save-statistik-fields-button'; private readonly locatorSaveButton: string = 'save-statistik-fields-button';
private readonly locatorCancelButton: string = 'cancel-statistik-fields-button'; private readonly locatorCancelButton: string = 'cancel-statistik-fields-button';
public getFormEngineInput() { public getFormEngineInput(): Cypress.Chainable<Element> {
return cy.getTestElement(this.locatorFormEngineInput); return cy.getTestElement(this.locatorFormEngineInput);
} }
...@@ -16,7 +16,7 @@ export class StatistikFieldsFormE2EComponent { ...@@ -16,7 +16,7 @@ export class StatistikFieldsFormE2EComponent {
enterWith(this.getFormEngineInput(), text); enterWith(this.getFormEngineInput(), text);
} }
public getFormIdInput() { public getFormIdInput(): Cypress.Chainable<Element> {
return cy.getTestElement(this.locatorFormIdInput); return cy.getTestElement(this.locatorFormIdInput);
} }
...@@ -24,7 +24,7 @@ export class StatistikFieldsFormE2EComponent { ...@@ -24,7 +24,7 @@ export class StatistikFieldsFormE2EComponent {
enterWith(this.getFormIdInput(), text); enterWith(this.getFormIdInput(), text);
} }
public getAddFieldButton() { public getAddFieldButton(): Cypress.Chainable<Element> {
return cy.getTestElement(this.locatorAddFieldButton); return cy.getTestElement(this.locatorAddFieldButton);
} }
...@@ -32,7 +32,7 @@ export class StatistikFieldsFormE2EComponent { ...@@ -32,7 +32,7 @@ export class StatistikFieldsFormE2EComponent {
this.getAddFieldButton().click(); this.getAddFieldButton().click();
} }
public getDataFieldInput(index: number) { public getDataFieldInput(index: number): Cypress.Chainable<Element> {
return cy.getTestElement(this.locatorFormDataFieldInput + index); return cy.getTestElement(this.locatorFormDataFieldInput + index);
} }
...@@ -40,7 +40,7 @@ export class StatistikFieldsFormE2EComponent { ...@@ -40,7 +40,7 @@ export class StatistikFieldsFormE2EComponent {
enterWith(this.getDataFieldInput(index), text); enterWith(this.getDataFieldInput(index), text);
} }
public getSaveButton() { public getSaveButton(): Cypress.Chainable<Element> {
return cy.getTestElement(this.locatorSaveButton); return cy.getTestElement(this.locatorSaveButton);
} }
...@@ -48,7 +48,7 @@ export class StatistikFieldsFormE2EComponent { ...@@ -48,7 +48,7 @@ export class StatistikFieldsFormE2EComponent {
this.getSaveButton().click(); this.getSaveButton().click();
} }
public getCancelButton() { public getCancelButton(): Cypress.Chainable<Element> {
return cy.getTestElement(this.locatorCancelButton); return cy.getTestElement(this.locatorCancelButton);
} }
......
...@@ -23,6 +23,7 @@ describe('Felder in Statistik hinzufügen', () => { ...@@ -23,6 +23,7 @@ describe('Felder in Statistik hinzufügen', () => {
it('should navigate to route', () => { it('should navigate to route', () => {
component.getWeiterFelderAuswertenButton().click(); component.getWeiterFelderAuswertenButton().click();
urlShouldEndsWith(ROUTES.STATISTIK_NEU); urlShouldEndsWith(ROUTES.STATISTIK_NEU);
}); });
......
...@@ -67,7 +67,7 @@ export function urlShouldInclude(text: string) { ...@@ -67,7 +67,7 @@ export function urlShouldInclude(text: string) {
return cy.url().should('include', text); return cy.url().should('include', text);
} }
export function urlShouldEndsWith(route: string) { export function urlShouldEndsWith(route: string): Cypress.Chainable<any> {
return cy.url().should('match', new RegExp(`/${route}$`)); return cy.url().should('match', new RegExp(`/${route}$`));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment