mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fixing e2e part 2
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@alfresco/js-api": ">=7.3.0"
|
"@alfresco/js-api": ">=7.2.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"testing",
|
"testing",
|
||||||
|
@@ -22,7 +22,7 @@ import { DropdownPage } from '../../../core/pages/material/dropdown.page';
|
|||||||
|
|
||||||
export class SearchSortingPickerPage {
|
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');
|
orderArrow = $('adf-sorting-picker button mat-icon');
|
||||||
|
|
||||||
async sortBy(sortOrder: string, sortType: string | RegExp): Promise<void> {
|
async sortBy(sortOrder: string, sortType: string | RegExp): Promise<void> {
|
||||||
|
@@ -21,7 +21,7 @@ import { DropdownPage } from '../material/dropdown.page';
|
|||||||
|
|
||||||
export class FormFields {
|
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');
|
formContent = $('adf-form-renderer');
|
||||||
refreshButton = $('div[class*="form-reload-button"] mat-icon');
|
refreshButton = $('div[class*="form-reload-button"] mat-icon');
|
||||||
saveButton = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
saveButton = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
||||||
|
@@ -28,10 +28,10 @@ export class AttachFileWidgetPage {
|
|||||||
filesListLocator = 'div[data-automation-id="adf-attach-widget-readonly-list"]';
|
filesListLocator = 'div[data-automation-id="adf-attach-widget-readonly-list"]';
|
||||||
attachFileWidget = $('#attachfile');
|
attachFileWidget = $('#attachfile');
|
||||||
attachedFileMenu = $('mat-list-item button');
|
attachedFileMenu = $('mat-list-item button');
|
||||||
attachedFileOptions = $('.mat-menu-panel .mat-menu-content');
|
attachedFileOptions = $('.mat-mdc-menu-content');
|
||||||
viewFileOptionButton = $(`.mat-menu-panel .mat-menu-content button[id$="show-file"]`);
|
viewFileOptionButton = $(`.mat-mdc-menu-content button[id$="show-file"]`);
|
||||||
downloadFileOptionButton = $(`.mat-menu-panel .mat-menu-content button[id$="download-file"]`);
|
downloadFileOptionButton = $(`.mat-mdc-menu-content button[id$="download-file"]`);
|
||||||
removeFileOptionButton = TestElement.byCss(`.mat-menu-panel .mat-menu-content button[id$="remove"]`);
|
removeFileOptionButton = TestElement.byCss(`.mat-mdc-menu-content button[id$="remove"]`);
|
||||||
|
|
||||||
async attachFile(fieldId: string, fileLocation: string): Promise<void> {
|
async attachFile(fieldId: string, fileLocation: string): Promise<void> {
|
||||||
const widget = await this.formFields.getWidget(fieldId);
|
const widget = await this.formFields.getWidget(fieldId);
|
||||||
|
@@ -21,21 +21,21 @@ import { BrowserActions, BrowserVisibility } from '../../../utils/public-api';
|
|||||||
|
|
||||||
export class TabPage {
|
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"]');
|
public disabledContentNodeSelectorTabInfoIcon = TestElement.byCss('[data-automation-id="adf-content-node-selector-disabled-tab-info-icon"]');
|
||||||
|
|
||||||
async clickTabByLabel(tabLabel): Promise<void> {
|
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 BrowserActions.click(user);
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.changeTabAnimation);
|
await BrowserVisibility.waitUntilElementIsNotVisible(this.changeTabAnimation);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTabIsDisplayedByLabel(tabLabel): Promise<void> {
|
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> {
|
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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -66,7 +66,7 @@ export class DropdownPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkOptionIsSelected(option: string): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(selectedOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ export class DropdownPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getSelectedOptionText(): Promise<string> {
|
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);
|
return BrowserActions.getText(selectedOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ export class PaginationPage {
|
|||||||
nextButtonDisabled = $('button[class*="adf-pagination__next-button"][disabled]');
|
nextButtonDisabled = $('button[class*="adf-pagination__next-button"][disabled]');
|
||||||
previousButtonDisabled = $('button[class*="adf-pagination__previous-button"][disabled]');
|
previousButtonDisabled = $('button[class*="adf-pagination__previous-button"][disabled]');
|
||||||
pageDropDown = $('div[class*="adf-pagination__actualinfo-block"] button');
|
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');
|
paginationSection = $('adf-pagination');
|
||||||
paginationSectionEmpty = $('adf-pagination[class*="adf-pagination__empty"]');
|
paginationSectionEmpty = $('adf-pagination[class*="adf-pagination__empty"]');
|
||||||
totalFiles = $('.adf-pagination__range');
|
totalFiles = $('.adf-pagination__range');
|
||||||
@@ -94,7 +94,7 @@ export class PaginationPage {
|
|||||||
|
|
||||||
async clickOnPageDropdownOption(numberOfItemPerPage: string): Promise<void> {
|
async clickOnPageDropdownOption(numberOfItemPerPage: string): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.pageDropDownOptions.first());
|
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);
|
await BrowserActions.click(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ export class ViewerPage {
|
|||||||
infoSideBar = $('#adf-right-sidebar');
|
infoSideBar = $('#adf-right-sidebar');
|
||||||
viewer = $('adf-viewer');
|
viewer = $('adf-viewer');
|
||||||
imgViewer = $('adf-img-viewer');
|
imgViewer = $('adf-img-viewer');
|
||||||
activeTab = $('div[class*="mat-tab-label-active"]');
|
activeTab = $('div[class*="mdc-tab--active"]');
|
||||||
toolbar = $('#adf-viewer-toolbar');
|
toolbar = $('#adf-viewer-toolbar');
|
||||||
canvasLayer = $$('.canvasWrapper > canvas').first();
|
canvasLayer = $$('.canvasWrapper > canvas').first();
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ export class ViewerPage {
|
|||||||
|
|
||||||
async checkTabIsActive(tabName: string): Promise<void> {
|
async checkTabIsActive(tabName: string): Promise<void> {
|
||||||
const tab = element(
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(tab);
|
||||||
}
|
}
|
||||||
|
@@ -168,7 +168,7 @@ export class EditProcessFilterCloudComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isApplicationListLoaded(): Promise<boolean> {
|
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);
|
return BrowserVisibility.waitUntilElementIsNotVisible(emptyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,8 +22,8 @@ import { ConfigEditorPage } from '../../core/pages/config-editor-page';
|
|||||||
|
|
||||||
export class FormCloudComponentPage {
|
export class FormCloudComponentPage {
|
||||||
|
|
||||||
formCloudEditor = $$('.mat-tab-list .mat-tab-label').get(1);
|
formCloudEditor = $$('.mat-mdc-tab-group .mat-mdc-tab').get(1);
|
||||||
formCloudRender = $$('.mat-tab-list .mat-tab-label').get(0);
|
formCloudRender = $$('.mat-mdc-tab-group .mat-mdc-tab').get(0);
|
||||||
|
|
||||||
configEditorPage = new ConfigEditorPage();
|
configEditorPage = new ConfigEditorPage();
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ export class StartProcessPage {
|
|||||||
processDefinitionOptionsPanel = $('div[class*="mat-autocomplete-panel"]');
|
processDefinitionOptionsPanel = $('div[class*="mat-autocomplete-panel"]');
|
||||||
|
|
||||||
processDefinitionDropdown = new DropdownPage($('#adf-select-process-dropdown'));
|
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> {
|
async checkNoProcessMessage(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.noProcess);
|
await BrowserVisibility.waitUntilElementIsVisible(this.noProcess);
|
||||||
|
Reference in New Issue
Block a user