Fixing e2e part 2

This commit is contained in:
Vito Albano
2023-11-28 17:50:21 +00:00
parent 4b0a07bf35
commit 6dac51b3af
11 changed files with 21 additions and 21 deletions

View File

@@ -11,7 +11,7 @@
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
},
"peerDependencies": {
"@alfresco/js-api": ">=7.3.0"
"@alfresco/js-api": ">=7.2.0"
},
"keywords": [
"testing",

View File

@@ -22,7 +22,7 @@ import { DropdownPage } from '../../../core/pages/material/dropdown.page';
export class SearchSortingPickerPage {
sortingDropdown = new DropdownPage($('.adf-sorting-picker .mat-select-arrow'));
sortingDropdown = new DropdownPage($('.adf-sorting-picker .mat-mdc-select-arrow'));
orderArrow = $('adf-sorting-picker button mat-icon');
async sortBy(sortOrder: string, sortType: string | RegExp): Promise<void> {

View File

@@ -21,7 +21,7 @@ import { DropdownPage } from '../material/dropdown.page';
export class FormFields {
selectFormDropdown = new DropdownPage($$('.adf-attach-form .mat-select-arrow').first());
selectFormDropdown = new DropdownPage($$('.adf-attach-form .mat-mdc-select-arrow').first());
formContent = $('adf-form-renderer');
refreshButton = $('div[class*="form-reload-button"] mat-icon');
saveButton = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));

View File

@@ -28,10 +28,10 @@ export class AttachFileWidgetPage {
filesListLocator = 'div[data-automation-id="adf-attach-widget-readonly-list"]';
attachFileWidget = $('#attachfile');
attachedFileMenu = $('mat-list-item button');
attachedFileOptions = $('.mat-menu-panel .mat-menu-content');
viewFileOptionButton = $(`.mat-menu-panel .mat-menu-content button[id$="show-file"]`);
downloadFileOptionButton = $(`.mat-menu-panel .mat-menu-content button[id$="download-file"]`);
removeFileOptionButton = TestElement.byCss(`.mat-menu-panel .mat-menu-content button[id$="remove"]`);
attachedFileOptions = $('.mat-mdc-menu-content');
viewFileOptionButton = $(`.mat-mdc-menu-content button[id$="show-file"]`);
downloadFileOptionButton = $(`.mat-mdc-menu-content button[id$="download-file"]`);
removeFileOptionButton = TestElement.byCss(`.mat-mdc-menu-content button[id$="remove"]`);
async attachFile(fieldId: string, fileLocation: string): Promise<void> {
const widget = await this.formFields.getWidget(fieldId);

View File

@@ -21,21 +21,21 @@ import { BrowserActions, BrowserVisibility } from '../../../utils/public-api';
export class TabPage {
changeTabAnimation = $('.mat-tab-labels div[class="mat-ripple-element"]');
changeTabAnimation = $('.mat-mdc-tab-ripple div[class="mat-ripple-element"]');
public disabledContentNodeSelectorTabInfoIcon = TestElement.byCss('[data-automation-id="adf-content-node-selector-disabled-tab-info-icon"]');
async clickTabByLabel(tabLabel): Promise<void> {
const user = element(by.cssContainingText('.mat-tab-label-content', tabLabel));
const user = element(by.cssContainingText('.mdc-tab__text-label', tabLabel));
await BrowserActions.click(user);
await BrowserVisibility.waitUntilElementIsNotVisible(this.changeTabAnimation);
}
async checkTabIsDisplayedByLabel(tabLabel): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('.mat-tab-label-content', tabLabel)));
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('.mdc-tab__text-label', tabLabel)));
}
async checkTabIsNotDisplayedByLabel(tabLabel): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('.mat-tab-label-content', tabLabel)));
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('.mdc-tab__text-label', tabLabel)));
}
}

View File

