mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fixing e2e - part III
This commit is contained in:
@@ -27,7 +27,7 @@ export class SearchSortingPickerPage {
|
||||
|
||||
async sortBy(sortOrder: string, sortType: string | RegExp): Promise<void> {
|
||||
await this.sortingDropdown.clickDropdown();
|
||||
const selectedSortingOption = element(by.cssContainingText('.mat-option-text', sortType));
|
||||
const selectedSortingOption = element(by.cssContainingText('.mdc-list-item__primary-text', sortType));
|
||||
await BrowserActions.click(selectedSortingOption);
|
||||
await this.sortByOrder(sortOrder);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export class SearchSortingPickerPage {
|
||||
}
|
||||
|
||||
async clickSortingOption(option: string): Promise<void> {
|
||||
const selectedSortingOption = element(by.cssContainingText('.mat-option-text', option));
|
||||
const selectedSortingOption = element(by.cssContainingText('.mdc-list-item__primary-text', option));
|
||||
await BrowserActions.click(selectedSortingOption);
|
||||
}
|
||||
|
||||
|
@@ -96,7 +96,7 @@ export class FormFields {
|
||||
async getFieldPlaceHolder(fieldId: string, locator = 'input'): Promise<string> {
|
||||
const placeHolderLocator = $(`${locator}#${fieldId}`);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(placeHolderLocator);
|
||||
return BrowserActions.getAttribute(placeHolderLocator, 'data-placeholder');
|
||||
return BrowserActions.getAttribute(placeHolderLocator, 'placeholder');
|
||||
}
|
||||
|
||||
async refreshForm(): Promise<void> {
|
||||
|
@@ -28,10 +28,17 @@ export class AttachFileWidgetPage {
|
||||
filesListLocator = 'div[data-automation-id="adf-attach-widget-readonly-list"]';
|
||||
attachFileWidget = $('#attachfile');
|
||||
attachedFileMenu = $('mat-list-item button');
|
||||
<<<<<<< Updated upstream
|
||||
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"]`);
|
||||
=======
|
||||
attachedFileOptions = $('.mat-mdc-menu-panel .mat-mdc-menu-content');
|
||||
viewFileOptionButton = $(`.mat-mdc-menu-panel .mat-mdc-menu-content button[id$="show-file"]`);
|
||||
downloadFileOptionButton = $(`.mat-mdc-menu-panel .mat-mdc-menu-content button[id$="download-file"]`);
|
||||
removeFileOptionButton = TestElement.byCss(`.mat-mdc-menu-panel .mat-mdc-menu-content button[id$="remove"]`);
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
async attachFile(fieldId: string, fileLocation: string): Promise<void> {
|
||||
const widget = await this.formFields.getWidget(fieldId);
|
||||
|
@@ -25,7 +25,7 @@ export class DatePickerCalendarPage {
|
||||
datePicker = $('mat-calendar[id*="mat-datepicker"]');
|
||||
nextMonthButton = $('button[class*="mat-calendar-next-button"]');
|
||||
previousMonthButton = $('button[class*="mat-calendar-previous-button"]');
|
||||
todayDate = TestElement.byCss('div.mat-calendar-body-today');
|
||||
todayDate = TestElement.byCss('span.mat-calendar-body-today');
|
||||
periodButton = $('button[class*=mat-calendar-period-button]');
|
||||
|
||||
async getSelectedDate(): Promise<string> {
|
||||
|
@@ -35,7 +35,11 @@ export class DropdownPage {
|
||||
|
||||
async selectOption(option: string): Promise<void> {
|
||||
Logger.log(`Select dropdown option ${option}`);
|
||||
<<<<<<< Updated upstream
|
||||
const optionElement = element.all(by.cssContainingText('.mat-mdc-option .mdc-list-item__primary-text', option)).first();
|
||||
=======
|
||||
const optionElement = element.all(by.cssContainingText('mat-option span.mdc-list-item__primary-text', option)).first();
|
||||
>>>>>>> Stashed changes
|
||||
await BrowserActions.click(optionElement);
|
||||
await browser.waitForAngular();
|
||||
}
|
||||
@@ -49,7 +53,11 @@ export class DropdownPage {
|
||||
}
|
||||
|
||||
async getNumberOfOptions(): Promise<number> {
|
||||
<<<<<<< Updated upstream
|
||||
const dropdownOptions = $$('.mat-mdc-select-panel .mat-mdc-option');
|
||||
=======
|
||||
const dropdownOptions = $$('.mat-mdc-select-panel mat-option');
|
||||
>>>>>>> Stashed changes
|
||||
return dropdownOptions.count();
|
||||
}
|
||||
|
||||
@@ -80,16 +88,28 @@ export class DropdownPage {
|
||||
}
|
||||
|
||||
async getSelectedOptionText(): Promise<string> {
|
||||
<<<<<<< Updated upstream
|
||||
const selectedOption = this.dropDownElement.$('.mdc-list-item__primary-text');
|
||||
=======
|
||||
const selectedOption = this.dropDownElement.$('.mat-mdc-select-value-text span');
|
||||
>>>>>>> Stashed changes
|
||||
return BrowserActions.getText(selectedOption);
|
||||
}
|
||||
|
||||
async checkOptionIsDisplayed(option: string): Promise<void> {
|
||||
<<<<<<< Updated upstream
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.cssContainingText('.mat-mdc-option .mdc-list-item__primary-text', option)).first());
|
||||
}
|
||||
|
||||
async checkOptionIsNotDisplayed(option: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element.all(by.cssContainingText('.mat-mdc-option .mdc-list-item__primary-text', option)).first());
|
||||
=======
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.cssContainingText('mat-option span.mdc-list-item__primary-text', option)).first());
|
||||
}
|
||||
|
||||
async checkOptionIsNotDisplayed(option: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element.all(by.cssContainingText('mat-option span.mdc-list-item__primary-text', option)).first());
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
|
||||
async selectDropdownOption(option: string): Promise<void> {
|
||||
|
@@ -36,8 +36,8 @@ export class EditTaskFilterCloudComponentPage {
|
||||
id = $('input[data-automation-id="adf-cloud-edit-task-property-taskId"]');
|
||||
processDefinitionId = $('input[data-automation-id="adf-cloud-edit-task-property-processDefinitionId"]');
|
||||
processInstanceId = $('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]');
|
||||
lastModifiedFrom = $('input[data-placeholder="LastModifiedFrom"]');
|
||||
lastModifiedTo = $('input[data-placeholder="LastModifiedTo"]');
|
||||
lastModifiedFrom = $('input[placeholder="LastModifiedFrom"]');
|
||||
lastModifiedTo = $('input[placeholder="LastModifiedTo"]');
|
||||
parentTaskId = $('input[data-automation-id="adf-cloud-edit-task-property-parentTaskId"]');
|
||||
owner = $('input[data-automation-id="adf-cloud-edit-task-property-owner"]');
|
||||
saveButton = $('[data-automation-id="adf-filter-action-save"]');
|
||||
|
@@ -33,7 +33,7 @@ export class StartProcessCloudPage {
|
||||
processDefinition = $('input[id="processDefinitionName"]');
|
||||
processDefinitionOptionsPanel = $('div[class*="processDefinitionOptions"]');
|
||||
|
||||
getSelectProcessDropdownLocatorByName = (name: string): ElementFinder => element(by.cssContainingText('.mat-option-text', name));
|
||||
getSelectProcessDropdownLocatorByName = (name: string): ElementFinder => element(by.cssContainingText('.mdc-list-item__primary-text', name));
|
||||
|
||||
async checkNoProcessMessage(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noProcess);
|
||||
@@ -63,7 +63,7 @@ export class StartProcessCloudPage {
|
||||
|
||||
async selectFirstOptionFromProcessDropdown(): Promise<void> {
|
||||
await this.clickProcessDropdownArrow();
|
||||
const selectFirstProcessDropdown = $$('.mat-option-text').first();
|
||||
const selectFirstProcessDropdown = $$('.mdc-list-item__primary-text').first();
|
||||
await BrowserActions.click(selectFirstProcessDropdown);
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
export class ProcessInstanceTasksPage {
|
||||
|
||||
startProcessDialog = $('#adf-start-process-dialog');
|
||||
title = this.startProcessDialog.$('h4.mat-dialog-title');
|
||||
title = this.startProcessDialog.$('h4.mat-mdc-dialog-title');
|
||||
closeButton = this.startProcessDialog.element(by.cssContainingText(`div.adf-start-process-dialog-actions button span`, 'Close'));
|
||||
startForm = $('div[data-automation-id="start-form"]');
|
||||
|
||||
|
Reference in New Issue
Block a user