From c29c1448b949ea61afbb5baf645d4a8180f1a8e7 Mon Sep 17 00:00:00 2001 From: Vito Albano Date: Sun, 17 Dec 2023 03:17:01 +0000 Subject: [PATCH] fixig e2es - task and version --- e2e/process-services/pages/task-filters-demo.page.ts | 2 +- e2e/process-services/pages/tasks-list.page.ts | 9 +++++++++ .../tasks/task-filters-sorting.e2e.ts | 1 + .../src/lib/social/rating.component.scss | 2 +- .../lib/tag/tags-creator/tags-creator.component.scss | 4 ++-- .../lib/version-manager/version-list.component.scss | 12 ++++++++++-- .../version-manager/version-manager.component.scss | 7 +++---- .../components/analytics-report-list.component.scss | 2 +- .../attach-file-cloud-widget.component.scss | 4 ++-- .../task-list/components/start-task.component.html | 2 +- .../task-list/components/start-task.component.scss | 6 +++--- .../protractor/core/pages/material/toggle.page.ts | 2 +- 12 files changed, 35 insertions(+), 18 deletions(-) diff --git a/e2e/process-services/pages/task-filters-demo.page.ts b/e2e/process-services/pages/task-filters-demo.page.ts index 91d2d74761..875f7a5001 100644 --- a/e2e/process-services/pages/task-filters-demo.page.ts +++ b/e2e/process-services/pages/task-filters-demo.page.ts @@ -43,7 +43,7 @@ export class TaskFiltersDemoPage { return new TaskFiltersPage(this.involvedTask); } - customTaskFilter(filterName: string): TaskFiltersPage { + customTaskFilter(filterName: string): TaskFiltersPage { return new TaskFiltersPage($(`button[data-automation-id="${filterName}_filter"]`)); } diff --git a/e2e/process-services/pages/tasks-list.page.ts b/e2e/process-services/pages/tasks-list.page.ts index d7a8411ea4..5d34a40ddd 100644 --- a/e2e/process-services/pages/tasks-list.page.ts +++ b/e2e/process-services/pages/tasks-list.page.ts @@ -21,6 +21,8 @@ import { browser, $, $$ } from 'protractor'; export class TasksListPage { taskList = $('adf-tasklist'); + selectedTab = $('[data-automation-id="navigation-bar"] .mdc-tab--active .mdc-tab__text-label'); + taskTab = $$('[data-automation-id="navigation-bar"] .mdc-tab__text-label').first(); noTasksFound = $$('.adf-empty-content__title').first(); dataTable = new DataTableComponentPage(this.taskList); @@ -61,4 +63,11 @@ export class TasksListPage { return BrowserActions.getText(this.noTasksFound); } + async selectTaskTab() { + const currentTab = await BrowserActions.getText(this.selectedTab); + if(currentTab && currentTab.toLowerCase().trim() !== 'tasks') { + await BrowserActions.click(this.taskTab); + } + } + } diff --git a/e2e/process-services/tasks/task-filters-sorting.e2e.ts b/e2e/process-services/tasks/task-filters-sorting.e2e.ts index bb15df7f5c..09844dbc14 100644 --- a/e2e/process-services/tasks/task-filters-sorting.e2e.ts +++ b/e2e/process-services/tasks/task-filters-sorting.e2e.ts @@ -95,6 +95,7 @@ describe('Task Filters Sorting', () => { await userFiltersUtil.createUserTaskFilter(newFilter); await browser.refresh(); + await tasksListPage.selectTaskTab(); await taskFiltersDemoPage.customTaskFilter(newFilter.name).clickTaskFilter(); await expect(await tasksListPage.getDataTable().contentInPosition(1)).toBe(tasks[2].name); diff --git a/lib/content-services/src/lib/social/rating.component.scss b/lib/content-services/src/lib/social/rating.component.scss index 68761316c8..5c094c75d2 100644 --- a/lib/content-services/src/lib/social/rating.component.scss +++ b/lib/content-services/src/lib/social/rating.component.scss @@ -24,7 +24,7 @@ $adf-average-star-color: #808080; width: 25px; /* TODO(mdc-migration): The following rule targets internal classes of list that may no longer apply for the MDC version. */ - .mat-list-item-content { + .mdc-list-item__content { padding: 0 !important; } diff --git a/lib/content-services/src/lib/tag/tags-creator/tags-creator.component.scss b/lib/content-services/src/lib/tag/tags-creator/tags-creator.component.scss index 38c61be409..4e463d5342 100644 --- a/lib/content-services/src/lib/tag/tags-creator/tags-creator.component.scss +++ b/lib/content-services/src/lib/tag/tags-creator/tags-creator.component.scss @@ -99,8 +99,8 @@ adf-tags-creator { } /* TODO(mdc-migration): The following rule targets internal classes of list that may no longer apply for the MDC version. */ - .mat-list-item-content-reverse { - padding: 0; + .mdc-list-item__content-reverse { + padding: 0 6px; .mat-pseudo-checkbox { display: none; diff --git a/lib/content-services/src/lib/version-manager/version-list.component.scss b/lib/content-services/src/lib/version-manager/version-list.component.scss index 98cb9dec87..eb90032909 100644 --- a/lib/content-services/src/lib/version-manager/version-list.component.scss +++ b/lib/content-services/src/lib/version-manager/version-list.component.scss @@ -1,7 +1,15 @@ .adf-version-list { - /* TODO(mdc-migration): The following rule targets internal classes of list that may no longer apply for the MDC version. */ - .mat-list-item-content { + .mdc-list-item__content { border-bottom: 1px solid #d8d8d8; + + span { + display: flex; + align-items: center; + } + + p.mat-line { + display: flex; + } } &-item-version { diff --git a/lib/content-services/src/lib/version-manager/version-manager.component.scss b/lib/content-services/src/lib/version-manager/version-manager.component.scss index dc229be552..2e91808751 100644 --- a/lib/content-services/src/lib/version-manager/version-manager.component.scss +++ b/lib/content-services/src/lib/version-manager/version-manager.component.scss @@ -1,16 +1,15 @@ adf-version-manager { - .mat-mdc-list .mat-3-line { + .mat-mdc-list { height: auto !important; width: 100% !important; } - /* TODO(mdc-migration): The following rule targets internal classes of list that may no longer apply for the MDC version. */ - .mat-list-item-content { + .mdc-list-item__content { padding: 16px 0 !important; } } -.adf-version-list-item-comment.mat-line { +.adf-version-list-item-comment .mat-line { height: 100%; word-break: break-all; white-space: unset !important; diff --git a/lib/insights/src/lib/analytics-process/components/analytics-report-list.component.scss b/lib/insights/src/lib/analytics-process/components/analytics-report-list.component.scss index e87e3de87e..a5b3401991 100644 --- a/lib/insights/src/lib/analytics-process/components/analytics-report-list.component.scss +++ b/lib/insights/src/lib/analytics-process/components/analytics-report-list.component.scss @@ -14,7 +14,7 @@ } /* TODO(mdc-migration): The following rule targets internal classes of list that may no longer apply for the MDC version. */ - .mat-nav-list .mat-mdc-list-item .mat-list-item-content { + .mat-nav-list .mat-mdc-list-item .mdc-list-item__content { line-height: 48px; } diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.scss b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.scss index 53023b26d9..12da81e365 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.scss +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.scss @@ -98,7 +98,7 @@ &-attach-files-row { /* TODO(mdc-migration): The following rule targets internal classes of list that may no longer apply for the MDC version. */ - div.mat-list-item-content { + div.mdc-list-item__content { cursor: pointer; } @@ -109,7 +109,7 @@ &-attach-selected-file-row { /* TODO(mdc-migration): The following rule targets internal classes of list that may no longer apply for the MDC version. */ - div.mat-list-item-content { + div.mdc-list-item__content { .adf-datatable-selected { color: var(--theme-primary-color); padding-right: 6px; diff --git a/lib/process-services/src/lib/task-list/components/start-task.component.html b/lib/process-services/src/lib/task-list/components/start-task.component.html index 5de418d095..27bc5d5b3b 100644 --- a/lib/process-services/src/lib/task-list/components/start-task.component.html +++ b/lib/process-services/src/lib/task-list/components/start-task.component.html @@ -33,7 +33,7 @@ -
+
{ const check = await BrowserActions.getAttribute(toggle, 'class'); - if (check.indexOf('mdc-switch--unselected') < 0) { + if (check.indexOf('mat-mdc-slide-toggle-checked') < 0) { await BrowserActions.click(toggle); } }