Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class BackendConfigurationPropertyWorkersPage extends PageWithNavbarPage {
return cy.get('#lastName').should('be.visible').should('be.enabled');
};

public createEmailInput() {
return cy.get('#workerEmail').should('be.visible').should('be.enabled');
};

public getFirstRowObject() {
return new WorkerRowObject().getRow(1);
};
Expand All @@ -66,6 +70,10 @@ class BackendConfigurationPropertyWorkersPage extends PageWithNavbarPage {
return cy.get('#lastName').should('be.visible').should('be.enabled');
};

public editEmailInput() {
return cy.get('#workerEmail').should('be.visible').should('be.enabled');
};

public saveEditBtn() {
return cy.get('#saveEditBtn').should('be.visible').should('be.enabled');
};
Expand Down Expand Up @@ -126,6 +134,9 @@ class BackendConfigurationPropertyWorkersPage extends PageWithNavbarPage {
if (propertyWorker.surname) {
this.createLastNameInput().should('be.visible').clear().type(propertyWorker.surname);
}
if (propertyWorker.workerEmail) {
this.createEmailInput().should('be.visible').clear().type(propertyWorker.workerEmail);
}
if (propertyWorker.language) {
selectLanguage('#profileLanguageSelector', propertyWorker.language);
}
Expand Down Expand Up @@ -233,4 +244,5 @@ export class PropertyWorker {
language?: string;
properties?: string[];
workOrderFlow?: boolean;
workerEmail?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ class BackendConfigurationPropertyWorkersPage extends Page {
return ele;
}

public async createEmailInput(): Promise<WebdriverIO.Element> {
const ele = await $('#workerEmail');
await ele.waitForDisplayed({ timeout: 40000 });
// ele.waitForClickable({timeout: 40000});
return ele;
}

async getFirstRowObject(): Promise<PropertyWorkerRowObject> {
const result = new PropertyWorkerRowObject();
return await result.getRow(1);
Expand Down Expand Up @@ -84,6 +91,13 @@ class BackendConfigurationPropertyWorkersPage extends Page {
return ele;
}

public async editEmailInput(): Promise<WebdriverIO.Element> {
const ele = await $('#workerEmail');
await ele.waitForDisplayed({ timeout: 40000 });
// await ele.waitForClickable({ timeout: 40000 });
return ele;
}

public async saveEditBtn(): Promise<WebdriverIO.Element> {
const ele = await $('#saveEditBtn');
await ele.waitForDisplayed({ timeout: 40000 });
Expand Down Expand Up @@ -192,6 +206,11 @@ class BackendConfigurationPropertyWorkersPage extends Page {
await backendConfigurationPropertyWorkersPage.createLastNameInput()
).setValue(propertyWorker.surname);
}
if (propertyWorker.workerEmail) {
await (
await backendConfigurationPropertyWorkersPage.createEmailInput()
).setValue(propertyWorker.workerEmail);
}
if (propertyWorker.language) {
await (
await (
Expand Down Expand Up @@ -335,6 +354,12 @@ export class PropertyWorkerRowObject {
).setValue(propertyWorker.surname);
await browser.pause(500);
}
if (propertyWorker.workerEmail) {
await (
await backendConfigurationPropertyWorkersPage.editEmailInput()
).setValue(propertyWorker.workerEmail);
await browser.pause(500);
}
if (propertyWorker.language) {
await (
await (
Expand Down Expand Up @@ -415,5 +440,6 @@ export class PropertyWorker {
surname?: string;
language?: string;
properties?: number[];
workOrderFlow?: boolean
workOrderFlow?: boolean;
workerEmail?: string;
}
Loading