@@ -66,7 +66,7 @@ export class DropdownPage {
}
async checkOptionIsSelected(option: string): Promise<void> {
const selectedOption = this.dropDownElement.element(by.cssContainingText('.mat-select-value-text span', option));
const selectedOption = this.dropDownElement.element(by.cssContainingText('.mdc-list-item__primary-text', option));
await BrowserVisibility.waitUntilElementIsVisible(selectedOption);
}
@@ -80,7 +80,7 @@ export class DropdownPage {
}
async getSelectedOptionText(): Promise<string> {
const selectedOption = this.dropDownElement.$('.mat-select-value-text span');
const selectedOption = this.dropDownElement.$('.mdc-list-item__primary-text');
return BrowserActions.getText(selectedOption);
}

View File

@@ -34,7 +34,7 @@ export class PaginationPage {
nextButtonDisabled = $('button[class*="adf-pagination__next-button"][disabled]');
previousButtonDisabled = $('button[class*="adf-pagination__previous-button"][disabled]');
pageDropDown = $('div[class*="adf-pagination__actualinfo-block"] button');
pageDropDownOptions = $$('div[class*="mat-menu-content"] button');
pageDropDownOptions = $$('div[class*="mat-mdc-menu-content"] button');
paginationSection = $('adf-pagination');
paginationSectionEmpty = $('adf-pagination[class*="adf-pagination__empty"]');
totalFiles = $('.adf-pagination__range');
@@ -94,7 +94,7 @@ export class PaginationPage {
async clickOnPageDropdownOption(numberOfItemPerPage: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.pageDropDownOptions.first());
const option = element(by.cssContainingText('div[class*="mat-menu-content"] button', numberOfItemPerPage));
const option = element(by.cssContainingText('div[class*="mat-mdc-menu-content"] button', numberOfItemPerPage));
await BrowserActions.click(option);
}

View File

@@ -48,7 +48,7 @@ export class ViewerPage {
infoSideBar = $('#adf-right-sidebar');
viewer = $('adf-viewer');
imgViewer = $('adf-img-viewer');
activeTab = $('div[class*="mat-tab-label-active"]');
activeTab = $('div[class*="mdc-tab--active"]');
toolbar = $('#adf-viewer-toolbar');
canvasLayer = $$('.canvasWrapper > canvas').first();
@@ -253,7 +253,7 @@ export class ViewerPage {
async checkTabIsActive(tabName: string): Promise<void> {
const tab = element(
by.cssContainingText('.adf-info-drawer-layout-content div.mat-tab-labels div.mat-tab-label-active .mat-tab-label-content', tabName)
by.cssContainingText('.adf-info-drawer-layout-content div.mat-mdc-tab-label-container .mdc-tab-indicator--active .mdc-tab__text-label', tabName)
);
await BrowserVisibility.waitUntilElementIsVisible(tab);
}

View File

@@ -168,7 +168,7 @@ export class EditProcessFilterCloudComponentPage {
}
isApplicationListLoaded(): Promise<boolean> {
const emptyList = $(`[data-automation-id='adf-cloud-edit-process-property-appName'] .mat-select-placeholder`);
const emptyList = $(`[data-automation-id='adf-cloud-edit-process-property-appName'] .mat-mdc-select-placeholder`);
return BrowserVisibility.waitUntilElementIsNotVisible(emptyList);
}

View File

@@ -22,8 +22,8 @@ import { ConfigEditorPage } from '../../core/pages/config-editor-page';
export class FormCloudComponentPage {
formCloudEditor = $$('.mat-tab-list .mat-tab-label').get(1);
formCloudRender = $$('.mat-tab-list .mat-tab-label').get(0);
formCloudEditor = $$('.mat-mdc-tab-group .mat-mdc-tab').get(1);
formCloudRender = $$('.mat-mdc-tab-group .mat-mdc-tab').get(0);
configEditorPage = new ConfigEditorPage();

View File

@@ -37,7 +37,7 @@ export class StartProcessPage {
processDefinitionOptionsPanel = $('div[class*="mat-autocomplete-panel"]');
processDefinitionDropdown = new DropdownPage($('#adf-select-process-dropdown'));
applicationDropdown = new DropdownPage($('[data-automation-id*="start-process-app"] .mat-select-arrow'));
applicationDropdown = new DropdownPage($('[data-automation-id*="start-process-app"] .mat-mdc-select-arrow'));
async checkNoProcessMessage(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.noProcess);