Skip to content
Snippets Groups Projects
Commit 6cd38959 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6302 add component parts

parent 753bea36
No related branches found
No related tags found
No related merge requests found
import { enterWith } from '../../support/cypress.util';
export class VorgangZusammenarbeitE2EComponent { export class VorgangZusammenarbeitE2EComponent {
private readonly anfrageButton: string = 'anfrage-erstellen-button'; private readonly anfrageButton: string = 'anfrage-erstellen-button';
private readonly zustaendigeStelleButton: string = 'zustaendige-stelle-search-button';
private readonly titelText: string = 'Titel-text-input';
private readonly nachrichtText: string = 'Nachricht-textarea';
public getAnfrageButton(): Cypress.Chainable<JQuery<HTMLElement>> { public getAnfrageButton(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.getTestElement(this.anfrageButton); return cy.getTestElement(this.anfrageButton);
...@@ -8,4 +13,28 @@ export class VorgangZusammenarbeitE2EComponent { ...@@ -8,4 +13,28 @@ export class VorgangZusammenarbeitE2EComponent {
public createAnfrage(): void { public createAnfrage(): void {
this.getAnfrageButton().click(); this.getAnfrageButton().click();
} }
public getZustaendigeStelleButton(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.getTestElement(this.zustaendigeStelleButton);
}
public searchZustaendigeStelle(): void {
this.getZustaendigeStelleButton().click();
}
public getStelleTitel(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.getTestElement(this.titelText);
}
public enterTitel(text: string): void {
enterWith(this.getStelleTitel(), text);
}
public getStelleNachricht(): Cypress.Chainable<JQuery<HTMLElement>> {
return cy.getTestElement(this.nachrichtText);
}
public enterNachricht(text: string): void {
enterWith(this.getStelleNachricht(), text);
}
} }
...@@ -41,7 +41,7 @@ describe('Vorgang Zusammenarbeit anfragen', () => { ...@@ -41,7 +41,7 @@ describe('Vorgang Zusammenarbeit anfragen', () => {
dropCollections(); dropCollections();
}); });
describe('xxx', () => { describe('create new Anfrage', () => {
it('should show button for Zusammenarbeit', () => { it('should show button for Zusammenarbeit', () => {
vorgangList.getListItem(zusammenarbeitVorgang.name).getRoot().click(); vorgangList.getListItem(zusammenarbeitVorgang.name).getRoot().click();
waitForSpinnerToDisappear(); waitForSpinnerToDisappear();
...@@ -51,7 +51,8 @@ describe('Vorgang Zusammenarbeit anfragen', () => { ...@@ -51,7 +51,8 @@ describe('Vorgang Zusammenarbeit anfragen', () => {
it('should show input elements on Anfrage click', () => { it('should show input elements on Anfrage click', () => {
zusammenarbeitContainer.createAnfrage(); zusammenarbeitContainer.createAnfrage();
//UI Elemente prüfen
exist(zusammenarbeitContainer.getZustaendigeStelleButton());
}); });
it('should close elements on Cancel click', () => { it('should close elements on Cancel click', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment