Skip to content

Commit 3910617

Browse files
committed
Fixing more tests.
1 parent 902e876 commit 3910617

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationTaskManagement.page.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ export class TaskRowObject {
381381
this.createdBy1 = await (await $$('td.createdByName')[rowNum]).getText();
382382
this.createdBy2 = await (await $$('td.createdByText')[rowNum]).getText();
383383
this.lastAssignedTo = await (await $$('td.lastAssignedTo')[rowNum]).getText();
384-
this.showTaskBtn = await $$('button.taskManagementViewBtn')[rowNum];
385-
this.deleteTaskBtn = await $$('button.taskManagementDeleteTaskBtn')[rowNum];
384+
this.showTaskBtn = await $('#taskManagementViewBtn-'+rowNum);
385+
this.deleteTaskBtn = await $('#taskManagementDeleteTaskBtn-'+rowNum);
386386
this.description = await (await $$('td.description')[rowNum]).getText();
387387
this.lastUpdatedDate = await (await $$('td.lastUpdateDate')[rowNum]).getText();
388388
this.lastUpdatedBy = await (await $$('td.lastUpdatedBy')[rowNum]).getText();
@@ -391,20 +391,16 @@ export class TaskRowObject {
391391
}
392392

393393
public async delete(clickCancel = false) {
394-
if (this.deleteTaskBtn) {
395-
await this.clickActionsMenu();
396-
await this.openDeleteModal();
397-
await this.closeDeleteModal(clickCancel);
398-
}
394+
await this.clickActionsMenu();
395+
await this.openDeleteModal();
396+
await this.closeDeleteModal(clickCancel);
399397
}
400398

401399
public async openDeleteModal() {
402-
if (this.deleteTaskBtn) {
403-
await this.deleteTaskBtn.click();
404-
await (
405-
await backendConfigurationTaskManagementPage.taskManagementDeleteCancelBtn()
406-
).waitForClickable({ timeout: 40000 });
407-
}
400+
await this.deleteTaskBtn.click();
401+
await (
402+
await backendConfigurationTaskManagementPage.taskManagementDeleteCancelBtn()
403+
).waitForClickable({ timeout: 40000 });
408404
}
409405

410406
public async closeDeleteModal(clickCancel = false) {

0 commit comments

Comments
 (0)