From 5bc6e0fae92012bb50c8746fb8727ba651f0034c Mon Sep 17 00:00:00 2001 From: Vito Albano Date: Thu, 14 Mar 2024 11:18:14 +0000 Subject: [PATCH] [affected:*][ci:force] Fixing e2e - the long painful journey - part II --- .../pages/process-service-tab-bar.page.ts | 8 ++++---- .../protractor/core/pages/material/material-locators.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/e2e/process-services/pages/process-service-tab-bar.page.ts b/e2e/process-services/pages/process-service-tab-bar.page.ts index 1546356375..551af02b71 100644 --- a/e2e/process-services/pages/process-service-tab-bar.page.ts +++ b/e2e/process-services/pages/process-service-tab-bar.page.ts @@ -20,10 +20,10 @@ import { element, by, browser } from 'protractor'; export class ProcessServiceTabBarPage { - tasksButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class}`, 'Tasks')).first(); - processButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class}`, 'Process')).first(); - reportsButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class}`, 'Reports')).first(); - reportsButtonSelected = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class} div[aria-selected="true"]`, 'Reports')).first(); + tasksButton = element.all(by.cssContainingText(`div${materialLocators.Tab.labels.container.class} ${materialLocators.Tab.labels.class}`, 'Tasks')).first(); + processButton = element.all(by.cssContainingText(`div${materialLocators.Tab.labels.container.class} ${materialLocators.Tab.labels.class}`, 'Process')).first(); + reportsButton = element.all(by.cssContainingText(`div${materialLocators.Tab.labels.container.class} ${materialLocators.Tab.labels.class}`, 'Reports')).first(); + reportsButtonSelected = element.all(by.cssContainingText(`div${materialLocators.Tab.labels.container.class} ${materialLocators.Tab.labels.class} div[aria-selected="true"]`, 'Reports')).first(); async clickTasksButton(): Promise { await BrowserActions.click(this.tasksButton); 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 7320d9d9eb..1e3c0b7867 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 @@ -262,7 +262,7 @@ export const materialLocators = { Menu: { content: { class: '.mat-mdc-menu-content', - root: 'mat-menu-content' + root: 'mat-mdc-menu-content' }, panel: '.mat-mdc-menu-panel', item: { @@ -394,7 +394,7 @@ export const materialLocators = { }, label: { class: '.mdc-tab', - root: 'mat-mdc-tab-labels', + root: 'mat-tab-label', active: { class: '.mdc-tab--active', root: 'mat-tab-label-active'