[ACA-3596] Fix e2e due to process header properties changes (#5873)

* [ACA-3596] Fix e2e due to process header properties changes

* Change pages structure

* Move the build demoshell as last step and exclude for PR

* move more pages

* change testing pkg

* better JSON import

* update script

* move CLOUD in the right place

* some logs and not used methods

* retrycout

Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com>
Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
arditdomi
2020-07-16 22:22:22 +01:00
committed by GitHub
co-authored by maurizio vitale Eugenio Romano Eugenio Romano
parent 33965d0a41
commit b9dc285d2b
234 changed files with 571 additions and 584 deletions
@@ -16,7 +16,7 @@
*/
import { AboutPage, ApiService, LoginPage, UsersActions } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
describe('About Process Services', () => {
+2 -2
View File
@@ -17,8 +17,8 @@
import { browser } from 'protractor';
import { ApiService, ApplicationsUtil, LoginPage, UsersActions } from '@alfresco/adf-testing';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ModelsActions } from '../actions/APS/models.actions';
import CONSTANTS = require('../util/constants');
@@ -28,9 +28,9 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { TasksPage } from './pages/tasks.page';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import CONSTANTS = require('../util/constants');
describe('Attach File - Content service', () => {
@@ -24,10 +24,10 @@ import {
ViewerPage,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { TasksPage } from './pages/tasks.page';
import { FileModel } from '../models/ACS/file.model';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import CONSTANTS = require('../util/constants');
describe('Start Task - Task App', () => {
+2 -2
View File
@@ -26,9 +26,9 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { TasksPage } from './pages/tasks.page';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import CONSTANTS = require('../util/constants');
describe('Attach Folder', () => {
@@ -17,10 +17,10 @@
import { ApiService, ApplicationsUtil, FormFields, LoginPage, UsersActions } from '@alfresco/adf-testing';
import { browser, by } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { AttachFormPage } from '../pages/adf/process-services/attach-form.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { AttachFormPage } from './pages/attach-form.page';
import { TasksPage } from './pages/tasks.page';
import { TaskDetailsPage } from './pages/task-details.page';
import { TaskRepresentation } from '@alfresco/js-api';
import CONSTANTS = require('../util/constants');
@@ -16,10 +16,10 @@
*/
import { ApiService, LoginPage, UsersActions } from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { ChecklistDialog } from '../pages/adf/process-services/dialog/create-checklist-dialog.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { ChecklistDialog } from './pages/dialog/create-checklist-dialog.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { browser } from 'protractor';
import * as fs from 'fs';
import * as path from 'path';
@@ -17,9 +17,9 @@
import { browser } from 'protractor';
import { ApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions } from '@alfresco/adf-testing';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { CommentsPage } from '../pages/adf/comments.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { CommentsPage } from '../core/pages/comments.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
describe('Comment component for Processes', () => {
@@ -18,9 +18,9 @@
import { browser } from 'protractor';
import { ApiService, ApplicationsUtil, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { CommentsPage } from '../pages/adf/comments.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import { CommentsPage } from '../core/pages/comments.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { TaskRepresentation } from '@alfresco/js-api';
import CONSTANTS = require('../util/constants');
@@ -18,9 +18,9 @@
import { browser } from 'protractor';
import { ApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { FiltersPage } from '../pages/adf/process-services/filters.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { FiltersPage } from './pages/filters.page';
describe('Sorting for process filters', () => {
@@ -18,10 +18,10 @@
import { browser } from 'protractor';
import { ApiService, LoginPage, UsersActions } from '@alfresco/adf-testing';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { AppSettingsTogglesPage } from '../pages/adf/process-services/dialog/app-settings-toggles.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { AppSettingsTogglesPage } from './pages/dialog/app-settings-toggles.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
describe('New Process Filters', () => {
@@ -27,8 +27,8 @@ import {
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { AppsRuntimeActions } from '../actions/APS/apps-runtime.actions';
import { TaskListDemoPage } from '../pages/adf/demo-shell/process-services/task-list-demo.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TaskListDemoPage } from './pages/task-list-demo.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { TaskRepresentation } from '@alfresco/js-api';
import moment = require('moment');
@@ -24,9 +24,9 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { browser } from 'protractor';
describe('Dynamic Table', () => {
@@ -17,11 +17,11 @@
import { browser } from 'protractor';
import { ApiService, ApplicationsUtil, LoginPage, StartProcessPage, UsersActions } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { ProcessListPage } from './pages/process-list.page';
describe('Empty Process List Test', () => {
+1 -1
View File
@@ -16,7 +16,7 @@
*/
import { ApiService, FormPage, LoginPage, UsersActions, Widget } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { browser } from 'protractor';
describe('Form Component', () => {
@@ -23,12 +23,12 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { TaskDetailsPage } from './pages/task-details.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { browser } from 'protractor';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
describe('Form widgets - People ', () => {
@@ -24,8 +24,8 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { browser } from 'protractor';
import CONSTANTS = require('../util/constants');
import FormDefinitionModel = require('../models/APS/FormDefinitionModel');
+4 -4
View File
@@ -28,10 +28,10 @@ import {
} from '@alfresco/adf-testing';
import { AppDefinitionRepresentation } from '@alfresco/js-api';
import { browser, by, element } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { infoDrawerConfiguration } from './config/task.config';
import CONSTANTS = require('../util/constants');
import moment = require('moment');
@@ -0,0 +1,54 @@
/*!
* @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 { element, by, protractor } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class AnalyticsPage {
toolbarTitleInput = element(by.css('input[data-automation-id="reportName"]'));
toolbarTitleContainer = element(by.css('adf-toolbar-title'));
toolbarTitle = element(by.xpath('//mat-toolbar/adf-toolbar-title/div/h4'));
reportMessage = element(by.css('div[class="ng-star-inserted"] span'));
async getReport(title: string): Promise<void> {
const reportTitle = element(by.css(`mat-icon[data-automation-id="${title}_filter"]`));
await BrowserActions.click(reportTitle);
}
async changeReportTitle(title): Promise<void> {
await BrowserActions.click(this.toolbarTitleContainer);
await BrowserActions.click(this.toolbarTitleInput);
await this.clearReportTitle();
await this.toolbarTitleInput.sendKeys(title);
await this.toolbarTitleInput.sendKeys(protractor.Key.ENTER);
}
async clearReportTitle(): Promise<void> {
await BrowserActions.clearSendKeys(this.toolbarTitleInput, '');
await BrowserVisibility.waitUntilElementIsVisible(this.toolbarTitleInput);
}
async getReportTitle(): Promise<string> {
return BrowserActions.getText(this.toolbarTitle);
}
async checkNoReportMessage(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.reportMessage);
}
}
@@ -0,0 +1,71 @@
/*!
* @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 { element, by } from 'protractor';
import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-testing';
export class AttachFormPage {
noFormMessage = element(by.css('.adf-empty-content__title'));
attachFormButton = element(by.id('adf-attach-form-attach-button'));
completeButton = element(by.id('adf-attach-form-complete-button'));
formDropdown = element(by.id('form_id'));
cancelButton = element(by.id('adf-attach-form-cancel-button'));
defaultTitle = element(by.css('.mat-card-title'));
attachFormDropdown = new DropdownPage(element(by.css('.adf-attach-form-row')));
async checkNoFormMessageIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.noFormMessage);
}
async checkAttachFormButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.attachFormButton);
}
async checkCompleteButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.completeButton);
}
async clickAttachFormButton(): Promise<void> {
await BrowserActions.click(this.attachFormButton);
}
async checkDefaultFormTitleIsDisplayed(formTitle: string): Promise<void> {
const result = await BrowserActions.getText(this.defaultTitle);
await expect(result).toEqual(formTitle);
}
async checkFormDropdownIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.formDropdown);
}
async checkCancelButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.cancelButton);
}
async selectAttachFormOption(option: string): Promise<void> {
await this.attachFormDropdown.selectDropdownOption(option);
}
async clickCancelButton(): Promise<void> {
await BrowserActions.click(this.cancelButton);
}
async checkAttachFormButtonIsDisabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('button[id="adf-attach-form-attach-button"][disabled]')));
}
}
@@ -0,0 +1,91 @@
/*!
* @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 { element, by, protractor, browser } from 'protractor';
import * as path from 'path';
import * as remote from 'selenium-webdriver/remote';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class AttachmentListPage {
attachFileButton = element(by.css("input[type='file']"));
buttonMenu = element(by.css("button[data-automation-id='action_menu_0']"));
viewButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.VIEW_CONTENT']"));
removeButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.REMOVE_CONTENT']"));
downloadButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.DOWNLOAD_CONTENT']"));
noContentContainer = element(by.css("div[class*='adf-no-content-container']"));
async checkEmptyAttachmentList(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.noContentContainer);
}
async clickAttachFileButton(fileLocation: string): Promise<void> {
browser.setFileDetector(new remote.FileDetector());
await BrowserVisibility.waitUntilElementIsPresent(this.attachFileButton);
await this.attachFileButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
}
async checkFileIsAttached(name: string): Promise<void> {
const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
}
async checkAttachFileButtonIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.attachFileButton);
}
async viewFile(name: string): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
await BrowserActions.click(this.buttonMenu);
await browser.sleep(500);
await BrowserActions.click(this.viewButton);
await browser.sleep(500);
}
async removeFile(name: string): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
await BrowserActions.click(this.buttonMenu);
await browser.sleep(500);
await BrowserActions.click(this.removeButton);
await browser.sleep(500);
}
async downloadFile(name: string): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
await BrowserActions.click(this.buttonMenu);
await browser.sleep(500);
await BrowserActions.click(this.downloadButton);
}
async doubleClickFile(name: string): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
await BrowserActions.click(fileAttached);
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
}
async checkFileIsRemoved(name: string): Promise<void> {
const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
await BrowserVisibility.waitUntilElementIsNotVisible(fileAttached);
}
}
@@ -0,0 +1,45 @@
/*!
* @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 { TogglePage } from '@alfresco/adf-testing';
import { element, by } from 'protractor';
export class AppSettingsTogglesPage {
togglePage = new TogglePage();
showDetailsHeaderToggle = element(by.id('adf-show-header'));
showTaskFilterIconsToggle = element(by.id('adf-show-task-filter-icon'));
showProcessFilterIconsToggle = element(by.id('adf-show-process-filter-icon'));
async enableShowHeader(): Promise<void> {
await this.togglePage.enableToggle(this.showDetailsHeaderToggle);
}
async disableShowHeader(): Promise<void> {
await this.togglePage.disableToggle(this.showDetailsHeaderToggle);
}
async enableTaskFiltersIcon(): Promise<void> {
await this.togglePage.enableToggle(this.showTaskFilterIconsToggle);
}
async enableProcessFiltersIcon(): Promise<void> {
await this.togglePage.enableToggle(this.showProcessFilterIconsToggle);
}
}
@@ -0,0 +1,59 @@
/*!
* @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 { element, by } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class ChecklistDialog {
nameField = element(by.css('input[data-automation-id="checklist-name"]'));
addChecklistButton = element(by.css('button[id="add-check"] span'));
closeButton = element(by.css('button[id="close-check-dialog"] span'));
dialogTitle = element(by.id('add-checklist-title'));
async addName(name: string): Promise<void> {
await BrowserActions.clearSendKeys(this.nameField, name);
}
async clickCreateChecklistButton(): Promise<void> {
await BrowserActions.click(this.addChecklistButton);
}
async clickCancelButton(): Promise<void> {
await BrowserActions.click(this.closeButton);
}
getDialogTitle(): Promise<string> {
return BrowserActions.getText(this.dialogTitle);
}
async getNameFieldPlaceholder(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.nameField);
return this.nameField.getAttribute('placeholder');
}
async checkCancelButtonIsEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.closeButton);
await BrowserVisibility.waitUntilElementIsClickable(this.closeButton);
}
async checkAddChecklistButtonIsEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.addChecklistButton);
await BrowserVisibility.waitUntilElementIsClickable(this.addChecklistButton);
}
}
@@ -0,0 +1,94 @@
/*!
* @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 { element, by, Key, ElementFinder } from 'protractor';
import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-testing';
export class StartTaskDialogPage {
name = element(by.css('input[id="name_id"]'));
dueDate = element(by.css('input[id="date_id"]'));
description = element(by.css('textarea[id="description_id"]'));
assignee = element(by.css('div#people-widget-content input'));
startButton = element(by.css('button[id="button-start"]'));
startButtonEnabled = element(by.css('button[id="button-start"]:not(disabled)'));
cancelButton = element(by.css('button[id="button-cancel"]'));
selectFormDropdown = new DropdownPage(element(by.css('mat-select[id="form_id"]')));
selectAssigneeDropdown = new DropdownPage();
async addName(userName: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.name);
await this.name.clear();
await this.name.sendKeys(userName);
}
async addDescription(userDescription: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.description);
await this.description.sendKeys(userDescription);
}
async addDueDate(date: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.dueDate);
await this.dueDate.sendKeys(date);
}
async addAssignee(name: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.assignee);
await this.assignee.sendKeys(name);
await this.selectAssigneeFromList(name);
}
async selectAssigneeFromList(name: string): Promise<void> {
await this.selectAssigneeDropdown.selectOption(name);
}
async getAssignee(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.assignee);
return this.assignee.getAttribute('placeholder');
}
async selectForm(form): Promise<void> {
await this.selectFormDropdown.selectDropdownOption(form);
}
async clickStartButton(): Promise<void> {
return BrowserActions.click(this.startButton);
}
async checkStartButtonIsEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.startButtonEnabled);
}
async checkStartButtonIsDisabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('button[id="button-start"]:disabled')));
}
async clickCancelButton(): Promise<void> {
await BrowserActions.click(this.cancelButton);
}
async blur(locator: ElementFinder): Promise<void> {
await BrowserActions.click(locator);
await locator.sendKeys(Key.TAB);
}
async checkValidationErrorIsDisplayed(error: string, elementRef = 'mat-error'): Promise<void> {
const errorElement = element(by.cssContainingText(elementRef, error));
await BrowserVisibility.waitUntilElementIsVisible(errorElement);
}
}
@@ -0,0 +1,47 @@
/*!
* @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 { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
import { by, element } from 'protractor';
export class FiltersPage {
activeFilter = element(by.css('.adf-active'));
dataTable: DataTableComponentPage = new DataTableComponentPage();
async getActiveFilter(): Promise<string> {
return BrowserActions.getText(this.activeFilter);
}
async goToFilter(filterName): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.clickExecuteScript(`[data-automation-id="${filterName}_filter"]`);
}
async sortByName(sortOrder: string): Promise<void> {
await this.dataTable.sortByColumn(sortOrder, 'name');
}
async getAllRowsNameColumn(): Promise<string[]> {
return this.dataTable.getAllRowsColumnValues('Name');
}
async checkFilterIsHighlighted(filterName: string): Promise<void> {
const highlightedFilter = element(by.css(`.adf-active [data-automation-id='${filterName}_filter']`));
await BrowserVisibility.waitUntilElementIsVisible(highlightedFilter);
}
}
@@ -0,0 +1,45 @@
/*!
* @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 { BrowserActions, BrowserVisibility, ConfigEditorPage } from '@alfresco/adf-testing';
import { by, element } from 'protractor';
export class FormDemoPage {
formCloudEditor = element.all(by.css('.mat-tab-list .mat-tab-label')).get(1);
formCloudRender = element.all(by.css('.mat-tab-list .mat-tab-label')).get(0);
configEditorPage = new ConfigEditorPage();
async goToEditor(): Promise<void> {
await BrowserActions.click(this.formCloudEditor);
}
async goToRenderedForm(): Promise<void> {
await BrowserActions.click(this.formCloudRender);
}
async setConfigToEditor(text: string): Promise<void> {
const configEditor = element(by.id('adf-form-config-editor'));
const form = element(by.css('adf-form'));
await this.goToEditor();
await BrowserVisibility.waitUntilElementIsVisible(configEditor);
await this.configEditorPage.enterBulkConfiguration(text);
await this.goToRenderedForm();
await BrowserVisibility.waitUntilElementIsVisible(form);
}
}
@@ -0,0 +1,150 @@
/*!
* @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, BrowserActions } from '@alfresco/adf-testing';
export class ProcessDetailsPage {
processTitle = element(by.css('.mat-card-title'));
processDetailsMessage = element(by.css('adf-process-instance-details div'));
processStatusField = element(by.css('[data-automation-id="card-textitem-value-status"]'));
processEndDateField = element(by.css('span[data-automation-id="card-dateitem-ended"]'));
processCategoryField = element(by.css('[data-automation-id="card-textitem-value-category"]'));
processBusinessKeyField = element(by.css('[data-automation-id="card-textitem-value-businessKey"]'));
processCreatedByField = element(by.css('[data-automation-id="card-textitem-value-createdBy"]'));
processCreatedField = element(by.css('span[data-automation-id="card-dateitem-created"]'));
processIdField = element(by.css('[data-automation-id="card-textitem-value-id"]'));
processDescription = element(by.css('[data-automation-id="card-textitem-value-description"]'));
showDiagramButtonDisabled = element(by.css('button[id="show-diagram-button"][disabled]'));
propertiesList = element(by.css('.adf-property-list'));
showDiagramButton = element(by.id('show-diagram-button'));
diagramCanvas = element(by.css('svg[xmlns="http://www.w3.org/2000/svg"]'));
backButton = element(by.css('app-show-diagram button.mat-mini-fab.mat-accent'));
commentInput = element(by.id('comment-input'));
auditLogButton = element(by.css('button[adf-process-audit]'));
auditLogEmptyListMessage = element(by.css('.app-empty-list-header'));
cancelProcessButton = element(by.css('div[data-automation-id="header-status"] > button'));
activeTask = element(by.css('div[data-automation-id="active-tasks"]'));
completedTask = element(by.css('div[data-automation-id="completed-tasks"]'));
taskTitle = element(by.css('.adf-activiti-task-details__header'));
async checkDetailsAreDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.processStatusField);
await BrowserVisibility.waitUntilElementIsVisible(this.processEndDateField);
await BrowserVisibility.waitUntilElementIsVisible(this.processCategoryField);
await BrowserVisibility.waitUntilElementIsVisible(this.processBusinessKeyField);
await BrowserVisibility.waitUntilElementIsVisible(this.processCreatedByField);
await BrowserVisibility.waitUntilElementIsVisible(this.processCreatedField);
await BrowserVisibility.waitUntilElementIsVisible(this.processIdField);
await BrowserVisibility.waitUntilElementIsVisible(this.processDescription);
await BrowserVisibility.waitUntilElementIsVisible(this.showDiagramButton);
await BrowserVisibility.waitUntilElementIsVisible(this.activeTask);
await BrowserVisibility.waitUntilElementIsVisible(this.cancelProcessButton);
await BrowserVisibility.waitUntilElementIsVisible(this.commentInput);
await BrowserVisibility.waitUntilElementIsVisible(this.auditLogButton);
}
checkProcessTitleIsDisplayed(): Promise<string> {
return BrowserActions.getText(this.processTitle);
}
checkProcessDetailsMessage(): Promise<string> {
return BrowserActions.getText(this.processDetailsMessage);
}
getProcessStatus(): Promise<string> {
return BrowserActions.getInputValue(this.processStatusField);
}
getEndDate(): Promise<string> {
return BrowserActions.getText(this.processEndDateField);
}
getProcessCategory(): Promise<string> {
return BrowserActions.getInputValue(this.processCategoryField);
}
getBusinessKey(): Promise<string> {
return BrowserActions.getInputValue(this.processBusinessKeyField);
}
getCreatedBy(): Promise<string> {
return BrowserActions.getInputValue(this.processCreatedByField);
}
getCreated(): Promise<string> {
return BrowserActions.getText(this.processCreatedField);
}
getId(): Promise<string> {
return BrowserActions.getInputValue(this.processIdField);
}
getProcessDescription(): Promise<string> {
return BrowserActions.getInputValue(this.processDescription);
}
async clickShowDiagram(): Promise<void> {
await BrowserActions.click(this.showDiagramButton);
await BrowserVisibility.waitUntilElementIsVisible(this.diagramCanvas);
await BrowserActions.click(this.backButton);
}
async checkShowDiagramIsDisabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.showDiagramButtonDisabled);
}
async addComment(comment: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.commentInput);
await this.commentInput.sendKeys(comment);
await this.commentInput.sendKeys(protractor.Key.ENTER);
}
async checkCommentIsDisplayed(comment: string): Promise<void> {
const commentInserted = element(by.cssContainingText('div[id="comment-message"]', comment));
await BrowserVisibility.waitUntilElementIsVisible(commentInserted);
}
async clickAuditLogButton(): Promise<void> {
await BrowserActions.click(this.auditLogButton);
}
getEmptyMessage(): Promise<string> {
return BrowserActions.getText(this.auditLogEmptyListMessage);
}
async clickCancelProcessButton(): Promise<void> {
await BrowserActions.click(this.cancelProcessButton);
}
async clickOnActiveTask(): Promise<void> {
await BrowserActions.click(this.activeTask);
}
async clickOnCompletedTask(): Promise<void> {
await BrowserActions.click(this.completedTask);
}
async checkActiveTaskTitleIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.taskTitle);
}
async checkProcessDetailsCard(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.propertiesList);
}
}
@@ -0,0 +1,142 @@
/*!
* @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 { BrowserActions, BrowserVisibility, DataTableComponentPage, StartProcessPage } from '@alfresco/adf-testing';
import { by, element } from 'protractor';
export class ProcessFiltersPage {
dataTable = new DataTableComponentPage();
runningFilter = element(by.css('button[data-automation-id="Running_filter"]'));
completedFilter = element(by.css('button[data-automation-id="Completed_filter"]'));
allFilter = element(by.css('button[data-automation-id="All_filter"]'));
createProcessButton = element(by.css('.app-processes-menu button[data-automation-id="create-button"] > span'));
newProcessButton = element(by.css('div > button[data-automation-id="btn-start-process"]'));
processesPage = element(by.id('app-processes-menu'));
accordionMenu = element(by.css('.app-processes-menu mat-accordion'));
buttonWindow = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
noContentMessage = element.all(by.css('.adf-empty-content__title')).first();
rows = by.css('adf-process-instance-list .adf-datatable-body adf-datatable-row[class*="adf-datatable-row"]');
tableBody = element.all(by.css('adf-datatable .adf-datatable-body')).first();
nameColumn = by.css('div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"] div[title="Name"] span');
processIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
async startProcess(): Promise<StartProcessPage> {
await this.clickCreateProcessButton();
await this.clickNewProcessDropdown();
return new StartProcessPage();
}
async clickRunningFilterButton(): Promise<void> {
await BrowserActions.click(this.runningFilter);
}
async clickCompletedFilterButton(): Promise<void> {
await BrowserActions.click(this.completedFilter);
await expect(await this.completedFilter.isEnabled()).toBe(true);
}
async clickAllFilterButton(): Promise<void> {
await BrowserActions.click(this.allFilter);
await expect(await this.allFilter.isEnabled()).toBe(true);
}
async clickCreateProcessButton(): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserVisibility.waitUntilElementIsVisible(this.accordionMenu);
await BrowserVisibility.waitUntilElementIsVisible(this.processesPage);
await BrowserActions.click(this.createProcessButton);
}
async clickNewProcessDropdown(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.buttonWindow);
await BrowserActions.click(this.newProcessButton);
}
async checkNoContentMessage(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.noContentMessage);
}
async selectFromProcessList(title: string): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
const processName = element.all(by.css(`div[data-automation-id="text_${title}"]`)).first();
await BrowserActions.click(processName);
}
async checkFilterIsHighlighted(filterName: string): Promise<void> {
const processNameHighlighted = element(by.css(`adf-process-instance-filters .adf-active button[data-automation-id='${filterName}_filter']`));
await BrowserVisibility.waitUntilElementIsVisible(processNameHighlighted);
}
async numberOfProcessRows(): Promise<number> {
return element.all(this.rows).count();
}
async waitForTableBody(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.tableBody);
}
/**
* Sort the list by name column.
*
* @param sortOrder : 'ASC' to sort the list ascendant and 'DESC' for descendant
*/
async sortByName(sortOrder: string) {
await this.dataTable.sortByColumn(sortOrder, 'name');
}
async getAllRowsNameColumn() {
return this.dataTable.getAllRowsColumnValues('Name');
}
async checkFilterIsDisplayed(name: string): Promise<void> {
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
await BrowserVisibility.waitUntilElementIsVisible(filterName);
}
async checkFilterHasNoIcon(name: string): Promise<void> {
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
await BrowserVisibility.waitUntilElementIsVisible(filterName);
await BrowserVisibility.waitUntilElementIsNotVisible(filterName.element(this.processIcon));
}
async getFilterIcon(name: string): Promise<string> {
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
await BrowserVisibility.waitUntilElementIsVisible(filterName);
const icon = filterName.element(this.processIcon);
return BrowserActions.getText(icon);
}
async checkFilterIsNotDisplayed(name: string): Promise<void> {
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
await BrowserVisibility.waitUntilElementIsNotVisible(filterName);
}
async checkProcessesSortedByNameAsc(): Promise<void> {
const list = await this.getAllRowsNameColumn();
for (let i = 1; i < list.length; i++) {
await expect(JSON.stringify(list[i]) > JSON.stringify(list[i - 1])).toEqual(true);
}
}
async checkProcessesSortedByNameDesc(): Promise<void> {
const list = await this.getAllRowsNameColumn();
for (let i = 1; i < list.length; i++) {
await expect(JSON.stringify(list[i]) < JSON.stringify(list[i - 1])).toEqual(true);
}
}
}
@@ -0,0 +1,97 @@
/*!
* @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 { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
import { by, element, protractor } from 'protractor';
export class ProcessListDemoPage {
appIdInput = element(by.css('input[data-automation-id="app-id"]'));
resetButton = element(by.cssContainingText('button span', 'Reset'));
emptyProcessContent = element(by.css('.adf-empty-content'));
processDefinitionInput = element(by.css('input[data-automation-id="process-definition-id"]'));
processInstanceInput = element(by.css('input[data-automation-id="process-instance-id"]'));
stateDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="state"')));
sortDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="sort"')));
dataTable = new DataTableComponentPage();
getDisplayedProcessesNames(): Promise<any> {
return this.dataTable.getAllRowsColumnValues('Name');
}
async selectSorting(sortingOption: string): Promise<void> {
await this.sortDropdown.selectDropdownOption(sortingOption);
}
async selectStateFilter(stateOption: string): Promise<void> {
await this.stateDropdown.selectDropdownOption(stateOption);
}
async addAppId(appId: string): Promise<void> {
await BrowserActions.click(this.appIdInput);
await this.appIdInput.sendKeys(protractor.Key.ENTER);
await this.appIdInput.clear();
await this.appIdInput.sendKeys(appId);
}
async clickResetButton(): Promise<void> {
await BrowserActions.click(this.resetButton);
}
async checkErrorMessageIsDisplayed(error: string): Promise<void> {
const errorMessage = element(by.cssContainingText('mat-error', error));
await BrowserVisibility.waitUntilElementIsVisible(errorMessage);
}
async checkNoProcessFoundIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.emptyProcessContent);
}
async checkProcessIsNotDisplayed(processName: string): Promise<void> {
await this.dataTable.checkContentIsNotDisplayed('Name', processName);
}
async checkProcessIsDisplayed(processName: string): Promise<void> {
await this.dataTable.checkContentIsDisplayed('Name', processName);
}
async checkAppIdFieldIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.appIdInput);
}
async checkProcessInstanceIdFieldIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.processInstanceInput);
}
async checkStateDropdownIsDisplayed(): Promise<void> {
await this.stateDropdown.checkDropdownIsVisible();
}
async checkSortDropdownIsDisplayed(): Promise<void> {
await this.sortDropdown.checkDropdownIsVisible();
}
async addProcessDefinitionId(procDefinitionId: string): Promise<void> {
await BrowserActions.clearSendKeys(this.processDefinitionInput, procDefinitionId);
}
async addProcessInstanceId(procInstanceId: string): Promise<void> {
await BrowserActions.clearSendKeys(this.processInstanceInput, procInstanceId);
}
}
@@ -0,0 +1,43 @@
/*!
* @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, BrowserActions } from '@alfresco/adf-testing';
import { element, by } from 'protractor';
export class ProcessListPage {
processListTitle = element(by.css('.adf-empty-content__title'));
processInstanceList = element(by.css('adf-process-instance-list'));
getDisplayedProcessListTitle(): Promise<string> {
return BrowserActions.getText(this.processListTitle);
}
titleNotPresent(): Promise<string> {
return BrowserVisibility.waitUntilElementIsNotPresent(this.processListTitle);
}
async isProcessListDisplayed(): Promise<boolean> {
try {
await BrowserVisibility.waitUntilElementIsVisible(this.processInstanceList);
return true;
} catch (error) {
return false;
}
}
}
@@ -0,0 +1,48 @@
/*!
* @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, BrowserActions } from '@alfresco/adf-testing';
import { element, by, browser } from 'protractor';
export class ProcessServiceTabBarPage {
tasksButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Tasks')).first();
processButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Process')).first();
reportsButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Reports')).first();
settingsButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Settings')).first();
reportsButtonSelected = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div[aria-selected="true"]', 'Reports')).first();
async clickTasksButton(): Promise<void> {
await BrowserActions.click(this.tasksButton);
await browser.sleep(500);
}
async clickProcessButton(): Promise<void> {
await BrowserActions.click(this.processButton);
await browser.sleep(500);
}
async clickSettingsButton(): Promise<void> {
await BrowserActions.click(this.settingsButton);
await browser.sleep(500);
}
async clickReportsButton(): Promise<void> {
await BrowserActions.click(this.reportsButton);
await BrowserVisibility.waitUntilElementIsVisible(this.reportsButtonSelected);
}
}
@@ -0,0 +1,74 @@
/*!
* @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 { ProcessServiceTabBarPage } from './process-service-tab-bar.page';
import { element, by } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class ProcessServicesPage {
apsAppsContainer = element(by.css('.adf-app-listgrid'));
taskApp = element(by.css('mat-card[title="Task App"]'));
iconTypeLocator = by.css('mat-icon[class*="card-logo-icon"]');
descriptionLocator = by.css('mat-card-subtitle[class*="subtitle"]');
async checkApsContainer(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.apsAppsContainer);
}
async goToApp(applicationName: string): Promise<ProcessServiceTabBarPage> {
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
await BrowserActions.click(app);
return new ProcessServiceTabBarPage();
}
async goToTaskApp(): Promise<ProcessServiceTabBarPage> {
await BrowserActions.click(this.taskApp);
return new ProcessServiceTabBarPage();
}
async getAppIconType(applicationName: string): Promise<string> {
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
await BrowserVisibility.waitUntilElementIsVisible(app);
const iconType = app.element(this.iconTypeLocator);
return BrowserActions.getText(iconType);
}
async getBackgroundColor(applicationName: string): Promise<string> {
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
await BrowserVisibility.waitUntilElementIsVisible(app);
return app.getCssValue('background-color');
}
async getDescription(applicationName: string): Promise<string> {
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
await BrowserVisibility.waitUntilElementIsVisible(app);
const description = app.element(this.descriptionLocator);
return BrowserActions.getText(description);
}
async checkAppIsNotDisplayed(applicationName: string): Promise<void> {
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
await BrowserVisibility.waitUntilElementIsNotVisible(app);
}
async checkAppIsDisplayed(applicationName: string): Promise<void> {
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
await BrowserVisibility.waitUntilElementIsVisible(app);
}
}
@@ -0,0 +1,443 @@
/*!
* @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 { BrowserActions, BrowserVisibility, DropdownPage, TabsPage } from '@alfresco/adf-testing';
import { browser, by, element, Key } from 'protractor';
import { AppSettingsTogglesPage } from './dialog/app-settings-toggles.page';
export class TaskDetailsPage {
appSettingsTogglesClass = new AppSettingsTogglesPage();
formContent = element(by.css('adf-form'));
formNameField = element(by.css('[data-automation-id="card-textitem-value-formName"]'));
formNameButton = element(by.css('[data-automation-id="card-textitem-toggle-formName"]'));
assigneeField = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
assigneeButton = element(by.css('[data-automation-id="card-textitem-toggle-assignee"]'));
statusField = element(by.css('[data-automation-id="card-textitem-value-status"]'));
categoryField = element(by.css('[data-automation-id="card-textitem-value-category"] '));
parentNameField = element(by.css('span[data-automation-id*="parentName"] span'));
parentTaskIdField = element(by.css('[data-automation-id="card-textitem-value-parentTaskId"] '));
durationField = element(by.css('[data-automation-id="card-textitem-value-duration"] '));
endDateField = element.all(by.css('span[data-automation-id*="endDate"] span')).first();
createdField = element(by.css('span[data-automation-id="card-dateitem-created"] span'));
idField = element.all(by.css('[data-automation-id="card-textitem-value-id"]')).first();
descriptionField = element(by.css('[data-automation-id="card-textitem-value-description"]'));
dueDateField = element.all(by.css('span[data-automation-id*="dueDate"] span')).first();
activitiesTitle = element(by.css('div[class*="adf-info-drawer-layout-header-title"] div'));
commentField = element(by.id('comment-input'));
addCommentButton = element(by.css('[data-automation-id="comments-input-add"]'));
involvePeopleButton = element(by.css('div[class*="add-people"]'));
addPeopleField = element(by.css('input[data-automation-id="adf-people-search-input"]'));
addInvolvedUserButton = element(by.css('button[id="add-people"] span'));
emailInvolvedUser = by.xpath('following-sibling::div[@class="adf-people-email"]');
taskDetailsInfoDrawer = element(by.tagName('adf-info-drawer'));
taskDetailsSection = element(by.css('div[data-automation-id="app-tasks-details"]'));
taskDetailsEmptySection = element(by.css('div[data-automation-id="adf-tasks-details--empty"]'));
completeTask = element(by.css('button[id="adf-no-form-complete-button"]'));
completeFormTask = element(by.css('button[id="adf-form-complete"]'));
taskDetailsTitle = element(by.css('.adf-activiti-task-details__header span'));
auditLogButton = element(by.css('button[adf-task-audit]'));
noPeopleInvolved = element(by.id('no-people-label'));
cancelInvolvePeopleButton = element(by.id('close-people-search'));
involvePeopleHeader = element(by.css('.adf-search-text-header'));
removeInvolvedPeople = element(by.css('button[data-automation-id="Remove"]'));
peopleTitle = element(by.id('people-title'));
noFormMessage = element(by.css('span[id*="no-form-message"]'));
cancelAttachForm = element(by.id('adf-no-form-cancel-button'));
attachFormButton = element(by.id('adf-no-form-attach-form-button'));
disabledAttachFormButton = element(by.css('button[id="adf-no-form-attach-form-button"][disabled]'));
removeAttachForm = element(by.id('adf-attach-form-remove-button'));
attachFormName = element(by.css('.adf-form-title'));
emptyTaskDetails = element(by.css('adf-task-details > div > div'));
priority = element(by.css('[data-automation-id*="card-textitem-value-priority"]'));
editableAssignee = element(by.css('[data-automation-id="card-textitem-value-assignee"][class*="clickable"]'));
claimElement = element(by.css('[data-automation-id="header-claim-button"]'));
releaseElement = element(by.css('[data-automation-id="header-unclaim-button"]'));
saveFormButton = element(by.css('button[id="adf-form-save"]'));
attachFormDropdown = new DropdownPage(element(by.css('.adf-attach-form-row')));
async checkEditableAssigneeIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.editableAssignee);
}
async checkEditableFormIsNotDisplayed(): Promise<void> {
const editableForm = element(by.css('[data-automation-id="card-textitem-value-formName"][class*="clickable"]'));
await BrowserVisibility.waitUntilElementIsNotVisible(editableForm);
}
async checkDueDatePickerButtonIsNotDisplayed(): Promise<void> {
const dueDatePickerButton = element(by.css('mat-datetimepicker-toggle[data-automation-id="datepickertoggle-dueDate"]'));
await BrowserVisibility.waitUntilElementIsNotVisible(dueDatePickerButton);
}
getTaskDetailsTitle(): Promise<string> {
return BrowserActions.getText(this.taskDetailsTitle);
}
async checkSelectedForm(formName): Promise<void> {
await this.attachFormDropdown.checkOptionIsSelected(formName);
}
async checkAttachFormButtonIsDisabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.disabledAttachFormButton);
}
async checkAttachFormButtonIsEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsClickable(this.attachFormButton);
}
async checkAttachFormDropdownIsDisplayed(): Promise<void> {
await this.attachFormDropdown.checkDropdownIsVisible();
}
async selectAttachFormOption(option): Promise<void> {
await this.attachFormDropdown.selectDropdownOption(option);
}
async checkCancelAttachFormIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.cancelAttachForm);
}
async noFormIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.formContent);
}
async clickCancelAttachForm(): Promise<void> {
await BrowserActions.click(this.cancelAttachForm);
}
async checkRemoveAttachFormIsDisplayed() {
await BrowserVisibility.waitUntilElementIsVisible(this.removeAttachForm);
}
async clickRemoveAttachForm(): Promise<void> {
await BrowserActions.click(this.removeAttachForm);
}
async checkAttachFormButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.attachFormButton);
}
async checkAttachFormButtonIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.attachFormButton);
}
async clickAttachFormButton(): Promise<void> {
return BrowserActions.click(this.attachFormButton);
}
async checkFormIsAttached(formName): Promise<void> {
const attachedFormName = await BrowserActions.getInputValue(this.formNameField);
await expect(attachedFormName).toEqual(formName);
}
getFormName(): Promise<string> {
return BrowserActions.getInputValue(this.formNameField);
}
async clickForm(): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.click(this.formNameButton);
}
async checkStandaloneNoFormMessageIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.noFormMessage);
}
async getNoFormMessage(): Promise<string> {
return BrowserActions.getText(this.noFormMessage);
}
getAssignee(): Promise<string> {
return BrowserActions.getInputValue(this.assigneeField);
}
isAssigneeClickable(): Promise<string> {
return BrowserVisibility.waitUntilElementIsVisible(this.editableAssignee);
}
getStatus(): Promise<string> {
return BrowserActions.getInputValue(this.statusField);
}
getCategory(): Promise<string> {
return BrowserActions.getInputValue(this.categoryField);
}
getParentName(): Promise<string> {
return BrowserActions.getText(this.parentNameField);
}
getParentTaskId(): Promise<string> {
return BrowserActions.getInputValue(this.parentTaskIdField);
}
getDuration(): Promise<string> {
return BrowserActions.getInputValue(this.durationField);
}
getEndDate(): Promise<string> {
return BrowserActions.getText(this.endDateField);
}
getCreated(): Promise<string> {
return BrowserActions.getText(this.createdField);
}
getId(): Promise<string> {
return BrowserActions.getInputValue(this.idField);
}
getDescription(): Promise<string> {
return BrowserActions.getInputValue(this.descriptionField);
}
async getDescriptionPlaceholder(): Promise<string> {
await BrowserVisibility.waitUntilElementIsPresent(this.descriptionField);
return this.descriptionField.getAttribute('placeholder');
}
getDueDate(): Promise<string> {
return BrowserActions.getText(this.dueDateField);
}
getPriority(): Promise<string> {
return BrowserActions.getInputValue(this.priority);
}
async updatePriority(priority?: string): Promise<void> {
await BrowserActions.click(this.priority);
await BrowserActions.clearWithBackSpace(this.priority);
await BrowserActions.clearSendKeys(element(by.css('input[data-automation-id="card-textitem-value-priority"]')), priority ? priority : ' ');
await this.priority.sendKeys(Key.TAB);
}
async updateDueDate(): Promise<void> {
await BrowserActions.click(this.dueDateField);
await BrowserActions.click(element.all(by.css('.mat-datetimepicker-calendar-body-cell')).first());
}
async updateDescription(description?: string): Promise<void> {
await BrowserActions.click(this.descriptionField);
await BrowserActions.clearWithBackSpace(this.descriptionField);
await BrowserActions.clearSendKeys(element(by.css('[data-automation-id="card-textitem-value-description"]')), description ? description : '');
await this.descriptionField.sendKeys(Key.TAB);
}
async updateAssignee(fullName: string): Promise<void> {
await BrowserActions.click(this.assigneeButton);
await BrowserActions.clearSendKeys(element(by.css('[id="userSearchText"]')), fullName);
await BrowserActions.click(element(by.cssContainingText('.adf-people-full-name', fullName)));
await BrowserActions.click(element(by.css('button[id="add-people"]')));
}
getTitle(): Promise<string> {
return BrowserActions.getText(this.activitiesTitle);
}
async selectActivityTab(): Promise<void> {
const tabsPage: TabsPage = new TabsPage;
await tabsPage.clickTabByTitle('Activity');
}
async selectDetailsTab(): Promise<void> {
const tabsPage: TabsPage = new TabsPage;
await tabsPage.clickTabByTitle('Details');
}
async addComment(comment: string): Promise<void> {
await BrowserActions.clearSendKeys(this.commentField, comment);
await BrowserActions.click(this.addCommentButton);
}
async checkCommentIsDisplayed(comment: string): Promise<void> {
const row = element(by.cssContainingText('div[id="comment-message"]', comment));
await BrowserVisibility.waitUntilElementIsVisible(row);
}
async checkIsEmptyCommentListDisplayed(): Promise<void> {
const emptyList = element(by.cssContainingText('div[id="comment-header"]', '(0)'));
await BrowserVisibility.waitUntilElementIsVisible(emptyList);
}
async clickInvolvePeopleButton(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.involvePeopleButton);
await BrowserVisibility.waitUntilElementIsClickable(this.involvePeopleButton);
await browser.actions().mouseMove(this.involvePeopleButton).perform();
await BrowserActions.click(this.involvePeopleButton);
}
async typeUser(user: string): Promise<void> {
await BrowserActions.clearSendKeys(this.addPeopleField, user);
}
async selectUserToInvolve(user): Promise<void> {
const row = this.getRowsUser(user);
await BrowserActions.click(row);
}
async checkUserIsSelected(user: string): Promise<void> {
const row = element(by.cssContainingText('div[class*="search-list-container"] div[class*="people-full-name"]', user));
await BrowserVisibility.waitUntilElementIsVisible(row);
}
async clickAddInvolvedUserButton(): Promise<void> {
await BrowserActions.click(this.addInvolvedUserButton);
}
getRowsUser(user: string) {
return element(by.cssContainingText('div[class*="people-full-name"]', user));
}
async removeInvolvedUser(user): Promise<void> {
const row = this.getRowsUser(user).element(by.xpath('ancestor::adf-datatable-row[contains(@class, "adf-datatable-row")]'));
await BrowserActions.click(row.element(by.css('button[data-automation-id="action_menu_0"]')));
await BrowserVisibility.waitUntilElementIsVisible(this.removeInvolvedPeople);
await BrowserActions.click(this.removeInvolvedPeople);
}
async getInvolvedUserEmail(user): Promise<string> {
const row = this.getRowsUser(user);
const email = row.element(this.emailInvolvedUser);
return BrowserActions.getText(email);
}
async clickAuditLogButton(): Promise<void> {
await BrowserActions.click(this.auditLogButton);
}
appSettingsToggles(): AppSettingsTogglesPage {
return this.appSettingsTogglesClass;
}
async taskInfoDrawerIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.taskDetailsInfoDrawer);
}
async taskInfoDrawerIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.taskDetailsInfoDrawer);
}
async checkNoPeopleIsInvolved(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.noPeopleInvolved);
}
async clickCancelInvolvePeopleButton(): Promise<void> {
await BrowserActions.click(this.cancelInvolvePeopleButton);
}
getInvolvePeopleHeader(): Promise<string> {
return BrowserActions.getText(this.involvePeopleHeader);
}
async getInvolvePeoplePlaceholder(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.addPeopleField);
return this.addPeopleField.getAttribute('placeholder');
}
async checkCancelButtonIsEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.cancelInvolvePeopleButton);
await BrowserVisibility.waitUntilElementIsClickable(this.cancelInvolvePeopleButton);
}
async checkAddPeopleButtonIsEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.addInvolvedUserButton);
await BrowserVisibility.waitUntilElementIsClickable(this.addInvolvedUserButton);
}
async noUserIsDisplayedInSearchInvolvePeople(user): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('div[class*="people-full-name"]', user)));
}
getInvolvedPeopleTitle(): Promise<string> {
return BrowserActions.getText(this.peopleTitle);
}
checkTaskDetailsEmpty(): Promise<string> {
return BrowserActions.getText(this.taskDetailsEmptySection);
}
async checkTaskDetailsDisplayed(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.taskDetailsSection);
await BrowserVisibility.waitUntilElementIsVisible(this.formNameField);
await BrowserVisibility.waitUntilElementIsVisible(this.assigneeField);
await BrowserVisibility.waitUntilElementIsVisible(this.statusField);
await BrowserVisibility.waitUntilElementIsVisible(this.categoryField);
await BrowserVisibility.waitUntilElementIsVisible(this.parentNameField);
await BrowserVisibility.waitUntilElementIsVisible(this.createdField);
await BrowserVisibility.waitUntilElementIsVisible(this.idField);
await BrowserVisibility.waitUntilElementIsVisible(this.descriptionField);
await BrowserVisibility.waitUntilElementIsVisible(this.dueDateField);
await BrowserVisibility.waitUntilElementIsVisible(this.priority);
await BrowserVisibility.waitUntilElementIsVisible(this.activitiesTitle);
return BrowserActions.getText(this.taskDetailsSection);
}
async clickCompleteTask(): Promise<void> {
await BrowserActions.click(this.completeTask);
}
async checkCompleteFormButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.completeFormTask);
}
async checkCompleteTaskButtonIsEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsClickable(this.completeTask);
}
async checkCompleteTaskButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.completeTask);
}
async clickCompleteFormTask(): Promise<void> {
await BrowserActions.clickScript(this.completeFormTask);
}
async getEmptyTaskDetailsMessage(): Promise<string> {
return BrowserActions.getText(this.emptyTaskDetails);
}
async isCompleteButtonWithFormEnabled(): Promise<boolean> {
return this.completeFormTask.isEnabled();
}
async checkClaimEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsPresent(this.claimElement);
}
async checkReleaseEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsPresent(this.releaseElement);
}
async claimTask(): Promise<void> {
await BrowserActions.click(this.claimElement);
}
async releaseTask(): Promise<void> {
await BrowserActions.click(this.releaseElement);
}
async saveTaskForm(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.saveFormButton);
await BrowserActions.click(this.saveFormButton);
}
}
@@ -0,0 +1,53 @@
/*!
* @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 { BrowserActions } from '@alfresco/adf-testing';
import { element, by } from 'protractor';
import { TaskFiltersPage } from './task-filters.page';
export class TaskFiltersDemoPage {
myTasks = element(by.css('button[data-automation-id="My Tasks_filter"]'));
queuedTask = element(by.css('button[data-automation-id="Queued Tasks_filter"]'));
completedTask = element(by.css('button[data-automation-id="Completed Tasks_filter"]'));
involvedTask = element(by.css('button[data-automation-id="Involved Tasks_filter"]'));
activeFilter = element(by.css('adf-task-filters .adf-active'));
myTasksFilter(): TaskFiltersPage {
return new TaskFiltersPage(this.myTasks);
}
queuedTasksFilter(): TaskFiltersPage {
return new TaskFiltersPage(this.queuedTask);
}
completedTasksFilter() {
return new TaskFiltersPage(this.completedTask);
}
involvedTasksFilter(): TaskFiltersPage {
return new TaskFiltersPage(this.involvedTask);
}
customTaskFilter(filterName: string): TaskFiltersPage {
return new TaskFiltersPage(element(by.css(`button[data-automation-id="${filterName}_filter"]`)));
}
async checkActiveFilterActive(): Promise<string> {
return BrowserActions.getText(this.activeFilter);
}
}
@@ -0,0 +1,53 @@
/*!
* @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, ElementFinder } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class TaskFiltersPage {
filter;
taskIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
constructor(filter: ElementFinder) {
this.filter = filter;
}
async checkTaskFilterIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.filter);
}
async getTaskFilterIcon(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.filter);
const icon = this.filter.element(this.taskIcon);
return BrowserActions.getText(icon);
}
async checkTaskFilterHasNoIcon(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.filter);
await BrowserVisibility.waitUntilElementIsNotVisible(this.filter.element(this.taskIcon));
}
async clickTaskFilter(): Promise<void> {
return BrowserActions.click(this.filter);
}
async checkTaskFilterNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.filter);
}
}
@@ -0,0 +1,153 @@
/*!
* @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 { BrowserActions, BrowserVisibility, DropdownPage, PaginationPage } from '@alfresco/adf-testing';
import { by, element } from 'protractor';
import { TasksListPage } from './tasks-list.page';
export class TaskListDemoPage {
taskListPage = new TasksListPage();
appId = element(by.css("input[data-automation-id='appId input']"));
itemsPerPage = element(by.css("input[data-automation-id='items per page']"));
itemsPerPageForm = element(by.css("mat-form-field[data-automation-id='items per page']"));
processDefinitionId = element(by.css("input[data-automation-id='process definition id']"));
processInstanceId = element(by.css("input[data-automation-id='process instance id']"));
page = element(by.css("input[data-automation-id='page']"));
pageForm = element(by.css("mat-form-field[data-automation-id='page']"));
taskName = element(by.css("input[data-automation-id='task name']"));
resetButton = element(by.css('.app-reset-button button'));
dueBefore = element(by.css("input[data-automation-id='due before']"));
dueAfter = element(by.css("input[data-automation-id='due after']"));
taskId = element(by.css("input[data-automation-id='task id']"));
stateDropDownArrow = element(by.css("mat-form-field[data-automation-id='state']"));
stateDropdown = new DropdownPage(this.stateDropDownArrow);
taskList(): TasksListPage {
return this.taskListPage;
}
paginationPage(): PaginationPage {
return new PaginationPage();
}
async typeAppId(input: string): Promise<void> {
await BrowserActions.clearSendKeys(this.appId, input);
}
async clickAppId(): Promise<void> {
await BrowserActions.click(this.appId);
}
async getAppId(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.appId);
return this.appId.getAttribute('value');
}
async typeTaskId(input: string): Promise<void> {
await BrowserActions.clearSendKeys(this.taskId, input);
}
async getTaskId(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.taskId);
return this.taskId.getAttribute('value');
}
async typeTaskName(input: string): Promise<void> {
await BrowserActions.clearSendKeys(this.taskName, input);
}
async getTaskName(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.taskName);
return this.taskName.getAttribute('value');
}
async typeItemsPerPage(input: number): Promise<void> {
await BrowserActions.clearSendKeys(this.itemsPerPage, input.toString());
}
async typeProcessDefinitionId(input: string): Promise<void> {
await BrowserActions.clearSendKeys(this.processDefinitionId, input);
}
async getProcessDefinitionId(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.processInstanceId);
return this.processInstanceId.getAttribute('value');
}
async typeProcessInstanceId(input: string): Promise<void> {
await BrowserActions.clearSendKeys(this.processInstanceId, input);
}
async getProcessInstanceId(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.processInstanceId);
return this.processInstanceId.getAttribute('value');
}
async getItemsPerPageFieldErrorMessage(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.itemsPerPageForm);
const errorMessage = this.itemsPerPageForm.element(by.css('mat-error'));
return BrowserActions.getText(errorMessage);
}
async typePage(input: number): Promise<void> {
await BrowserActions.clearSendKeys(this.page, input.toString());
}
async getPage(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.page);
return this.page.getAttribute('value');
}
async getPageFieldErrorMessage(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.pageForm);
const errorMessage = this.pageForm.element(by.css('mat-error'));
return BrowserActions.getText(errorMessage);
}
async typeDueAfter(input: string): Promise<void> {
await BrowserActions.clearSendKeys(this.dueAfter, input);
}
async typeDueBefore(input: string): Promise<void> {
await BrowserActions.clearSendKeys(this.dueBefore, input);
}
async clearText(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(input);
await input.clear();
}
async clickResetButton(): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.click(this.resetButton);
}
async selectState(state: string): Promise<void> {
await this.stateDropdown.selectDropdownOption(state);
}
getAllProcessDefinitionIds(): Promise<any> {
return this.taskList().getDataTable().getAllRowsColumnValues('Process Definition Id');
}
getAllProcessInstanceIds(): Promise<any> {
return this.taskList().getDataTable().getAllRowsColumnValues('Process Instance Id');
}
}
@@ -0,0 +1,63 @@
/*!
* @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 { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
import { by, element } from 'protractor';
export class TasksListPage {
taskList = element(by.css('adf-tasklist'));
noTasksFound = element.all(by.css('.adf-empty-content__title')).first();
dataTable = new DataTableComponentPage(this.taskList);
getDataTable(): DataTableComponentPage {
return this.dataTable;
}
getRowsDisplayedWithSameName(taskName: string): Promise<string> {
return this.dataTable.getRowsWithSameColumnValues('Name', taskName);
}
async checkContentIsDisplayed(taskName: string): Promise<void> {
await this.dataTable.checkContentIsDisplayed('Name', taskName);
}
async checkContentIsNotDisplayed(taskName: string): Promise<void> {
await this.dataTable.checkContentIsNotDisplayed('Name', taskName);
}
async checkRowIsSelected(taskName: string): Promise<void> {
await this.dataTable.checkRowIsSelected('Name', taskName);
}
async selectRow(taskName: string): Promise<void> {
await this.dataTable.selectRow('Name', taskName);
}
getAllRowsNameColumn(): Promise<string[]> {
return this.dataTable.getAllRowsColumnValues('Name');
}
async checkTaskListIsLoaded(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.taskList);
}
getNoTasksFoundMessage(): Promise<string> {
return BrowserActions.getText(this.noTasksFound);
}
}
+160
View File
@@ -0,0 +1,160 @@
/*!
* @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 { StartTaskDialogPage } from './dialog/start-task-dialog.page';
import { TaskDetailsPage } from './task-details.page';
import { FiltersPage } from './filters.page';
import { ChecklistDialog } from './dialog/create-checklist-dialog.page';
import { TasksListPage } from './tasks-list.page';
import { element, by } from 'protractor';
import { BrowserVisibility, BrowserActions, FormFields } from '@alfresco/adf-testing';
export class TasksPage {
createButton = element(by.css('button[data-automation-id="create-button"'));
newTaskButton = element(by.css('button[data-automation-id="btn-start-task"]'));
addChecklistButton = element(by.css('button[class*="adf-add-to-checklist-button"]'));
rowByRowName = by.xpath('ancestor::mat-chip');
checklistContainer = by.css('div[class*="checklist-menu"]');
taskTitle = '.adf-activiti-task-details__header span';
rows = by.css('div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"] div[class*="adf-datatable-cell"]');
completeButtonNoForm = element(by.id('adf-no-form-complete-button'));
checklistDialog = element(by.id('checklist-dialog'));
checklistNoMessage = element(by.id('checklist-none-message'));
numberOfChecklists = element(by.css('[data-automation-id="checklist-label"] mat-chip'));
sortByName = by.css('div[data-automation-id="auto_id_name"]');
async createNewTask(): Promise<StartTaskDialogPage> {
await this.clickOnCreateButton();
await BrowserActions.clickExecuteScript('button[data-automation-id="btn-start-task"]');
return new StartTaskDialogPage();
}
async createTask({ name, description = '', dueDate = '', formName = 'None'}): Promise<void> {
await this.clickOnCreateButton();
await BrowserActions.clickExecuteScript('button[data-automation-id="btn-start-task"]');
const dialog = new StartTaskDialogPage();
await dialog.addName(name);
await dialog.addDescription(description);
await dialog.addDueDate(dueDate);
await dialog.selectForm(formName);
await dialog.clickStartButton();
}
async newTaskButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.newTaskButton);
}
async clickOnCreateButton(): Promise<void> {
await BrowserActions.click(this.createButton);
}
formFields(): FormFields {
return new FormFields();
}
taskDetails(): TaskDetailsPage {
return new TaskDetailsPage();
}
filtersPage(): FiltersPage {
return new FiltersPage();
}
tasksListPage(): TasksListPage {
return new TasksListPage();
}
usingCheckListDialog(): ChecklistDialog {
return new ChecklistDialog();
}
async clickOnAddChecklistButton(): Promise<ChecklistDialog> {
await BrowserActions.click(this.addChecklistButton);
return new ChecklistDialog();
}
getRowsName(name: string) {
return element(this.checklistContainer).element(by.cssContainingText('span', name));
}
getChecklistByName(name: string) {
const elem = this.getRowsName(name);
const row = elem.element(this.rowByRowName);
return row;
}
async checkChecklistIsDisplayed(name: string): Promise<void> {
const checklistEle = this.getChecklistByName(name);
await BrowserVisibility.waitUntilElementIsVisible(checklistEle);
}
async checkChecklistIsNotDisplayed(name: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(element(this.checklistContainer).element(by.cssContainingText('span', name)));
}
async checkTaskTitle(taskName: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(this.taskTitle)));
const title = element(by.cssContainingText(this.taskTitle, taskName));
await BrowserVisibility.waitUntilElementIsVisible(title);
}
async completeTaskNoForm(): Promise<void> {
await BrowserActions.click(this.completeButtonNoForm);
}
async completeTaskNoFormNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.completeButtonNoForm);
}
async checkChecklistDialogIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.checklistDialog);
}
async checkChecklistDialogIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.checklistDialog);
}
async checkNoChecklistIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.checklistNoMessage);
}
getNumberOfChecklists(): Promise<string> {
return BrowserActions.getText(this.numberOfChecklists);
}
async removeChecklists(name: string): Promise<void> {
const elem = this.getRowsName(name);
const row = elem.element(this.rowByRowName);
await BrowserActions.click(row.element(by.css('mat-icon')));
}
async checkChecklistsRemoveButtonIsNotDisplayed(name: string): Promise<void> {
const elem = this.getRowsName(name);
const row = elem.element(this.rowByRowName);
await BrowserVisibility.waitUntilElementIsNotVisible(row.element(by.css('mat-icon')));
}
async clickSortByNameAsc(): Promise<any> {
return this.tasksListPage().getDataTable().sortByColumn('ASC', 'name');
}
async clickSortByNameDesc(): Promise<any> {
return this.tasksListPage().getDataTable().sortByColumn('DESC', 'name');
}
}
@@ -24,9 +24,9 @@ import {
UsersActions
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
describe('Process List - Pagination when adding processes', () => {
@@ -24,8 +24,8 @@ import {
UsersActions
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import CONSTANTS = require('../util/constants');
describe('Items per page set to 15 and adding of tasks', () => {
+3 -3
View File
@@ -16,9 +16,9 @@
*/
import { ApiService, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { TasksPage } from './pages/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { browser } from 'protractor';
import * as fs from 'fs';
import * as path from 'path';
@@ -24,10 +24,10 @@ import {
UsersActions,
ViewerPage
} from '@alfresco/adf-testing';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { AttachmentListPage } from './pages/attachment-list.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { FileModel } from '../models/ACS/file.model';
import { browser } from 'protractor';
@@ -23,15 +23,15 @@ import {
StartProcessPage,
UsersActions
} from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { ProcessListPage } from './pages/process-list.page';
import { UserProcessInstanceFilterRepresentation } from '@alfresco/js-api';
import { browser } from 'protractor';
import { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/process-list-demo.page';
import { ProcessListDemoPage } from './pages/process-list-demo.page';
import CONSTANTS = require('../util/constants');
describe('Process Filters Test', () => {
@@ -17,11 +17,11 @@
import { browser } from 'protractor';
import { ApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions } from '@alfresco/adf-testing';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { ProcessListPage } from './pages/process-list.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import moment = require('moment');
describe('Process Instance Details', () => {
@@ -23,7 +23,7 @@ import {
ProcessUtil,
UsersActions
} from '@alfresco/adf-testing';
import { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/process-list-demo.page';
import { ProcessListDemoPage } from './pages/process-list-demo.page';
import { browser } from 'protractor';
describe('Process List Test', () => {
@@ -24,9 +24,9 @@ import {
UsersActions
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
describe('Process List - Pagination', () => {
@@ -24,8 +24,8 @@ import {
UsersActions
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import { TaskRepresentation } from '@alfresco/js-api';
import CONSTANTS = require('../util/constants');
+2 -2
View File
@@ -18,8 +18,8 @@
import { browser } from 'protractor';
import { ApiService, LoginPage, UsersActions } from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import * as fs from 'fs';
import * as path from 'path';
import CONSTANTS = require('../util/constants');
@@ -32,14 +32,14 @@ import {
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { FileModel } from '../models/ACS/file.model';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { ContentServicesPage } from '../pages/adf/content-services.page';
import { UploadDialogPage } from '../pages/adf/dialog/upload-dialog.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { AttachmentListPage } from './pages/attachment-list.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { ContentServicesPage } from '../core/pages/content-services.page';
import { UploadDialogPage } from '../core/pages/dialog/upload-dialog.page';
describe('Start Process Component', () => {
@@ -19,10 +19,10 @@ import { ApiService, ApplicationsUtil, LoginPage, UserModel, UsersActions } from
import { browser, by } from 'protractor';
import { FileModel } from '../models/ACS/file.model';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { AttachmentListPage } from './pages/attachment-list.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { TasksPage } from './pages/tasks.page';
import CONSTANTS = require('../util/constants');
describe('Start Task - Custom App', () => {
@@ -18,11 +18,11 @@
import { ApiService, LoginPage, StringUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
import { browser, by } from 'protractor';
import { FileModel } from '../models/ACS/file.model';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
import { ChecklistDialog } from '../pages/adf/process-services/dialog/create-checklist-dialog.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { AttachmentListPage } from './pages/attachment-list.page';
import { ChecklistDialog } from './pages/dialog/create-checklist-dialog.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { TasksPage } from './pages/tasks.page';
import * as fs from 'fs';
import * as path from 'path';
import { TaskRepresentation } from '@alfresco/js-api';
+7 -7
View File
@@ -23,14 +23,14 @@ import {
UserModel,
UsersActions
} from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { TasksPage } from './pages/tasks.page';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/process-list-demo.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { ProcessListDemoPage } from './pages/process-list-demo.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { ProcessListPage } from './pages/process-list.page';
import CONSTANTS = require('../util/constants');
describe('Stencil', () => {
+7 -7
View File
@@ -24,14 +24,14 @@ import {
UserModel,
UsersActions
} from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { ProcessFiltersPage } from './pages/process-filters.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { ProcessDetailsPage } from './pages/process-details.page';
import { ProcessListPage } from './pages/process-list.page';
import { browser } from 'protractor';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { TasksPage } from './pages/tasks.page';
import CONSTANTS = require('../util/constants');
describe('Task Assignee', () => {
@@ -24,9 +24,9 @@ import {
UsersActions,
ViewerPage
} from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import { AttachmentListPage } from './pages/attachment-list.page';
import * as fs from 'fs';
import * as path from 'path';
import { FileModel } from '../models/ACS/file.model';
+2 -2
View File
@@ -16,8 +16,8 @@
*/
import { LoginPage, BrowserActions, FileBrowserUtil, ApplicationsUtil, ApiService, UsersActions } from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { TasksPage } from './pages/tasks.page';
import { ProcessServicesPage } from './pages/process-services.page';
import CONSTANTS = require('../util/constants');
import { browser } from 'protractor';
import { TaskRepresentation } from '@alfresco/js-api';
@@ -26,12 +26,12 @@ import {
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { FormModelActions } from '../actions/APS/form-model.actions';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { FiltersPage } from '../pages/adf/process-services/filters.page';
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
import { TasksListPage } from '../pages/adf/process-services/tasks-list.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { AttachFormPage } from '../pages/adf/process-services/attach-form.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { FiltersPage } from './pages/filters.page';
import { TaskDetailsPage } from './pages/task-details.page';
import { TasksListPage } from './pages/tasks-list.page';
import { TasksPage } from './pages/tasks.page';
import { AttachFormPage } from './pages/attach-form.page';
import { TaskRepresentation } from '@alfresco/js-api';
import CONSTANTS = require('../util/constants');
@@ -16,8 +16,8 @@
*/
import { ApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../util/constants');
+2 -2
View File
@@ -24,8 +24,8 @@ import {
StringUtil,
UsersActions
} from '@alfresco/adf-testing';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { TasksPage } from './pages/tasks.page';
import { browser } from 'protractor';
import { TaskRepresentation } from '@alfresco/js-api';
import Task = require('../models/APS/Task');
@@ -16,14 +16,14 @@
*/
import { ApiService, ApplicationsUtil, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { TasksListPage } from '../pages/adf/process-services/tasks-list.page';
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
import { AppSettingsTogglesPage } from '../pages/adf/process-services/dialog/app-settings-toggles.page';
import { TaskFiltersDemoPage } from '../pages/adf/demo-shell/process-services/task-filters-demo.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { TasksPage } from './pages/tasks.page';
import { TasksListPage } from './pages/tasks-list.page';
import { TaskDetailsPage } from './pages/task-details.page';
import { ProcessServiceTabBarPage } from './pages/process-service-tab-bar.page';
import { AppSettingsTogglesPage } from './pages/dialog/app-settings-toggles.page';
import { TaskFiltersDemoPage } from './pages/task-filters-demo.page';
import { UserProcessInstanceFilterRepresentation } from '@alfresco/js-api';
import { browser } from 'protractor';
@@ -16,12 +16,12 @@
*/
import { ApiService, ApplicationsUtil, LoginPage, UsersActions } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { TasksListPage } from '../pages/adf/process-services/tasks-list.page';
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
import { TaskFiltersDemoPage } from '../pages/adf/demo-shell/process-services/task-filters-demo.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { ProcessServicesPage } from './pages/process-services.page';
import { TasksPage } from './pages/tasks.page';
import { TasksListPage } from './pages/tasks-list.page';
import { TaskDetailsPage } from './pages/task-details.page';
import { TaskFiltersDemoPage } from './pages/task-filters-demo.page';
import { UserProcessInstanceFilterRepresentation } from '@alfresco/js-api';
import { browser } from 'protractor';
@@ -25,8 +25,8 @@ import {
UsersActions
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
import { TasksPage } from '../pages/adf/process-services/tasks.page';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
import { TasksPage } from './pages/tasks.page';
import CONSTANTS = require('../util/constants');
describe('Task List Pagination', () => {
@@ -16,7 +16,7 @@
*/
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil, ApiService, UsersActions } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import CONSTANTS = require('../../util/constants');
import { browser } from 'protractor';
@@ -24,13 +24,13 @@ import {
ViewerPage,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { FileModel } from '../../models/ACS/file.model';
import { browser } from 'protractor';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
import { TaskDetailsPage } from '../../pages/adf/process-services/task-details.page';
import { TasksListPage } from '../../pages/adf/process-services/tasks-list.page';
import { FiltersPage } from '../../pages/adf/process-services/filters.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { TaskDetailsPage } from '../pages/task-details.page';
import { TasksListPage } from '../pages/tasks-list.page';
import { FiltersPage } from '../pages/filters.page';
import CONSTANTS = require('../../util/constants');
describe('Attach widget - File', () => {
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -25,9 +25,9 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import { FormDemoPage } from '../../pages/adf/demo-shell/process-services/form-demo.page';
import { FormDemoPage } from '.././pages/form-demo.page';
import { customDateFormAPS1 } from '../../resources/forms/custom-date-form';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,9 +24,9 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import CONSTANTS = require('../../util/constants');
describe('Dynamic Table widget ', () => {
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -16,9 +16,9 @@
*/
import { ApiService, ApplicationsUtil, LoginPage, UserModel, UsersActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import CONSTANTS = require('../../util/constants');
describe('People and Group widget', () => {
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -24,7 +24,7 @@ import {
UsersActions,
Widget
} from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import CONSTANTS = require('../../util/constants');
@@ -16,9 +16,9 @@
*/
import { ApiService, ApplicationsUtil, LoginPage, UserModel, UsersActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import { browser } from 'protractor';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import CONSTANTS = require('../../util/constants');
describe('Typeahead widget', () => {
@@ -25,7 +25,7 @@ import {
Widget
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
import { TasksPage } from '../pages/tasks.page';
import CONSTANTS = require('../../util/constants');
const widgets = {