Skip to content

Commit

Permalink
Fixing e2e part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoAlbano committed Nov 28, 2023
1 parent 4ff1660 commit ee4f03a
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/testing/src/lib/protractor/core/pages/pagination.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/testing/src/lib/protractor/core/pages/viewer.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ee4f03a

Please sign in to comment.