diff --git a/e2e/process-services/pages/dialog/create-checklist-dialog.page.ts b/e2e/process-services/pages/dialog/create-checklist-dialog.page.ts index f4506c565b..864a793fcf 100644 --- a/e2e/process-services/pages/dialog/create-checklist-dialog.page.ts +++ b/e2e/process-services/pages/dialog/create-checklist-dialog.page.ts @@ -21,8 +21,8 @@ import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing'; export class ChecklistDialog { nameField = $('input[data-automation-id="checklist-name"]'); - addChecklistButton = $('button[id="add-check"] span'); - closeButton = $('button[id="close-check-dialog"] span'); + addChecklistButton = $('button[id="add-check"]'); + closeButton = $('button[id="close-check-dialog"]'); dialogTitle = $('#add-checklist-title'); async addName(name: string): Promise { diff --git a/e2e/process-services/pages/tasks.page.ts b/e2e/process-services/pages/tasks.page.ts index 51e26baf4d..7f0e858d54 100644 --- a/e2e/process-services/pages/tasks.page.ts +++ b/e2e/process-services/pages/tasks.page.ts @@ -27,13 +27,13 @@ import { BrowserActions, BrowserVisibility, FormFields, materialLocators } from export class TasksPage { createButton = $('button[data-automation-id="create-button"'); addChecklistButton = $('button[class*="adf-add-to-checklist-button"]'); - rowByRowName = by.xpath(`ancestor::${materialLocators.Chip.root}`); + rowByRowName = by.xpath(`ancestor::${materialLocators.Chip.list.option.class}`); checklistContainer = $('div[class*="checklist-menu"]'); taskTitle = '.adf-activiti-task-details__header span'; completeButtonNoForm = $('#adf-no-form-complete-button'); checklistDialog = $('#checklist-dialog'); checklistNoMessage = $('#checklist-none-message'); - numberOfChecklists = $(`[data-automation-id="checklist-label"] ${materialLocators.Chip.root}`); + numberOfChecklists = $(`[data-automation-id="checklist-label"] ${materialLocators.Chip.list.option.value}`); async createNewTask(): Promise { await this.clickOnCreateButton(); @@ -82,7 +82,7 @@ export class TasksPage { } getRowsName(name: string) { - return this.checklistContainer.element(by.cssContainingText('span', name)); + return this.checklistContainer.element(by.cssContainingText(`span${materialLocators.Chip.list.option.value}`, name)); } getChecklistByName(name: string) { diff --git a/lib/testing/src/lib/protractor/core/pages/material/material-locators.ts b/lib/testing/src/lib/protractor/core/pages/material/material-locators.ts index a82497b7b6..bf1a70c4e4 100644 --- a/lib/testing/src/lib/protractor/core/pages/material/material-locators.ts +++ b/lib/testing/src/lib/protractor/core/pages/material/material-locators.ts @@ -95,8 +95,12 @@ export const materialLocators = { root: 'mat-chip', class: '.mat-mdc-chip', list: { - root: 'mat-chip-list', - class: '.mat-mdc-chip-list' + root: 'mat-chip-listbox', + class: '.mat-mdc-chip-list', + option: { + class: 'mat-chip-option', + value: '.mat-mdc-chip-action-label' + } }, grid: { root: 'mat-chip-grid',