mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Move process cloud page int @alfresco/adf-testing (#4540)
Move datatable @alfresco/adf-testing
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
import { LoginPage } from '../../pages/adf/loginPage';
|
||||
import { DataTablePage } from '../../pages/adf/demo-shell/dataTablePage';
|
||||
import { DataTableComponentPage } from '../../pages/adf/dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import TestConfig = require('../../test.config');
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { LoginPage } from '../../pages/adf/loginPage';
|
||||
import { DataTablePage } from '../../pages/adf/demo-shell/dataTablePage';
|
||||
import { DataTableComponentPage } from '../../pages/adf/dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import TestConfig = require('../../test.config');
|
||||
|
||||
|
@@ -21,7 +21,7 @@ import { LoginPage } from '../../pages/adf/loginPage';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { DataTableComponentPage } from '../../pages/adf/dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder, browser } from 'protractor';
|
||||
import { DataTableComponentPage } from '../dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class DocumentListPage {
|
||||
|
@@ -1,285 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
import { ElementFinder, ElementArrayFinder } from 'protractor/built/element';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class DataTableComponentPage {
|
||||
|
||||
rootElement: ElementFinder;
|
||||
list: ElementArrayFinder;
|
||||
contents;
|
||||
tableBody;
|
||||
spinner;
|
||||
rows = by.css(`adf-datatable div[class*='adf-datatable-body'] div[class*='adf-datatable-row']`);
|
||||
allColumns;
|
||||
selectedRowNumber;
|
||||
allSelectedRows;
|
||||
selectAll;
|
||||
|
||||
constructor(rootElement: ElementFinder = element.all(by.css('adf-datatable')).first()) {
|
||||
this.rootElement = rootElement;
|
||||
this.list = this.rootElement.all(by.css(`div[class*='adf-datatable-body'] div[class*='adf-datatable-row']`));
|
||||
this.contents = this.rootElement.all(by.css('div[class="adf-datatable-body"] span'));
|
||||
this.tableBody = this.rootElement.all(by.css(`div[class='adf-datatable-body']`)).first();
|
||||
this.spinner = this.rootElement.element(by.css('mat-progress-spinner'));
|
||||
this.allColumns = this.rootElement.all(by.css('div[data-automation-id*="auto_id_entry."]'));
|
||||
this.selectedRowNumber = this.rootElement.element(by.css(`div[class*='is-selected'] div[data-automation-id*='text_']`));
|
||||
this.allSelectedRows = this.rootElement.all(by.css(`div[class*='is-selected']`));
|
||||
this.selectAll = this.rootElement.element(by.css(`div[class*='adf-datatable-header'] mat-checkbox`));
|
||||
}
|
||||
|
||||
checkAllRowsButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.selectAll);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkAllRows() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.selectAll);
|
||||
BrowserVisibility.waitUntilElementIsClickable(this.selectAll).then(() => {
|
||||
this.selectAll.click();
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.selectAll.element(by.css('input[aria-checked="true"]')));
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
clickCheckbox(columnName, columnValue) {
|
||||
const checkbox = this.getRowCheckbox(columnName, columnValue);
|
||||
BrowserVisibility.waitUntilElementIsClickable(checkbox);
|
||||
checkbox.click();
|
||||
}
|
||||
|
||||
checkRowIsNotChecked(columnName, columnValue) {
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(this.getRowCheckbox(columnName, columnValue).element(by.css('input[aria-checked="true"]')));
|
||||
}
|
||||
|
||||
checkRowIsChecked(columnName, columnValue) {
|
||||
const rowCheckbox = this.getRowCheckbox(columnName, columnValue);
|
||||
BrowserVisibility.waitUntilElementIsVisible(rowCheckbox.element(by.css('input[aria-checked="true"]')));
|
||||
}
|
||||
|
||||
getRowCheckbox(columnName, columnValue) {
|
||||
return this.getRow(columnName, columnValue)
|
||||
.element(by.css('mat-checkbox'));
|
||||
}
|
||||
|
||||
checkNoRowIsSelected() {
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(this.selectedRowNumber);
|
||||
}
|
||||
|
||||
getNumberOfSelectedRows() {
|
||||
return this.allSelectedRows.count();
|
||||
}
|
||||
|
||||
selectRowWithKeyboard(columnName, columnValue) {
|
||||
const row = this.getRow(columnName, columnValue);
|
||||
browser.actions().sendKeys(protractor.Key.COMMAND).click(row).perform();
|
||||
}
|
||||
|
||||
selectRow(columnName, columnValue) {
|
||||
const row = this.getRow(columnName, columnValue);
|
||||
BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
BrowserVisibility.waitUntilElementIsClickable(row);
|
||||
row.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
checkRowIsSelected(columnName, columnValue) {
|
||||
const selectedRow = this.getRowElement(columnName, columnValue).element(by.xpath(`ancestor::div[contains(@class, 'is-selected')]`));
|
||||
BrowserVisibility.waitUntilElementIsVisible(selectedRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkRowIsNotSelected(columnName, columnValue) {
|
||||
const selectedRow = this.getRowElement(columnName, columnValue).element(by.xpath(`ancestor::div[contains(@class, 'is-selected')]`));
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(selectedRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
getColumnValueForRow(identifyingColumn, identifyingValue, columnName) {
|
||||
const row = this.getRow(identifyingColumn, identifyingValue);
|
||||
BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
const rowColumn = row.element(by.css(`div[title="${columnName}"] span`));
|
||||
BrowserVisibility.waitUntilElementIsVisible(rowColumn);
|
||||
return rowColumn.getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the list is sorted.
|
||||
*
|
||||
* @param sortOrder: 'true' if the list is expected to be sorted ascendant and 'false' for descendant
|
||||
* @param locator: locator for column
|
||||
* @return 'true' if the list is sorted as expected and 'false' if it isn't
|
||||
*/
|
||||
checkListIsSorted(sortOrder, locator) {
|
||||
const deferred = protractor.promise.defer();
|
||||
const column = element.all(by.css(`div[title='${locator}'] span`));
|
||||
BrowserVisibility.waitUntilElementIsVisible(column.first());
|
||||
const initialList = [];
|
||||
column.each(function (currentElement) {
|
||||
currentElement.getText().then(function (text) {
|
||||
initialList.push(text);
|
||||
});
|
||||
}).then(function () {
|
||||
let sortedList = initialList;
|
||||
sortedList = sortedList.sort();
|
||||
if (sortOrder === false) {
|
||||
sortedList = sortedList.reverse();
|
||||
}
|
||||
deferred.fulfill(initialList.toString() === sortedList.toString());
|
||||
});
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
rightClickOnRow(columnName, columnValue) {
|
||||
const row = this.getRow(columnName, columnValue);
|
||||
browser.actions().click(row, protractor.Button.RIGHT).perform();
|
||||
BrowserVisibility.waitUntilElementIsVisible(element(by.id('adf-context-menu-content')));
|
||||
}
|
||||
|
||||
getTooltip(columnName, columnValue) {
|
||||
return this.getRowElement(columnName, columnValue).getAttribute('title');
|
||||
}
|
||||
|
||||
getFileHyperlink(filename) {
|
||||
return element(by.cssContainingText('adf-name-column[class*="adf-datatable-link"] span', filename));
|
||||
}
|
||||
|
||||
numberOfRows() {
|
||||
return this.rootElement.all(this.rows).count();
|
||||
}
|
||||
|
||||
async getAllRowsColumnValues(column) {
|
||||
const columnLocator = by.css("adf-datatable div[class*='adf-datatable-body'] div[class*='adf-datatable-row'] div[title='" + column + "'] span");
|
||||
BrowserVisibility.waitUntilElementIsVisible(element.all(columnLocator).first());
|
||||
const initialList: any = await element.all(columnLocator).getText();
|
||||
return initialList.filter((el) => el);
|
||||
}
|
||||
|
||||
async getRowsWithSameColumnValues(columnName, columnValue) {
|
||||
const columnLocator = by.css(`div[title='${columnName}'] div[data-automation-id="text_${columnValue}"] span`);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.rootElement.all(columnLocator).first());
|
||||
return this.rootElement.all(columnLocator).getText();
|
||||
}
|
||||
|
||||
doubleClickRow(columnName, columnValue) {
|
||||
const row = this.getRow(columnName, columnValue);
|
||||
BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
BrowserVisibility.waitUntilElementIsClickable(row);
|
||||
row.click();
|
||||
this.checkRowIsSelected(columnName, columnValue);
|
||||
browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
return this;
|
||||
}
|
||||
|
||||
waitForTableBody() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.tableBody);
|
||||
}
|
||||
|
||||
getFirstElementDetail(detail) {
|
||||
const firstNode = element.all(by.css(`adf-datatable div[title="${detail}"] span`)).first();
|
||||
return firstNode.getText();
|
||||
}
|
||||
|
||||
geCellElementDetail(detail) {
|
||||
return element.all(by.css(`adf-datatable div[title="${detail}"] span`));
|
||||
}
|
||||
|
||||
sortByColumn(sortOrder, column) {
|
||||
const locator = by.css(`div[data-automation-id="auto_id_${column}"]`);
|
||||
BrowserVisibility.waitUntilElementIsVisible(element(locator));
|
||||
return element(locator).getAttribute('class').then(function (result) {
|
||||
if (sortOrder === true) {
|
||||
if (!result.includes('sorted-asc')) {
|
||||
if (result.includes('sorted-desc') || result.includes('sortable')) {
|
||||
element(locator).click();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (result.includes('sorted-asc')) {
|
||||
element(locator).click();
|
||||
} else if (result.includes('sortable')) {
|
||||
element(locator).click();
|
||||
element(locator).click();
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
});
|
||||
}
|
||||
|
||||
checkContentIsDisplayed(columnName, columnValue) {
|
||||
const row = this.getRow(columnName, columnValue);
|
||||
BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkContentIsNotDisplayed(columnName, columnValue) {
|
||||
const row = this.getRowElement(columnName, columnValue);
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(row);
|
||||
return this;
|
||||
}
|
||||
|
||||
contentInPosition(position) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.contents);
|
||||
return this.contents.get(position - 1).getText();
|
||||
}
|
||||
|
||||
getRow(columnName, columnValue) {
|
||||
const row = this.rootElement.all(by.css(`div[title="${columnName}"] div[data-automation-id="text_${columnValue}"]`)).first()
|
||||
.element(by.xpath(`ancestor::div[contains(@class, 'adf-datatable-row')]`));
|
||||
BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
return row;
|
||||
}
|
||||
|
||||
getRowElement(columnName, columnValue) {
|
||||
return this.rootElement.all(by.css(`div[title="${columnName}"] div[data-automation-id="text_${columnValue}"] span`)).first();
|
||||
}
|
||||
|
||||
checkSpinnerIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsPresent(this.spinner);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSpinnerIsNotDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(this.spinner);
|
||||
return this;
|
||||
}
|
||||
|
||||
tableIsLoaded() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.rootElement);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkColumnIsDisplayed(column) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(element(by.css(`div[data-automation-id="auto_id_entry.${column}"]`)));
|
||||
return this;
|
||||
}
|
||||
|
||||
getNumberOfColumns() {
|
||||
return this.allColumns.count();
|
||||
}
|
||||
|
||||
getNumberOfRows() {
|
||||
return this.list.count();
|
||||
}
|
||||
|
||||
getCellByRowAndColumn(rowColumn, rowContent, columnName) {
|
||||
return this.getRow(rowColumn, rowContent).element(by.css(`div[title='${columnName}']`));
|
||||
}
|
||||
}
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { element, by } from 'protractor';
|
||||
import { DataTableComponentPage } from '../dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../navigationBarPage';
|
||||
|
||||
const source = {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
import { DataTableComponentPage } from '../dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class DataTablePage {
|
||||
|
@@ -15,11 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ProcessFiltersCloudComponent } from '../../process-cloud/processFiltersCloudComponent';
|
||||
import { ProcessListCloudComponent } from '../../process-cloud/processListCloudComponent';
|
||||
import { EditProcessFilterCloudComponent } from '../../process-cloud/editProcessFilterCloudComponent';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { ProcessFiltersCloudComponentPage, EditProcessFilterCloudComponentPage, ProcessListCloudComponentPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class ProcessCloudDemoPage {
|
||||
|
||||
@@ -32,11 +30,11 @@ export class ProcessCloudDemoPage {
|
||||
createButton = element(by.css('button[data-automation-id="create-button"'));
|
||||
newProcessButton = element(by.css('button[data-automation-id="btn-start-process"]'));
|
||||
|
||||
processListCloud = new ProcessListCloudComponent();
|
||||
editProcessFilterCloud = new EditProcessFilterCloudComponent();
|
||||
processListCloud = new ProcessListCloudComponentPage();
|
||||
editProcessFilterCloud = new EditProcessFilterCloudComponentPage();
|
||||
|
||||
processFiltersCloudComponent(filter) {
|
||||
return new ProcessFiltersCloudComponent(filter);
|
||||
return new ProcessFiltersCloudComponentPage(filter);
|
||||
}
|
||||
|
||||
editProcessFilterCloudComponent() {
|
||||
@@ -52,19 +50,19 @@ export class ProcessCloudDemoPage {
|
||||
}
|
||||
|
||||
allProcessesFilter() {
|
||||
return new ProcessFiltersCloudComponent(this.allProcesses);
|
||||
return new ProcessFiltersCloudComponentPage(this.allProcesses);
|
||||
}
|
||||
|
||||
runningProcessesFilter() {
|
||||
return new ProcessFiltersCloudComponent(this.runningProcesses);
|
||||
return new ProcessFiltersCloudComponentPage(this.runningProcesses);
|
||||
}
|
||||
|
||||
completedProcessesFilter() {
|
||||
return new ProcessFiltersCloudComponent(this.completedProcesses);
|
||||
return new ProcessFiltersCloudComponentPage(this.completedProcesses);
|
||||
}
|
||||
|
||||
customProcessFilter(filterName) {
|
||||
return new ProcessFiltersCloudComponent(element(by.css(`span[data-automation-id="${filterName}_filter"]`)));
|
||||
return new ProcessFiltersCloudComponentPage(element(by.css(`span[data-automation-id="${filterName}_filter"]`)));
|
||||
}
|
||||
|
||||
getActiveFilterName() {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { DataTableComponentPage } from '../../dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { element, by, protractor } from 'protractor';
|
||||
|
||||
export class ProcessListDemoPage {
|
||||
|
@@ -15,13 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { TaskFiltersCloudComponent } from '../../process-cloud/taskFiltersCloudComponent';
|
||||
import { TaskListCloudComponent } from '../../process-cloud/taskListCloudComponent';
|
||||
import { EditTaskFilterCloudComponent } from '../../process-cloud/editTaskFilterCloudComponent';
|
||||
import { EditTaskFilterCloudComponentPage, TaskFiltersCloudComponentPage } from '@alfresco/adf-testing';
|
||||
import { FormControllersPage } from '../../material/formControllersPage';
|
||||
|
||||
import { element, by, browser } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { BrowserVisibility, TaskListCloudComponentPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class TasksCloudDemoPage {
|
||||
|
||||
@@ -43,7 +41,7 @@ export class TasksCloudDemoPage {
|
||||
|
||||
formControllersPage = new FormControllersPage();
|
||||
|
||||
editTaskFilterCloud = new EditTaskFilterCloudComponent();
|
||||
editTaskFilterCloud = new EditTaskFilterCloudComponentPage();
|
||||
|
||||
disableDisplayTaskDetails() {
|
||||
this.formControllersPage.disableToggle(this.displayTaskDetailsToggle);
|
||||
@@ -56,11 +54,11 @@ export class TasksCloudDemoPage {
|
||||
}
|
||||
|
||||
taskFiltersCloudComponent(filter) {
|
||||
return new TaskFiltersCloudComponent(filter);
|
||||
return new TaskFiltersCloudComponentPage(filter);
|
||||
}
|
||||
|
||||
taskListCloudComponent() {
|
||||
return new TaskListCloudComponent();
|
||||
return new TaskListCloudComponentPage();
|
||||
}
|
||||
|
||||
editTaskFilterCloudComponent() {
|
||||
@@ -68,15 +66,15 @@ export class TasksCloudDemoPage {
|
||||
}
|
||||
|
||||
myTasksFilter() {
|
||||
return new TaskFiltersCloudComponent(this.myTasks);
|
||||
return new TaskFiltersCloudComponentPage(this.myTasks);
|
||||
}
|
||||
|
||||
completedTasksFilter() {
|
||||
return new TaskFiltersCloudComponent(this.completedTasks);
|
||||
return new TaskFiltersCloudComponentPage(this.completedTasks);
|
||||
}
|
||||
|
||||
customTaskFilter(filterName) {
|
||||
return new TaskFiltersCloudComponent(element(by.css(`span[data-automation-id="${filterName}-filter"]`)));
|
||||
return new TaskFiltersCloudComponentPage(element(by.css(`span[data-automation-id="${filterName}-filter"]`)));
|
||||
}
|
||||
|
||||
getActiveFilterName() {
|
||||
@@ -85,11 +83,11 @@ export class TasksCloudDemoPage {
|
||||
}
|
||||
|
||||
getAllRowsByIdColumn() {
|
||||
return new TaskListCloudComponent().getAllRowsByColumn('Id');
|
||||
return new TaskListCloudComponentPage().getAllRowsByColumn('Id');
|
||||
}
|
||||
|
||||
getAllRowsByProcessDefIdColumn() {
|
||||
return new TaskListCloudComponent().getAllRowsByColumn('Process Definition Id');
|
||||
return new TaskListCloudComponentPage().getAllRowsByColumn('Process Definition Id');
|
||||
}
|
||||
|
||||
clickOnTaskFilters() {
|
||||
|
@@ -1,82 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class EditProcessFilterDialog {
|
||||
|
||||
componentElement = element(by.css('adf-cloud-process-filter-dialog-cloud'));
|
||||
title = element(by.id('adf-process-filter-dialog-title'));
|
||||
filterNameInput = element(by.id('adf-filter-name-id'));
|
||||
saveButtonLocator = by.id('adf-save-button-id');
|
||||
cancelButtonLocator = by.id('adf-cancel-button-id');
|
||||
|
||||
clickOnSaveButton() {
|
||||
const saveButton = this.componentElement.element(this.saveButtonLocator);
|
||||
BrowserVisibility.waitUntilElementIsVisible(saveButton);
|
||||
saveButton.click();
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(this.componentElement);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.componentElement.element(this.saveButtonLocator));
|
||||
return this.componentElement.element(this.saveButtonLocator).isEnabled();
|
||||
}
|
||||
|
||||
clickOnCancelButton() {
|
||||
const cancelButton = this.componentElement.element(this.cancelButtonLocator);
|
||||
BrowserVisibility.waitUntilElementIsVisible(cancelButton);
|
||||
cancelButton.click();
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(this.componentElement);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkCancelButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.componentElement.element(this.cancelButtonLocator));
|
||||
return this.componentElement.element(this.cancelButtonLocator).isEnabled();
|
||||
}
|
||||
|
||||
getFilterName() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filterNameInput);
|
||||
return this.filterNameInput.getAttribute('value');
|
||||
}
|
||||
|
||||
setFilterName(filterName) {
|
||||
this.clearFilterName();
|
||||
this.filterNameInput.sendKeys(filterName);
|
||||
return this;
|
||||
}
|
||||
|
||||
clearFilterName() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filterNameInput);
|
||||
this.filterNameInput.click();
|
||||
this.filterNameInput.getAttribute('value').then((value) => {
|
||||
for (let i = value.length; i >= 0; i--) {
|
||||
this.filterNameInput.sendKeys(protractor.Key.BACK_SPACE);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
getTitle() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.title);
|
||||
return this.title.getText();
|
||||
}
|
||||
|
||||
}
|
@@ -1,82 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class EditTaskFilterDialog {
|
||||
|
||||
componentElement = element(by.css('adf-cloud-task-filter-dialog'));
|
||||
title = element(by.id('adf-task-filter-dialog-title'));
|
||||
filterNameInput = element(by.id('adf-filter-name-id'));
|
||||
saveButtonLocator = by.id('adf-save-button-id');
|
||||
cancelButtonLocator = by.id('adf-cancel-button-id');
|
||||
|
||||
clickOnSaveButton() {
|
||||
const saveButton = this.componentElement.element(this.saveButtonLocator);
|
||||
BrowserVisibility.waitUntilElementIsVisible(saveButton);
|
||||
saveButton.click();
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(this.componentElement);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.componentElement.element(this.saveButtonLocator));
|
||||
return this.componentElement.element(this.saveButtonLocator).isEnabled();
|
||||
}
|
||||
|
||||
clickOnCancelButton() {
|
||||
const cancelButton = this.componentElement.element(this.cancelButtonLocator);
|
||||
BrowserVisibility.waitUntilElementIsVisible(cancelButton);
|
||||
cancelButton.click();
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(this.componentElement);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkCancelButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.componentElement.element(this.cancelButtonLocator));
|
||||
return this.componentElement.element(this.cancelButtonLocator).isEnabled();
|
||||
}
|
||||
|
||||
getFilterName() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filterNameInput);
|
||||
return this.filterNameInput.getAttribute('value');
|
||||
}
|
||||
|
||||
setFilterName(filterName) {
|
||||
this.clearFilterName();
|
||||
this.filterNameInput.sendKeys(filterName);
|
||||
return this;
|
||||
}
|
||||
|
||||
clearFilterName() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filterNameInput);
|
||||
this.filterNameInput.click();
|
||||
this.filterNameInput.getAttribute('value').then((value) => {
|
||||
for (let i = value.length; i >= 0; i--) {
|
||||
this.filterNameInput.sendKeys(protractor.Key.BACK_SPACE);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
getTitle() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.title);
|
||||
return this.title.getText();
|
||||
}
|
||||
|
||||
}
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
import { DataTableComponentPage } from './dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
const column = {
|
||||
|
@@ -1,203 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { EditProcessFilterDialog } from '../dialog/editProcessFilterDialog';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class EditProcessFilterCloudComponent {
|
||||
|
||||
customiseFilter = element(by.id('adf-edit-process-filter-title-id'));
|
||||
selectedOption = element.all(by.css('mat-option[class*="mat-selected"]')).first();
|
||||
saveButton = element(by.css('button[data-automation-id="adf-filter-action-save"]'));
|
||||
saveAsButton = element(by.css('button[data-automation-id="adf-filter-action-saveAs"]'));
|
||||
deleteButton = element(by.css('button[data-automation-id="adf-filter-action-delete"]'));
|
||||
|
||||
editProcessFilter = new EditProcessFilterDialog();
|
||||
|
||||
editProcessFilterDialog() {
|
||||
return this.editProcessFilter;
|
||||
}
|
||||
|
||||
clickCustomiseFilterHeader() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.customiseFilter);
|
||||
this.customiseFilter.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
checkCustomiseFilterHeaderIsExpanded() {
|
||||
const expansionPanelExtended = element.all(by.css('mat-expansion-panel-header[class*="mat-expanded"]')).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(expansionPanelExtended);
|
||||
const content = element(by.css('div[class*="mat-expansion-panel-content "][style*="visible"]'));
|
||||
BrowserVisibility.waitUntilElementIsVisible(content);
|
||||
return this;
|
||||
}
|
||||
|
||||
setStatusFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('status');
|
||||
|
||||
const statusElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(statusElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(statusElement);
|
||||
statusElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getStateFilterDropDownValue() {
|
||||
return element(by.css("mat-form-field[data-automation-id='status'] span")).getText();
|
||||
}
|
||||
|
||||
setSortFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('sort');
|
||||
|
||||
const sortElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(sortElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(sortElement);
|
||||
sortElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getSortFilterDropDownValue() {
|
||||
const sortLocator = element.all(by.css("mat-form-field[data-automation-id='sort'] span")).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(sortLocator);
|
||||
return sortLocator.getText();
|
||||
}
|
||||
|
||||
setOrderFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('order');
|
||||
|
||||
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(orderElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(orderElement);
|
||||
orderElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getOrderFilterDropDownValue() {
|
||||
return element(by.css("mat-form-field[data-automation-id='order'] span")).getText();
|
||||
}
|
||||
|
||||
clickOnDropDownArrow(option) {
|
||||
const dropDownArrow = element.all(by.css("mat-form-field[data-automation-id='" + option + "'] div[class='mat-select-arrow-wrapper']")).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(dropDownArrow);
|
||||
BrowserVisibility.waitUntilElementIsClickable(dropDownArrow);
|
||||
dropDownArrow.click();
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.selectedOption);
|
||||
}
|
||||
|
||||
setAppNameDropDown(option) {
|
||||
this.clickOnDropDownArrow('appName');
|
||||
|
||||
const appNameElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(appNameElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(appNameElement);
|
||||
appNameElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
async checkAppNamesAreUnique() {
|
||||
const appNameList = element.all(by.css('mat-option[data-automation-id="adf-cloud-edit-process-property-optionsappName"] span'));
|
||||
const appTextList: any = await appNameList.getText();
|
||||
const uniqueArray = appTextList.filter((appName) => {
|
||||
const sameAppNameArray = appTextList.filter((eachApp) => eachApp === appName);
|
||||
return sameAppNameArray.length === 1;
|
||||
});
|
||||
return uniqueArray.length === appTextList.length;
|
||||
}
|
||||
|
||||
getNumberOfAppNameOptions() {
|
||||
this.clickOnDropDownArrow('appName');
|
||||
const dropdownOptions = element.all(by.css('.mat-select-panel mat-option'));
|
||||
return dropdownOptions.count();
|
||||
}
|
||||
|
||||
setProcessInstanceId(option) {
|
||||
return this.setProperty('processInstanceId', option);
|
||||
}
|
||||
|
||||
getProcessInstanceId() {
|
||||
return this.getProperty('processInstanceId');
|
||||
}
|
||||
|
||||
getProperty(property) {
|
||||
const locator = element.all(by.css('input[data-automation-id="adf-cloud-edit-process-property-' + property + '"]')).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(locator);
|
||||
return locator.getAttribute('value');
|
||||
}
|
||||
|
||||
setProperty(property, option) {
|
||||
const locator = element.all(by.css('input[data-automation-id="adf-cloud-edit-process-property-' + property + '"]')).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(locator);
|
||||
locator.clear();
|
||||
locator.sendKeys(option);
|
||||
locator.sendKeys(protractor.Key.ENTER);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveAsButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveAsButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkDeleteButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.deleteButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
return this.saveButton.isEnabled();
|
||||
}
|
||||
|
||||
checkSaveAsButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveAsButton);
|
||||
return this.saveAsButton.isEnabled();
|
||||
}
|
||||
|
||||
checkDeleteButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.deleteButton);
|
||||
return this.deleteButton.isEnabled();
|
||||
}
|
||||
|
||||
clickSaveAsButton() {
|
||||
const disabledButton = element(by.css(("button[id='adf-save-as-id'][disabled]")));
|
||||
BrowserVisibility.waitUntilElementIsClickable(this.saveAsButton);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveAsButton);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(disabledButton);
|
||||
this.saveAsButton.click();
|
||||
return this.editProcessFilter;
|
||||
}
|
||||
|
||||
clickDeleteButton() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.deleteButton);
|
||||
this.deleteButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
clickSaveButton() {
|
||||
const disabledButton = element(by.css(("button[id='adf-save-as-id'][disabled]")));
|
||||
BrowserVisibility.waitUntilElementIsClickable(this.saveButton);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(disabledButton);
|
||||
this.saveButton.click();
|
||||
return this;
|
||||
}
|
||||
}
|
@@ -1,266 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { EditTaskFilterDialog } from '../dialog/editTaskFilterDialog';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class EditTaskFilterCloudComponent {
|
||||
|
||||
customiseFilter = element(by.id('adf-edit-task-filter-title-id'));
|
||||
selectedOption = element.all(by.css('mat-option[class*="mat-selected"]')).first();
|
||||
assignee = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-assignee"]'));
|
||||
priority = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-priority"]'));
|
||||
taskName = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskName"]'));
|
||||
processDefinitionId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processDefinitionId"]'));
|
||||
processInstanceId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]'));
|
||||
lastModifiedFrom = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-lastModifiedFrom"]'));
|
||||
lastModifiedTo = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-lastModifiedTo"]'));
|
||||
parentTaskId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-parentTaskId"]'));
|
||||
owner = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-owner"]'));
|
||||
saveButton = element(by.css('[data-automation-id="adf-filter-action-save"]'));
|
||||
saveAsButton = element(by.css('[data-automation-id="adf-filter-action-saveAs"]'));
|
||||
deleteButton = element(by.css('[data-automation-id="adf-filter-action-delete"]'));
|
||||
|
||||
editTaskFilter = new EditTaskFilterDialog();
|
||||
|
||||
editTaskFilterDialog() {
|
||||
return this.editTaskFilter;
|
||||
}
|
||||
|
||||
clickCustomiseFilterHeader() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.customiseFilter);
|
||||
this.customiseFilter.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
setStatusFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('status');
|
||||
|
||||
const statusElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(statusElement);
|
||||
BrowserVisibility.waitUntilElementIsClickable(statusElement);
|
||||
statusElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getStatusFilterDropDownValue() {
|
||||
return element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-status'] span")).first().getText();
|
||||
}
|
||||
|
||||
setSortFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('sort');
|
||||
|
||||
const sortElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(sortElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(sortElement);
|
||||
sortElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getSortFilterDropDownValue() {
|
||||
const elementSort = element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-sort'] span")).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(elementSort);
|
||||
return elementSort.getText();
|
||||
}
|
||||
|
||||
setOrderFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('order');
|
||||
|
||||
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(orderElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(orderElement);
|
||||
orderElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getOrderFilterDropDownValue() {
|
||||
return element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-order'] span")).first().getText();
|
||||
}
|
||||
|
||||
clickOnDropDownArrow(option) {
|
||||
const dropDownArrow = element.all(by.css("mat-form-field[data-automation-id='" + option + "'] div[class*='arrow']")).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(dropDownArrow);
|
||||
dropDownArrow.click();
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.selectedOption);
|
||||
}
|
||||
|
||||
setAssignee(option) {
|
||||
return this.setProperty('assignee', option);
|
||||
}
|
||||
|
||||
getAssignee() {
|
||||
return this.assignee.getText();
|
||||
}
|
||||
|
||||
setPriority(option) {
|
||||
return this.setProperty('priority', option);
|
||||
}
|
||||
|
||||
getPriority() {
|
||||
return this.priority.getText();
|
||||
}
|
||||
|
||||
setParentTaskId(option) {
|
||||
return this.setProperty('parentTaskId', option);
|
||||
}
|
||||
|
||||
getParentTaskId() {
|
||||
return this.parentTaskId.getText();
|
||||
}
|
||||
|
||||
setOwner(option) {
|
||||
return this.setProperty('owner', option);
|
||||
}
|
||||
|
||||
getOwner() {
|
||||
return this.owner.getText();
|
||||
}
|
||||
|
||||
setLastModifiedFrom(option) {
|
||||
this.clearField(this.lastModifiedFrom);
|
||||
return this.setProperty('lastModifiedFrom', option);
|
||||
}
|
||||
|
||||
getLastModifiedFrom() {
|
||||
return this.lastModifiedFrom.getText();
|
||||
}
|
||||
|
||||
setLastModifiedTo(option) {
|
||||
this.clearField(this.lastModifiedTo);
|
||||
return this.setProperty('lastModifiedTo', option);
|
||||
}
|
||||
|
||||
getLastModifiedTo() {
|
||||
return this.lastModifiedTo.getText();
|
||||
}
|
||||
|
||||
checkSaveButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveAsButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveAsButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkDeleteButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.deleteButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
return this.saveButton.isEnabled();
|
||||
}
|
||||
|
||||
checkSaveAsButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
return this.saveAsButton.isEnabled();
|
||||
}
|
||||
|
||||
checkDeleteButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
return this.deleteButton.isEnabled();
|
||||
}
|
||||
|
||||
clickSaveAsButton() {
|
||||
const disabledButton = element(by.css(("button[data-automation-id='adf-filter-action-saveAs'][disabled]")));
|
||||
BrowserVisibility.waitUntilElementIsClickable(this.saveAsButton);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveAsButton);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(disabledButton);
|
||||
this.saveAsButton.click();
|
||||
return this.editTaskFilter;
|
||||
}
|
||||
|
||||
clickDeleteButton() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.deleteButton);
|
||||
this.deleteButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
clickSaveButton() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
this.saveButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
clearAssignee() {
|
||||
this.clearField(this.assignee);
|
||||
return this;
|
||||
}
|
||||
|
||||
clearField(locator) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(locator);
|
||||
locator.getAttribute('value').then((result) => {
|
||||
for (let i = result.length; i >= 0; i--) {
|
||||
locator.sendKeys(protractor.Key.BACK_SPACE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setAppNameDropDown(option) {
|
||||
this.clickOnDropDownArrow('appName');
|
||||
|
||||
const appNameElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(appNameElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(appNameElement);
|
||||
appNameElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getAppNameDropDownValue() {
|
||||
const locator = element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-appName'] span")).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(locator);
|
||||
return locator.getText();
|
||||
}
|
||||
|
||||
setTaskName(option) {
|
||||
return this.setProperty('taskName', option);
|
||||
}
|
||||
|
||||
getTaskName() {
|
||||
return this.taskName.getAttribute('value');
|
||||
}
|
||||
|
||||
setProcessDefinitionId(option) {
|
||||
return this.setProperty('processDefinitionId', option);
|
||||
}
|
||||
|
||||
getProcessDefinitionId() {
|
||||
return this.processDefinitionId.getAttribute('value');
|
||||
}
|
||||
|
||||
setProcessInstanceId(option) {
|
||||
return this.setProperty('processInstanceId', option);
|
||||
}
|
||||
|
||||
setProperty(property, option) {
|
||||
const locator = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-' + property + '"]'));
|
||||
BrowserVisibility.waitUntilElementIsVisible(locator);
|
||||
locator.clear();
|
||||
locator.sendKeys(option);
|
||||
locator.sendKeys(protractor.Key.ENTER);
|
||||
return this;
|
||||
}
|
||||
|
||||
getProcessInstanceId() {
|
||||
return this.processInstanceId.getAttribute('value');
|
||||
}
|
||||
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class GroupCloudComponent {
|
||||
|
||||
groupCloudSearch = element(by.css('input[data-automation-id="adf-cloud-group-search-input"]'));
|
||||
|
||||
searchGroups(name) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.groupCloudSearch);
|
||||
this.groupCloudSearch.clear().then(() => {
|
||||
for (let i = 0; i < name.length; i++) {
|
||||
this.groupCloudSearch.sendKeys(name[i]);
|
||||
}
|
||||
this.groupCloudSearch.sendKeys(protractor.Key.BACK_SPACE);
|
||||
this.groupCloudSearch.sendKeys(name[name.length - 1]);
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
selectGroupFromList(name) {
|
||||
const groupRow = element.all(by.cssContainingText('mat-option span', name)).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(groupRow);
|
||||
groupRow.click();
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(groupRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkGroupIsDisplayed(name) {
|
||||
const groupRow = element.all(by.cssContainingText('mat-option span', name)).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(groupRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkGroupIsNotDisplayed(name) {
|
||||
const groupRow = element.all(by.cssContainingText('mat-option span', name)).first();
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(groupRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSelectedGroup(group) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('mat-chip[data-automation-id*="adf-cloud-group-chip-"]', group)));
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -1,75 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class PeopleCloudComponent {
|
||||
|
||||
peopleCloudSearch = element(by.css('input[data-automation-id="adf-people-cloud-search-input"]'));
|
||||
|
||||
searchAssigneeAndSelect(name) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSearch);
|
||||
this.peopleCloudSearch.clear();
|
||||
this.peopleCloudSearch.sendKeys(name);
|
||||
this.selectAssigneeFromList(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
searchAssignee(name) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSearch);
|
||||
this.peopleCloudSearch.clear().then(() => {
|
||||
for (let i = 0; i < name.length; i++) {
|
||||
this.peopleCloudSearch.sendKeys(name[i]);
|
||||
}
|
||||
this.peopleCloudSearch.sendKeys(protractor.Key.BACK_SPACE);
|
||||
this.peopleCloudSearch.sendKeys(name[name.length - 1]);
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
selectAssigneeFromList(name) {
|
||||
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
|
||||
BrowserVisibility.waitUntilElementIsVisible(assigneeRow);
|
||||
assigneeRow.click();
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
getAssignee() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSearch);
|
||||
return this.peopleCloudSearch.getAttribute('value');
|
||||
}
|
||||
|
||||
checkUserIsDisplayed(name) {
|
||||
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
|
||||
BrowserVisibility.waitUntilElementIsVisible(assigneeRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkUserIsNotDisplayed(name) {
|
||||
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSelectedPeople(person) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('mat-chip-list mat-chip', person)));
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -1,58 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class ProcessFiltersCloudComponent {
|
||||
|
||||
filter;
|
||||
filterIcon = by.xpath("ancestor::div[@class='mat-list-item-content']/mat-icon");
|
||||
|
||||
constructor(filter) {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
checkProcessFilterIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
getProcessFilterIcon() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
const icon = this.filter.element(this.filterIcon);
|
||||
BrowserVisibility.waitUntilElementIsVisible(icon);
|
||||
return icon.getText();
|
||||
}
|
||||
|
||||
checkProcessFilterHasNoIcon() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(this.filter.element(this.filterIcon));
|
||||
}
|
||||
|
||||
clickProcessFilter() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
BrowserVisibility.waitUntilElementIsClickable(this.filter);
|
||||
return this.filter.click();
|
||||
}
|
||||
|
||||
checkProcessFilterNotDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(this.filter);
|
||||
return this.filter;
|
||||
}
|
||||
|
||||
}
|
@@ -1,71 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { DataTableComponentPage } from '../dataTableComponentPage';
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
export class ProcessListCloudComponent {
|
||||
|
||||
processList = element(by.css('adf-cloud-process-list'));
|
||||
noProcessFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
|
||||
|
||||
dataTable = new DataTableComponentPage(this.processList);
|
||||
|
||||
getDataTable() {
|
||||
return this.dataTable;
|
||||
}
|
||||
|
||||
selectRow(processName) {
|
||||
return this.dataTable.selectRow('Name', processName);
|
||||
}
|
||||
|
||||
selectRowById(processId) {
|
||||
return this.dataTable.selectRow('Id', processId);
|
||||
}
|
||||
|
||||
checkContentIsDisplayedByName(processName) {
|
||||
return this.dataTable.checkContentIsDisplayed('Name', processName);
|
||||
}
|
||||
|
||||
checkContentIsDisplayedById(processId) {
|
||||
return this.dataTable.checkContentIsDisplayed('Id', processId);
|
||||
}
|
||||
|
||||
checkContentIsNotDisplayedById(processId) {
|
||||
return this.dataTable.checkContentIsNotDisplayed('Id', processId);
|
||||
}
|
||||
|
||||
getAllRowsNameColumn() {
|
||||
return this.dataTable.getAllRowsColumnValues('Name');
|
||||
}
|
||||
|
||||
checkProcessListIsLoaded() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.processList);
|
||||
return this;
|
||||
}
|
||||
|
||||
getNoProcessFoundMessage() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.noProcessFound);
|
||||
return this.noProcessFound.getText();
|
||||
}
|
||||
|
||||
getAllRowsByColumn(column) {
|
||||
return this.dataTable.getAllRowsColumnValues(column);
|
||||
}
|
||||
|
||||
}
|
@@ -1,57 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class TaskFiltersCloudComponent {
|
||||
|
||||
filter;
|
||||
taskIcon = by.xpath("ancestor::div[@class='mat-list-item-content']/mat-icon");
|
||||
|
||||
constructor(filter) {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
checkTaskFilterIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
getTaskFilterIcon() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
const icon = this.filter.element(this.taskIcon);
|
||||
BrowserVisibility.waitUntilElementIsVisible(icon);
|
||||
return icon.getText();
|
||||
}
|
||||
|
||||
checkTaskFilterHasNoIcon() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(this.filter.element(this.taskIcon));
|
||||
}
|
||||
|
||||
clickTaskFilter() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
return this.filter.click();
|
||||
}
|
||||
|
||||
checkTaskFilterNotDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(this.filter);
|
||||
return this.filter;
|
||||
}
|
||||
|
||||
}
|
@@ -1,113 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { DataTableComponentPage } from '../dataTableComponentPage';
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
const column = {
|
||||
id: 'Id'
|
||||
};
|
||||
|
||||
export class TaskListCloudComponent {
|
||||
|
||||
taskList = element(by.css('adf-cloud-task-list'));
|
||||
noTasksFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
|
||||
|
||||
dataTable = new DataTableComponentPage(this.taskList);
|
||||
|
||||
getDataTable() {
|
||||
return this.dataTable;
|
||||
}
|
||||
|
||||
clickCheckbox(taskName) {
|
||||
return this.dataTable.clickCheckbox('Name', taskName);
|
||||
}
|
||||
|
||||
checkRowIsNotChecked(taskName) {
|
||||
return this.dataTable.checkRowIsNotChecked('Name', taskName);
|
||||
}
|
||||
|
||||
checkRowIsChecked(taskName) {
|
||||
return this.dataTable.checkRowIsChecked('Name', taskName);
|
||||
}
|
||||
|
||||
getRowsWithSameName(taskName) {
|
||||
return this.dataTable.getRowsWithSameColumnValues('Name', taskName);
|
||||
}
|
||||
|
||||
checkRowIsSelected(taskName) {
|
||||
return this.dataTable.checkRowIsSelected('Name', taskName);
|
||||
}
|
||||
|
||||
checkRowIsNotSelected(taskName) {
|
||||
return this.dataTable.checkRowIsNotSelected('Name', taskName);
|
||||
}
|
||||
|
||||
selectRowWithKeyboard(taskName) {
|
||||
return this.dataTable.selectRowWithKeyboard('Name', taskName);
|
||||
}
|
||||
|
||||
selectRow(taskName) {
|
||||
return this.dataTable.selectRow('Name', taskName);
|
||||
}
|
||||
|
||||
getRow(taskName) {
|
||||
return this.dataTable.getRowElement('Name', taskName);
|
||||
}
|
||||
|
||||
checkContentIsDisplayedByProcessInstanceId(taskName) {
|
||||
return this.dataTable.checkContentIsDisplayed('ProcessInstanceId', taskName);
|
||||
}
|
||||
|
||||
checkContentIsDisplayedById(taskName) {
|
||||
return this.dataTable.checkContentIsDisplayed('Id', taskName);
|
||||
}
|
||||
|
||||
checkContentIsDisplayedByName(taskName) {
|
||||
return this.dataTable.checkContentIsDisplayed('Name', taskName);
|
||||
}
|
||||
|
||||
checkContentIsNotDisplayedByName(taskName) {
|
||||
return this.dataTable.checkContentIsNotDisplayed('Name', taskName);
|
||||
}
|
||||
|
||||
checkTaskListIsLoaded() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.taskList);
|
||||
return this;
|
||||
}
|
||||
|
||||
getNoTasksFoundMessage() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.noTasksFound);
|
||||
return this.noTasksFound.getText();
|
||||
}
|
||||
|
||||
getAllRowsNameColumn() {
|
||||
return this.dataTable.getAllRowsColumnValues('Name');
|
||||
}
|
||||
|
||||
getAllRowsByColumn(columnName) {
|
||||
return this.dataTable.getAllRowsColumnValues(columnName);
|
||||
}
|
||||
|
||||
getIdCellValue(rowName) {
|
||||
const locator = new DataTableComponentPage().getCellByRowAndColumn('Name', rowName, column.id);
|
||||
BrowserVisibility.waitUntilElementIsVisible(locator);
|
||||
return locator.getText();
|
||||
}
|
||||
|
||||
}
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { by, element } from 'protractor';
|
||||
import { DataTableComponentPage } from '../dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class FiltersPage {
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { element, by } from 'protractor';
|
||||
import { StartProcessPage } from './startProcessPage';
|
||||
import { DataTableComponentPage } from '../dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class ProcessFiltersPage {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { DataTableComponentPage } from '../dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class TasksListPage {
|
||||
|
@@ -1,150 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { EditTaskFilterDialog } from '../dialog/editTaskFilterDialog';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class EditTaskFilterCloudComponent {
|
||||
|
||||
customiseFilter = element(by.id('adf-edit-task-filter-title-id'));
|
||||
selectedOption = element.all(by.css('mat-option[class*="mat-selected"]')).first();
|
||||
assignment = element(by.css('mat-form-field[data-automation-id="assignment"] input'));
|
||||
saveButton = element(by.css('button[data-automation-id="Save"]'));
|
||||
saveAsButton = element(by.css('button[data-automation-id="Save as"]'));
|
||||
deleteButton = element(by.css('button[data-automation-id="Delete"]'));
|
||||
|
||||
editTaskFilter = new EditTaskFilterDialog();
|
||||
|
||||
editTaskFilterDialog() {
|
||||
return this.editTaskFilter;
|
||||
}
|
||||
|
||||
clickCustomiseFilterHeader() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.customiseFilter);
|
||||
this.customiseFilter.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
setStateFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('status');
|
||||
|
||||
const stateElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(stateElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(stateElement);
|
||||
stateElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getStateFilterDropDownValue() {
|
||||
return element(by.css("mat-form-field[data-automation-id='status'] span")).getText();
|
||||
}
|
||||
|
||||
setSortFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('sort');
|
||||
|
||||
const sortElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(sortElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(sortElement);
|
||||
sortElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getSortFilterDropDownValue() {
|
||||
return element(by.css("mat-form-field[data-automation-id='sort'] span")).getText();
|
||||
}
|
||||
|
||||
setOrderFilterDropDown(option) {
|
||||
this.clickOnDropDownArrow('order');
|
||||
|
||||
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||
BrowserVisibility.waitUntilElementIsClickable(orderElement);
|
||||
BrowserVisibility.waitUntilElementIsVisible(orderElement);
|
||||
orderElement.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getOrderFilterDropDownValue() {
|
||||
return element(by.css("mat-form-field[data-automation-id='order'] span")).getText();
|
||||
}
|
||||
|
||||
clickOnDropDownArrow(option) {
|
||||
const dropDownArrow = element(by.css("mat-form-field[data-automation-id='" + option + "'] div[class*='arrow']"));
|
||||
BrowserVisibility.waitUntilElementIsVisible(dropDownArrow);
|
||||
dropDownArrow.click();
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.selectedOption);
|
||||
}
|
||||
|
||||
setAssignment(option) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.assignment);
|
||||
this.assignment.clear();
|
||||
this.assignment.sendKeys(option);
|
||||
this.assignment.sendKeys(protractor.Key.ENTER);
|
||||
return this;
|
||||
}
|
||||
|
||||
getAssignment() {
|
||||
return this.assignment.getText();
|
||||
}
|
||||
|
||||
checkSaveButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveAsButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveAsButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkDeleteButtonIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.deleteButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSaveButtonIsEnabled() {
|
||||
return this.saveButton.isEnabled();
|
||||
}
|
||||
|
||||
checkSaveAsButtonIsEnabled() {
|
||||
return this.saveAsButton.isEnabled();
|
||||
}
|
||||
|
||||
checkDeleteButtonIsEnabled() {
|
||||
return this.deleteButton.isEnabled();
|
||||
}
|
||||
|
||||
clickSaveAsButton() {
|
||||
BrowserVisibility.waitUntilElementIsClickable(this.saveAsButton);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveAsButton);
|
||||
this.saveAsButton.click();
|
||||
return this.editTaskFilter;
|
||||
}
|
||||
|
||||
clickDeleteButton() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.deleteButton);
|
||||
this.deleteButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
clickSaveButton() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveButton);
|
||||
this.saveButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DataTableComponentPage } from './dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { SearchSortingPickerPage } from './content-services/search/components/search-sortingPicker.page';
|
||||
import { element, by } from 'protractor';
|
||||
import { ContentServicesPage } from './contentServicesPage';
|
||||
|
@@ -20,8 +20,7 @@ import TestConfig = require('../test.config');
|
||||
import { SettingsPage } from '../pages/adf/settingsPage';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
import { PeopleGroupCloudComponentPage } from '../pages/adf/demo-shell/process-services/peopleGroupCloudComponentPage';
|
||||
import { PeopleCloudComponent } from '../pages/adf/process-cloud/peopleCloudComponent';
|
||||
import { GroupCloudComponent } from '../pages/adf/process-cloud/groupCloudComponent';
|
||||
import { GroupCloudComponentPage, PeopleCloudComponentPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginSSOPage, IdentityService, GroupIdentityService, RolesService, ApiService } from '@alfresco/adf-testing';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
@@ -33,8 +32,8 @@ describe('People Groups Cloud Component', () => {
|
||||
const loginSSOPage = new LoginSSOPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const peopleGroupCloudComponentPage = new PeopleGroupCloudComponentPage();
|
||||
const peopleCloudComponent = new PeopleCloudComponent();
|
||||
const groupCloudComponent = new GroupCloudComponent();
|
||||
const peopleCloudComponent = new PeopleCloudComponentPage();
|
||||
const groupCloudComponentPage = new GroupCloudComponentPage();
|
||||
let identityService: IdentityService;
|
||||
let groupIdentityService: GroupIdentityService;
|
||||
let rolesService: RolesService;
|
||||
@@ -139,36 +138,36 @@ describe('People Groups Cloud Component', () => {
|
||||
peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
|
||||
peopleGroupCloudComponentPage.clickGroupCloudFilterRole();
|
||||
peopleGroupCloudComponentPage.enterGroupRoles(`["${CONSTANTS.ROLES.APS_ADMIN}"]`);
|
||||
groupCloudComponent.searchGroups('TestGroup');
|
||||
groupCloudComponent.checkGroupIsDisplayed(`${groupAps.name}`);
|
||||
groupCloudComponent.checkGroupIsNotDisplayed(`${groupActiviti.name}`);
|
||||
groupCloudComponent.checkGroupIsNotDisplayed(`${groupNoRole.name}`);
|
||||
groupCloudComponent.selectGroupFromList(`${groupAps.name}`);
|
||||
groupCloudComponent.checkSelectedGroup(`${groupAps.name}`);
|
||||
groupCloudComponentPage.searchGroups('TestGroup');
|
||||
groupCloudComponentPage.checkGroupIsDisplayed(`${groupAps.name}`);
|
||||
groupCloudComponentPage.checkGroupIsNotDisplayed(`${groupActiviti.name}`);
|
||||
groupCloudComponentPage.checkGroupIsNotDisplayed(`${groupNoRole.name}`);
|
||||
groupCloudComponentPage.selectGroupFromList(`${groupAps.name}`);
|
||||
groupCloudComponentPage.checkSelectedGroup(`${groupAps.name}`);
|
||||
});
|
||||
|
||||
it('[C297674] Add more than one role filtering to GroupCloudComponent', () => {
|
||||
peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
|
||||
peopleGroupCloudComponentPage.clickGroupCloudFilterRole();
|
||||
peopleGroupCloudComponentPage.enterGroupRoles(`["${CONSTANTS.ROLES.APS_ADMIN}", "${CONSTANTS.ROLES.ACTIVITI_ADMIN}"]`);
|
||||
groupCloudComponent.searchGroups('TestGroup');
|
||||
groupCloudComponent.checkGroupIsDisplayed(`${groupActiviti.name}`);
|
||||
groupCloudComponent.checkGroupIsDisplayed(`${groupAps.name}`);
|
||||
groupCloudComponent.checkGroupIsNotDisplayed(`${groupNoRole.name}`);
|
||||
groupCloudComponent.selectGroupFromList(`${groupActiviti.name}`);
|
||||
groupCloudComponent.checkSelectedGroup(`${groupActiviti.name}`);
|
||||
groupCloudComponentPage.searchGroups('TestGroup');
|
||||
groupCloudComponentPage.checkGroupIsDisplayed(`${groupActiviti.name}`);
|
||||
groupCloudComponentPage.checkGroupIsDisplayed(`${groupAps.name}`);
|
||||
groupCloudComponentPage.checkGroupIsNotDisplayed(`${groupNoRole.name}`);
|
||||
groupCloudComponentPage.selectGroupFromList(`${groupActiviti.name}`);
|
||||
groupCloudComponentPage.checkSelectedGroup(`${groupActiviti.name}`);
|
||||
});
|
||||
|
||||
it('[C297674] Add no role filters to GroupCloudComponent', () => {
|
||||
peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
|
||||
peopleGroupCloudComponentPage.clickGroupCloudFilterRole();
|
||||
peopleGroupCloudComponentPage.clearField(peopleGroupCloudComponentPage.groupRoleInput);
|
||||
groupCloudComponent.searchGroups('TestGroup');
|
||||
groupCloudComponent.checkGroupIsDisplayed(`${groupNoRole.name}`);
|
||||
groupCloudComponent.checkGroupIsDisplayed(`${groupActiviti.name}`);
|
||||
groupCloudComponent.checkGroupIsDisplayed(`${groupAps.name}`);
|
||||
groupCloudComponent.selectGroupFromList(`${groupNoRole.name}`);
|
||||
groupCloudComponent.checkSelectedGroup(`${groupNoRole.name}`);
|
||||
groupCloudComponentPage.searchGroups('TestGroup');
|
||||
groupCloudComponentPage.checkGroupIsDisplayed(`${groupNoRole.name}`);
|
||||
groupCloudComponentPage.checkGroupIsDisplayed(`${groupActiviti.name}`);
|
||||
groupCloudComponentPage.checkGroupIsDisplayed(`${groupAps.name}`);
|
||||
groupCloudComponentPage.selectGroupFromList(`${groupNoRole.name}`);
|
||||
groupCloudComponentPage.checkSelectedGroup(`${groupNoRole.name}`);
|
||||
});
|
||||
|
||||
});
|
||||
|
@@ -15,16 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginSSOPage } from '@alfresco/adf-testing';
|
||||
import { SettingsPage } from '../pages/adf/settingsPage';
|
||||
import { AppListCloudPage } from '@alfresco/adf-testing';
|
||||
import TestConfig = require('../test.config');
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||
import { StartTasksCloudPage } from '@alfresco/adf-testing';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import { PeopleCloudComponent } from '../pages/adf/process-cloud/peopleCloudComponent';
|
||||
import { TaskHeaderCloudPage } from '@alfresco/adf-testing';
|
||||
import { LoginSSOPage, AppListCloudPage, StringUtil, TaskHeaderCloudPage,
|
||||
StartTasksCloudPage, PeopleCloudComponentPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Start Task', () => {
|
||||
@@ -36,7 +32,7 @@ describe('Start Task', () => {
|
||||
const appListCloudComponent = new AppListCloudPage();
|
||||
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
||||
const startTask = new StartTasksCloudPage();
|
||||
const peopleCloudComponent = new PeopleCloudComponent();
|
||||
const peopleCloudComponent = new PeopleCloudComponentPage();
|
||||
const standaloneTaskName = StringUtil.generateRandomString(5);
|
||||
const unassignedTaskName = StringUtil.generateRandomString(5);
|
||||
const taskName255Characters = StringUtil.generateRandomString(255);
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { LoginPage } from '../../pages/adf/loginPage';
|
||||
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { DataTableComponentPage } from '../../pages/adf/dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
import { DatePickerPage } from '../../pages/adf/material/datePickerPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { LoginPage } from '../../pages/adf/loginPage';
|
||||
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { DataTableComponentPage } from '../../pages/adf/dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { ConfigEditorPage } from '../../pages/adf/configEditorPage';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { LoginPage } from '../../pages/adf/loginPage';
|
||||
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { DataTableComponentPage } from '../../pages/adf/dataTableComponentPage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { ConfigEditorPage } from '../../pages/adf/configEditorPage';
|
||||
|
Reference in New Issue
Block a user