[ADF-4514] Move widgets pages to Testing package (#4703)

This commit is contained in:
Marouan Bentaleb
2019-05-22 18:32:46 +01:00
committed by Denys Vuika
parent 7a3b3583f8
commit 446efe4297
46 changed files with 105 additions and 94 deletions
@@ -1,157 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { by, element } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
import { ElementFinder } from 'protractor/built/element';
export class FormFields {
formContent = element(by.css('adf-form'));
refreshButton = element(by.css('div[class*="form-reload-button"] mat-icon'));
saveButton = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
valueLocator = by.css('input');
labelLocator = by.css('label');
noFormMessage = element(by.css('span[id*="no-form-message"]'));
completedTaskNoFormMessage = element(by.css('div[id*="completed-form-message"] p'));
attachFormButton = element(by.id('adf-no-form-attach-form-button'));
selectFormDropDownArrow = element.all(by.css('adf-attach-form div[class*="mat-select-arrow"]')).first();
selectFormContent = element(by.css('div[class*="mat-select-panel"]'));
completeButton = element(by.id('adf-form-complete'));
errorMessage = by.css('.adf-error-text-container .adf-error-text');
setFieldValue(locator, field, value) {
const fieldElement = element(locator(field));
BrowserActions.clearSendKeys(fieldElement, value);
return this;
}
checkWidgetIsVisible(fieldId) {
const fieldElement = element.all(by.css(`adf-form-field div[id='field-${fieldId}-container']`)).first();
BrowserVisibility.waitUntilElementIsVisible(fieldElement);
}
checkWidgetIsHidden(fieldId) {
const hiddenElement = element(by.css(`adf-form-field div[id='field-${fieldId}-container'][hidden]`));
BrowserVisibility.waitUntilElementIsVisible(hiddenElement);
}
getWidget(fieldId) {
const widget = element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
BrowserVisibility.waitUntilElementIsVisible(widget);
return widget;
}
getFieldValue(fieldId, valueLocatorParam?: any) {
const value = this.getWidget(fieldId).element(valueLocatorParam || this.valueLocator);
BrowserVisibility.waitUntilElementIsVisible(value);
return value.getAttribute('value');
}
getFieldLabel(fieldId, labelLocatorParam?: any) {
const label = this.getWidget(fieldId).all(labelLocatorParam || this.labelLocator).first();
return BrowserActions.getText(label);
}
getFieldErrorMessage(fieldId) {
const error = this.getWidget(fieldId).element(this.errorMessage);
return BrowserActions.getText(error);
}
getFieldText(fieldId, labelLocatorParam?: any) {
const label = this.getWidget(fieldId).element(labelLocatorParam || this.labelLocator);
return BrowserActions.getText(label);
}
getFieldPlaceHolder(fieldId, locator = 'input') {
const placeHolderLocator: ElementFinder = element(by.css(`${locator}#${fieldId}`));
BrowserVisibility.waitUntilElementIsVisible(placeHolderLocator);
return placeHolderLocator.getAttribute('placeholder');
}
checkFieldValue(locator, field, val) {
BrowserVisibility.waitUntilElementHasValue(element(locator(field)), val);
return this;
}
refreshForm() {
BrowserActions.click(this.refreshButton);
return this;
}
saveForm() {
BrowserActions.click(this.saveButton);
return this;
}
noFormIsDisplayed() {
BrowserVisibility.waitUntilElementIsNotOnPage(this.formContent);
return this;
}
checkFormIsDisplayed() {
BrowserVisibility.waitUntilElementIsVisible(this.formContent);
return this;
}
getNoFormMessage() {
return BrowserActions.getText(this.noFormMessage);
}
getCompletedTaskNoFormMessage() {
return BrowserActions.getText(this.completedTaskNoFormMessage);
}
clickOnAttachFormButton() {
BrowserActions.click(this.attachFormButton);
return this;
}
selectForm(formName) {
BrowserActions.click(this.selectFormDropDownArrow);
BrowserVisibility.waitUntilElementIsVisible(this.selectFormContent);
this.selectFormFromDropDown(formName);
return this;
}
selectFormFromDropDown(formName) {
const formNameElement = element(by.cssContainingText('span', formName));
BrowserActions.click(formNameElement);
}
checkWidgetIsReadOnlyMode(fieldId) {
const widget = element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
const widgetReadOnly = widget.element(by.css('div[class*="adf-readonly"]'));
BrowserVisibility.waitUntilElementIsVisible(widgetReadOnly);
return widgetReadOnly;
}
completeForm() {
BrowserActions.click(this.completeButton);
}
setValueInInputById(fieldId, value) {
const input = element(by.id(fieldId));
BrowserActions.clearSendKeys(input, value);
return this;
}
isCompleteFormButtonDisabled() {
BrowserVisibility.waitUntilElementIsVisible(this.completeButton);
return this.completeButton.getAttribute('disabled');
}
}
@@ -1,43 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { element, by } from 'protractor';
import { BrowserVisibility } from '@alfresco/adf-testing';
export class FormPage {
errorLog = element(by.css('div[class*="console"]'));
checkErrorMessageForWidgetIsDisplayed(errorMessage) {
return BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('.adf-error-text', errorMessage)));
}
checkErrorMessageForWidgetIsNotDisplayed(errorMessage) {
return BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('.adf-error-text', errorMessage)));
}
checkErrorLogMessage(errorMessage) {
BrowserVisibility.waitUntilElementIsVisible(this.errorLog);
return BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
}
checkErrorMessageIsNotDisplayed(errorMessage) {
BrowserVisibility.waitUntilElementIsVisible(this.errorLog);
return BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
}
}
+1 -2
View File
@@ -16,14 +16,13 @@
*/
import { StartTaskDialog } from './dialog/startTaskDialog';
import { FormFields } from './formFields';
import { TaskDetailsPage } from './taskDetailsPage';
import { FiltersPage } from './filtersPage';
import { ChecklistDialog } from './dialog/createChecklistDialog';
import { TasksListPage } from './tasksListPage';
import { element, by } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
import { BrowserVisibility, BrowserActions, FormFields } from '@alfresco/adf-testing';
export class TasksPage {
@@ -1,69 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { element, by, protractor } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
import { FormFields } from '../formFields';
export class AmountWidget {
currency = by.css('span[class="adf-amount-widget__prefix-spacing"]');
formFields = new FormFields();
getAmountFieldLabel(fieldId) {
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
return BrowserActions.getText(label);
}
getAmountFieldCurrency(fieldId) {
return BrowserActions.getText(this.formFields.getWidget(fieldId).element(this.currency));
}
setFieldValue(fieldId, value) {
return this.formFields.setValueInInputById(fieldId, value);
}
removeFromAmountWidget(fieldId) {
BrowserVisibility.waitUntilElementIsVisible(this.formFields.getWidget(fieldId));
const amountWidgetInput = element(by.id(fieldId));
amountWidgetInput.getAttribute('value').then((result) => {
for (let i = result.length; i >= 0; i--) {
amountWidgetInput.sendKeys(protractor.Key.BACK_SPACE);
}
});
}
clearFieldValue(fieldId) {
const numberField = element(by.id(fieldId));
BrowserVisibility.waitUntilElementIsVisible(numberField);
return numberField.clear();
}
checkWidgetIsVisible(fieldId) {
return this.formFields.checkWidgetIsVisible(fieldId);
}
getErrorMessage(fieldId) {
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
return BrowserActions.getText(errorMessage);
}
getPlaceholder(fieldId) {
return this.formFields.getFieldPlaceHolder(fieldId);
}
}
@@ -1,55 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import TestConfig = require('../../../../test.config');
import path = require('path');
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
import remote = require('selenium-webdriver/remote');
import { element, by, browser } from 'protractor';
export class AttachFileWidget {
formFields = new FormFields();
uploadLocator = by.css('button[id="attachfile"]');
localStorageButton = element(by.css('input[id="attachfile"]'));
filesListLocator = by.css('div[id="adf-attach-widget-readonly-list"]');
attachFile(fieldId, fileLocation) {
browser.setFileDetector(new remote.FileDetector());
const widget = this.formFields.getWidget(fieldId);
const uploadButton = widget.element(this.uploadLocator);
BrowserActions.click(uploadButton);
BrowserVisibility.waitUntilElementIsVisible(this.localStorageButton);
this.localStorageButton.sendKeys(path.resolve(path.join(TestConfig.main.rootPath, fileLocation)));
return this;
}
checkFileIsAttached(fieldId, name) {
const widget = this.formFields.getWidget(fieldId);
const fileAttached = widget.element(this.filesListLocator).element(by.cssContainingText('mat-list-item span ', name));
BrowserVisibility.waitUntilElementIsVisible(fileAttached);
return this;
}
viewFile(name) {
const fileView = element(this.filesListLocator).element(by.cssContainingText('mat-list-item span ', name));
BrowserActions.click(fileView);
browser.actions().doubleClick(fileView).perform();
return this;
}
}
@@ -1,43 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { BrowserActions } from '@alfresco/adf-testing';
import { by, element } from 'protractor';
export class CheckboxWidget {
formFields = new FormFields();
checkboxLabel = element(by.css('span[class*="mat-checkbox-label"]'));
getCheckboxLabel() {
return BrowserActions.getText(this.checkboxLabel);
}
clickCheckboxInput(fieldId) {
const checkboxInput = element.all(by.css(`mat-checkbox[id="${fieldId}"] div`)).first();
BrowserActions.click(checkboxInput);
}
isCheckboxDisplayed(fieldId) {
return this.formFields.checkWidgetIsVisible(fieldId);
}
isCheckboxHidden(fieldId) {
return this.formFields.checkWidgetIsHidden(fieldId);
}
}
@@ -1,30 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by } from 'protractor';
export class ContainerWidget {
formFields = new FormFields();
fileLocator = by.css("div [class*='upload-widget__content-text']");
getFieldText(fieldId) {
return this.formFields.getFieldText(fieldId, this.fileLocator);
}
}
@@ -1,96 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { element, by, protractor } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class DateTimeWidget {
formFields = new FormFields();
outsideLayer = element(by.css('div[class*="cdk-overlay-container"]'));
checkWidgetIsVisible(fieldId) {
return this.formFields.checkWidgetIsVisible(fieldId);
}
getDateTimeLabel(fieldId) {
const label = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`));
return BrowserActions.getText(label);
}
setDateTimeInput(fieldId, value) {
return this.formFields.setValueInInputById(fieldId, value);
}
clearDateTimeInput(fieldId) {
const dateInput = element(by.id(fieldId));
BrowserVisibility.waitUntilElementIsVisible(dateInput);
return dateInput.clear();
}
clickOutsideWidget(fieldId) {
const form = this.formFields.getWidget(fieldId);
BrowserActions.click(form);
}
closeDataTimeWidget() {
BrowserActions.click(this.outsideLayer);
}
getErrorMessage(fieldId) {
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
return BrowserActions.getText(errorMessage);
}
selectDay(day) {
const selectedDay = element(by.cssContainingText('div[class*="mat-datetimepicker-calendar-body-cell-content"]', day));
BrowserActions.click(selectedDay);
}
openDatepicker(fieldId) {
return element(by.id(fieldId)).click();
}
private selectTime(time) {
const selectedTime = element(by.cssContainingText('div[class*="mat-datetimepicker-clock-cell"]', time));
BrowserActions.click(selectedTime);
}
selectHour(hour) {
return this.selectTime(hour);
}
selectMinute(minute) {
return this.selectTime(minute);
}
getPlaceholder(fieldId) {
return this.formFields.getFieldPlaceHolder(fieldId);
}
removeFromDatetimeWidget(fieldId) {
BrowserVisibility.waitUntilElementIsVisible(this.formFields.getWidget(fieldId));
const amountWidgetInput = element(by.id(fieldId));
amountWidgetInput.getAttribute('value').then((result) => {
for (let i = result.length; i >= 0; i--) {
amountWidgetInput.sendKeys(protractor.Key.BACK_SPACE);
}
});
}
}
@@ -1,70 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { element, by, protractor } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class DateWidget {
formFields = new FormFields();
checkWidgetIsVisible(fieldId) {
return this.formFields.checkWidgetIsVisible(fieldId);
}
checkLabelIsVisible(fieldId) {
return this.formFields.checkWidgetIsVisible(fieldId);
}
getDateLabel(fieldId) {
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
return BrowserActions.getText(label);
}
setDateInput(fieldId, value) {
this.removeFromDatetimeWidget(fieldId);
return this.formFields.setValueInInputById(fieldId, value);
}
clearDateInput(fieldId) {
const dateInput = element(by.id(fieldId));
BrowserVisibility.waitUntilElementIsVisible(dateInput);
return dateInput.clear();
}
clickOutsideWidget(fieldId) {
const form = this.formFields.getWidget(fieldId);
BrowserActions.click(form);
}
getErrorMessage(fieldId) {
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
return BrowserActions.getText(errorMessage);
}
removeFromDatetimeWidget(fieldId) {
BrowserVisibility.waitUntilElementIsVisible(this.formFields.getWidget(fieldId));
const dateWidgetInput = element(by.id(fieldId));
dateWidgetInput.getAttribute('value').then((result) => {
for (let i = result.length; i >= 0; i--) {
dateWidgetInput.sendKeys(protractor.Key.BACK_SPACE);
}
});
}
}
@@ -1,39 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by } from 'protractor';
export class DisplayTextWidget {
formFields = new FormFields();
labelLocator = by.css('div[class*="adf-display-text-widget"]');
inputLocator = by.css('input');
getFieldLabel(fieldId) {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
getFieldValue(fieldId) {
return this.formFields.getFieldValue(fieldId, this.inputLocator);
}
getFieldText(fieldId) {
return this.formFields.getFieldText(fieldId, this.labelLocator);
}
}
@@ -1,35 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by } from 'protractor';
export class DisplayValueWidget {
formFields = new FormFields();
labelLocator = by.css('span[class*="unknown-text"]');
inputLocator = by.css('input');
getFieldLabel(fieldId) {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
getFieldValue(fieldId) {
return this.formFields.getFieldValue(fieldId, this.inputLocator);
}
}
@@ -1,33 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by } from 'protractor';
export class DocumentWidget {
formFields = new FormFields();
fileLocator = by.css("div [class*='upload-widget__content-text']");
getFieldText(fieldId) {
return this.formFields.getFieldText(fieldId, this.fileLocator);
}
getFileName(fieldId) {
return this.formFields.getFieldText(fieldId, this.fileLocator);
}
}
@@ -1,49 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by, element } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class DropdownWidget {
formFields = new FormFields();
selectedOptionLocator = by.css('mat-select[id="dropdown"] span span');
dropdown = element(by.id('dropdown'));
getSelectedOptionText(fieldId) {
return this.formFields.getFieldText(fieldId, this.selectedOptionLocator);
}
selectOption(option) {
this.openDropdown();
const row = element(by.cssContainingText('mat-option span', option));
BrowserActions.click(row);
}
openDropdown() {
this.checkDropdownIsDisplayed();
BrowserVisibility.waitUntilElementIsClickable(this.dropdown);
return this.dropdown.click();
}
checkDropdownIsDisplayed() {
BrowserVisibility.waitUntilElementIsVisible(this.dropdown);
return this.dropdown;
}
}
@@ -1,128 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by, element, protractor } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class DynamicTableWidget {
formFields = new FormFields();
labelLocator = by.css('dynamic-table-widget div div');
columnNameLocator = by.css('table[id*="dynamic-table"] th');
addButton = element(by.id('label-add-row'));
cancelButton = element(by.cssContainingText('button span', 'Cancel'));
editButton = element(by.cssContainingText('button span', 'edit'));
addRow = element(by.id('dynamictable-add-row'));
columnDateTime = element(by.id('columnDateTime'));
columnDate = element(by.id('columnDate'));
calendarHeader = element(by.css('div[class="mat-datetimepicker-calendar-header-date-time"]'));
calendarContent = element(by.css('div[class="mat-datetimepicker-calendar-content"]'));
saveButton = element(by.cssContainingText('button span', 'Save'));
errorMessage = element(by.css('div[class="adf-error-text"]'));
dateWidget = element.all(by.css('mat-datepicker-toggle button')).first();
tableRow = element.all(by.css('tbody tr'));
dataTableInput = element(by.id('id'));
getFieldLabel(fieldId) {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
getColumnName(fieldId) {
return this.formFields.getFieldText(fieldId, this.columnNameLocator);
}
clickAddButton() {
BrowserActions.click(this.addButton);
}
clickAddRow() {
BrowserActions.click(this.addRow);
}
clickTableRow(rowNumber) {
const tableRowByIndex = element(by.id('dynamictable-row-' + rowNumber));
BrowserActions.click(tableRowByIndex);
}
clickEditButton() {
BrowserActions.click(this.editButton);
}
clickCancelButton() {
BrowserActions.click(this.cancelButton);
}
setDatatableInput(text) {
BrowserVisibility.waitUntilElementIsVisible(this.dataTableInput);
this.dataTableInput.clear();
return this.dataTableInput.sendKeys(text);
}
getTableRowText(rowNumber) {
const tableRowByIndex = element(by.id('dynamictable-row-' + rowNumber));
return BrowserActions.getText(tableRowByIndex);
}
checkTableRowIsNotVisible(rowNumber) {
const tableRowByIndex = element(by.id('dynamictable-row-' + rowNumber));
return BrowserVisibility.waitUntilElementIsNotVisible(tableRowByIndex);
}
clickColumnDateTime() {
BrowserActions.click(this.columnDateTime);
BrowserVisibility.waitUntilElementIsVisible(this.calendarHeader);
BrowserVisibility.waitUntilElementIsVisible(this.calendarContent);
BrowserActions.closeMenuAndDialogs();
}
addRandomStringOnDateTime(randomText) {
BrowserActions.click(this.columnDateTime);
BrowserActions.closeMenuAndDialogs();
this.columnDateTime.sendKeys(randomText);
this.columnDateTime.sendKeys(protractor.Key.ENTER);
return this.columnDateTime.getAttribute('value');
}
addRandomStringOnDate(randomText) {
BrowserActions.click(this.columnDate);
return this.columnDate.sendKeys(randomText);
}
clickSaveButton() {
BrowserActions.click(this.saveButton);
}
checkErrorMessage() {
return BrowserActions.getText(this.errorMessage);
}
clickDateWidget() {
BrowserActions.click(this.dateWidget);
}
getTableRow(rowNumber) {
return BrowserVisibility.waitUntilElementIsVisible(this.tableRow.get(rowNumber));
}
checkItemIsPresent(item) {
const row = element(by.cssContainingText('table tbody tr td span', item));
const present = BrowserVisibility.waitUntilElementIsVisible(row);
expect(present).toBe(true);
}
}
@@ -1,31 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by } from 'protractor';
export class HeaderWidget {
formFields = new FormFields();
labelLocator = by.css('span[id="container-header-label"]');
getFieldLabel(fieldId) {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
}
@@ -1,36 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by, element } from 'protractor';
import { BrowserActions } from '@alfresco/adf-testing';
export class HyperlinkWidget {
formFields = new FormFields();
fieldLocator = by.css('div[class="adf-hyperlink-widget "] a');
getFieldText(fieldId) {
return this.formFields.getFieldText(fieldId, this.fieldLocator);
}
getFieldLabel(fieldId) {
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
return BrowserActions.getText(label);
}
}
@@ -1,48 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by } from 'protractor';
export class MultilineTextWidget {
formFields = new FormFields();
valueLocator = by.css('textarea');
labelLocator = by.css("label[class*='adf-label']");
getFieldValue(fieldId) {
return this.formFields.getFieldValue(fieldId, this.valueLocator);
}
getFieldLabel(fieldId) {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
getFieldPlaceHolder(fieldId) {
return this.formFields.getFieldPlaceHolder(fieldId, 'textarea');
}
setValue(fieldId, value) {
return this.formFields.setFieldValue(by.id, fieldId, value);
}
getErrorMessage(fieldId) {
return this.formFields.getFieldErrorMessage(fieldId);
}
}
@@ -1,53 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { element, by } from 'protractor';
import { FormFields } from '../formFields';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class NumberWidget {
formFields = new FormFields();
getNumberFieldLabel(fieldId) {
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
return BrowserActions.getText(label);
}
setFieldValue(fieldId, value) {
return this.formFields.setValueInInputById(fieldId, value);
}
clearFieldValue(fieldId) {
const numberField = element(by.id(fieldId));
BrowserVisibility.waitUntilElementIsVisible(numberField);
return numberField.clear();
}
checkWidgetIsVisible(fieldId) {
return this.formFields.checkWidgetIsVisible(fieldId);
}
getErrorMessage(fieldId) {
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
return BrowserActions.getText(errorMessage);
}
getPlaceholder(fieldId) {
return this.formFields.getFieldPlaceHolder(fieldId);
}
}
@@ -1,76 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by, element } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class PeopleWidget {
peopleField = element(by.css('input[data-automation-id="adf-people-search-input"]'));
firstResult = element(by.id('adf-people-widget-user-0'));
formFields = new FormFields();
labelLocator = by.css('div[class*="display-text-widget"]');
inputLocator = by.id('involvepeople');
peopleDropDownList = by.css('div[class*="adf-people-widget-list"]');
getFieldLabel(fieldId) {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
getFieldValue(fieldId) {
return this.formFields.getFieldValue(fieldId, this.inputLocator);
}
getFieldText(fieldId) {
return this.formFields.getFieldText(fieldId, this.labelLocator);
}
insertUser(fieldId, value) {
return this.formFields.setValueInInputById(fieldId, value);
}
checkDropDownListIsDisplayed() {
return BrowserVisibility.waitUntilElementIsVisible(element(this.peopleDropDownList));
}
checkUserIsListed(userName) {
const user = element(by.cssContainingText('.adf-people-label-name', userName));
return BrowserVisibility.waitUntilElementIsVisible(user);
}
selectUserFromDropDown(userName) {
const user = element(by.cssContainingText('.adf-people-label-name', userName));
BrowserActions.click(user);
return this;
}
checkPeopleFieldIsDisplayed() {
return BrowserVisibility.waitUntilElementIsVisible(this.peopleField);
}
fillPeopleField(value) {
BrowserVisibility.waitUntilElementIsClickable(this.peopleField);
return this.peopleField.sendKeys(value);
}
selectUserFromDropdown() {
BrowserVisibility.waitUntilElementIsVisible(this.firstResult);
return this.firstResult.click();
}
}
@@ -1,53 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by, element } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class RadioButtonsWidget {
selectedOption = by.css('mat-radio-button[ng-pristine]');
formFields = new FormFields();
getSpecificOptionLabel(fieldId, optionNumber) {
const optionLocator = by.css('label[for*="radiobuttons-option_' + optionNumber + '"]');
const option = this.formFields.getWidget(fieldId).element(optionLocator);
return BrowserActions.getText(option);
}
selectOption(fieldId, optionNumber) {
const optionLocator = by.css(`label[for*="${fieldId}-option_${optionNumber}"]`);
const option = this.formFields.getWidget(fieldId).element(optionLocator);
return BrowserActions.click(option);
}
isSelectionClean(fieldId) {
const option = this.formFields.getWidget(fieldId).element(this.selectedOption);
return BrowserVisibility.waitUntilElementIsNotVisible(option);
}
getRadioWidgetLabel(fieldId) {
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
return BrowserActions.getText(label);
}
}
@@ -1,54 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../formFields';
import { by } from 'protractor';
export class TextWidget {
formFields = new FormFields();
labelLocator = by.css("label[class*='adf-label']");
getFieldLabel(fieldId) {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
getFieldPlaceHolder(fieldId) {
return this.formFields.getFieldPlaceHolder(fieldId);
}
setValue(fieldId, value) {
return this.formFields.setFieldValue(by.id, fieldId, value);
}
getFieldValue(fieldId) {
return this.formFields.getFieldValue(fieldId);
}
getErrorMessage(fieldId) {
return this.formFields.getFieldErrorMessage(fieldId);
}
isWidgetVisible(fieldId) {
return this.formFields.checkWidgetIsVisible(fieldId);
}
isWidgetNotVisible(fieldId) {
return this.formFields.checkWidgetIsHidden(fieldId);
}
}
@@ -1,110 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MultilineTextWidget } from './multilineTextWidget';
import { HeaderWidget } from './headerWidget';
import { DisplayTextWidget } from './displayTextWidget';
import { AttachFileWidget } from './attachFileWidget';
import { DisplayValueWidget } from './displayValueWidget';
import { RadioButtonsWidget } from './radioButtonsWidget';
import { HyperlinkWidget } from './hyperlinkWidget';
import { DropdownWidget } from './dropdownWidget';
import { DynamicTableWidget } from './dynamicTableWidget';
import { TextWidget } from './textWidget';
import { CheckboxWidget } from './checkboxWidget';
import { DateWidget } from './dateWidget';
import { DateTimeWidget } from './dateTimeWidget';
import { NumberWidget } from './numberWidget';
import { AmountWidget } from './amountWidget';
import { ContainerWidget } from './containerWidget';
import { PeopleWidget } from './peopleWidget';
import { DocumentWidget } from './documentWidget';
export class Widget {
multilineTextWidget() {
return new MultilineTextWidget();
}
headerWidget() {
return new HeaderWidget();
}
displayTextWidget() {
return new DisplayTextWidget();
}
attachFileWidget() {
return new AttachFileWidget();
}
displayValueWidget() {
return new DisplayValueWidget();
}
radioWidget() {
return new RadioButtonsWidget();
}
hyperlink() {
return new HyperlinkWidget();
}
dropdown() {
return new DropdownWidget();
}
dynamicTable() {
return new DynamicTableWidget();
}
textWidget() {
return new TextWidget();
}
documentWidget() {
return new DocumentWidget();
}
checkboxWidget() {
return new CheckboxWidget();
}
dateWidget() {
return new DateWidget();
}
dateTimeWidget() {
return new DateTimeWidget();
}
numberWidget() {
return new NumberWidget();
}
amountWidget() {
return new AmountWidget();
}
containerWidget() {
return new ContainerWidget();
}
peopleWidget() {
return new PeopleWidget();
}
}
@@ -15,8 +15,7 @@
* limitations under the License.
*/
import { LoginPage } from '@alfresco/adf-testing';
import { Widget } from '../pages/adf/process-services/widgets/widget';
import { LoginPage, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasksPage';
@@ -92,7 +91,7 @@ describe('Start Task - Task App', () => {
.addForm(app.formName)
.clickStartButton();
widget.attachFileWidget().attachFile(appFields.attachFile_id, pdfFile.location);
widget.attachFileWidget().attachFile(appFields.attachFile_id, TestConfig.main.rootPath + pdfFile.location);
widget.attachFileWidget().checkFileIsAttached(appFields.attachFile_id, pdfFile.name);
widget.attachFileWidget().viewFile(pdfFile.name);
@@ -15,11 +15,10 @@
* limitations under the License.
*/
import { LoginPage } from '@alfresco/adf-testing';
import { LoginPage, FormFields } from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasksPage';
import { AttachFormPage } from '../pages/adf/process-services/attachFormPage';
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { FormFields } from '../pages/adf/process-services/formFields';
import CONSTANTS = require('../util/constants');
@@ -15,11 +15,9 @@
* limitations under the License.
*/
import { LoginPage } from '@alfresco/adf-testing';
import { LoginPage, Widget } from '@alfresco/adf-testing';
import { ProcessFiltersPage } from '../pages/adf/process-services/processFiltersPage';
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/processServiceTabBarPage';
import { DynamicTableWidget } from '../pages/adf/process-services/widgets/dynamicTableWidget';
import { DropdownWidget } from '../pages/adf/process-services/widgets/dropdownWidget';
import { DatePickerPage } from '../pages/adf/material/datePickerPage';
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
@@ -35,9 +33,9 @@ describe('Dynamic Table', () => {
const loginPage = new LoginPage();
const processFiltersPage = new ProcessFiltersPage();
const processServiceTabBarPage = new ProcessServiceTabBarPage();
const dynamicTable = new DynamicTableWidget();
const datePicker = new DatePickerPage();
const navigationBarPage = new NavigationBarPage();
const widget = new Widget();
let user, tenantId, appId, apps, users;
beforeAll(async(done) => {
@@ -106,30 +104,30 @@ describe('Dynamic Table', () => {
});
it('[C286277] Should have a datepicker and a mask for DateTime field', () => {
dynamicTable.clickAddButton();
dynamicTable.clickColumnDateTime();
widget.dynamicTable().clickAddButton();
widget.dynamicTable().clickColumnDateTime();
expect(dynamicTable.addRandomStringOnDateTime(randomText.dateTime)).toBe('');
expect(widget.dynamicTable().addRandomStringOnDateTime(randomText.dateTime)).toBe('');
});
it('[C286279] Should be able to save row with Date field', () => {
dynamicTable.clickAddButton();
dynamicTable.addRandomStringOnDate(randomText.date);
dynamicTable.clickSaveButton();
widget.dynamicTable().clickAddButton();
widget.dynamicTable().addRandomStringOnDate(randomText.date);
widget.dynamicTable().clickSaveButton();
expect(dynamicTable.checkErrorMessage()).toBe(randomText.error);
expect(widget.dynamicTable().checkErrorMessage()).toBe(randomText.error);
dynamicTable.clickDateWidget();
widget.dynamicTable().clickDateWidget();
datePicker.selectTodayDate()
.checkDatePickerIsNotDisplayed();
dynamicTable.clickSaveButton();
dynamicTable.getTableRow(rowPosition);
widget.dynamicTable().clickSaveButton();
widget.dynamicTable().getTableRow(rowPosition);
});
});
describe('Required Dropdown', () => {
const app = resources.Files.APP_DYNAMIC_TABLE_DROPDOWN;
const dropdown = new DropdownWidget();
const dropdown = widget.dropdown();
beforeAll(async(done) => {
@@ -162,10 +160,10 @@ describe('Dynamic Table', () => {
it('[C286519] Should be able to save row with required dropdown column', () => {
const dropdownOption = 'Option 1';
dynamicTable.clickAddButton();
widget.dynamicTable().clickAddButton();
dropdown.selectOption(dropdownOption);
dynamicTable.clickSaveButton();
dynamicTable.checkItemIsPresent(dropdownOption);
widget.dynamicTable().clickSaveButton();
widget.dynamicTable().checkItemIsPresent(dropdownOption);
});
});
+12 -18
View File
@@ -15,12 +15,8 @@
* limitations under the License.
*/
import { LoginPage } from '@alfresco/adf-testing';
import { LoginPage, Widget, FormPage } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { FormPage } from '../pages/adf/process-services/formPage';
import { DateWidget } from '../pages/adf/process-services/widgets/dateWidget';
import { AmountWidget } from '../pages/adf/process-services/widgets/amountWidget';
import { NumberWidget } from '../pages/adf/process-services/widgets/numberWidget';
import TestConfig = require('../test.config');
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
@@ -31,9 +27,7 @@ describe('Form Component', () => {
const loginPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
const formPage = new FormPage();
const dateWidget = new DateWidget();
const amountWidget = new AmountWidget();
const numberWidget = new NumberWidget();
const widget = new Widget();
let tenantId, user;
@@ -85,27 +79,27 @@ describe('Form Component', () => {
});
it('[C286505] Should be able to display errors under the Error Log section', () => {
numberWidget.getNumberFieldLabel(fields.numberWidgetId);
numberWidget.setFieldValue(fields.numberWidgetId, message.test);
widget.numberWidget().getNumberFieldLabel(fields.numberWidgetId);
widget.numberWidget().setFieldValue(fields.numberWidgetId, message.test);
formPage.checkErrorMessageForWidgetIsDisplayed(message.warningNumberAndAmount);
formPage.checkErrorLogMessage(message.errorLogNumber);
dateWidget.checkLabelIsVisible(fields.dateWidgetId);
dateWidget.setDateInput(fields.dateWidgetId, message.test);
dateWidget.clickOutsideWidget(fields.dateWidgetId);
widget.dateWidget().checkLabelIsVisible(fields.dateWidgetId);
widget.dateWidget().setDateInput(fields.dateWidgetId, message.test);
widget.dateWidget().clickOutsideWidget(fields.dateWidgetId);
formPage.checkErrorMessageForWidgetIsDisplayed(message.warningDate);
formPage.checkErrorLogMessage(message.errorLogDate);
amountWidget.getAmountFieldLabel(fields.amountWidgetId);
amountWidget.setFieldValue(fields.amountWidgetId, message.test);
widget.amountWidget().getAmountFieldLabel(fields.amountWidgetId);
widget.amountWidget().setFieldValue(fields.amountWidgetId, message.test);
formPage.checkErrorMessageForWidgetIsDisplayed(message.warningNumberAndAmount);
formPage.checkErrorLogMessage(message.errorLogAmount);
amountWidget.removeFromAmountWidget(fields.amountWidgetId);
widget.amountWidget().removeFromAmountWidget(fields.amountWidgetId);
formPage.checkErrorMessageIsNotDisplayed(message.errorLogAmount);
dateWidget.clearDateInput(fields.dateWidgetId);
numberWidget.clearFieldValue(fields.numberWidgetId);
widget.dateWidget().clearDateInput(fields.dateWidgetId);
widget.numberWidget().clearFieldValue(fields.numberWidgetId);
formPage.checkErrorMessageForWidgetIsNotDisplayed(message.warningDate);
formPage.checkErrorMessageIsNotDisplayed(message.errorLogDate);
formPage.checkErrorLogMessage(message.errorLabel);
@@ -15,9 +15,8 @@
* limitations under the License.
*/
import { LoginPage } from '@alfresco/adf-testing';
import { LoginPage, Widget } from '@alfresco/adf-testing';
import { ProcessFiltersPage } from '../pages/adf/process-services/processFiltersPage';
import { Widget } from '../pages/adf/process-services/widgets/widget';
import { StartProcessPage } from '../pages/adf/process-services/startProcessPage';
import { ProcessDetailsPage } from '../pages/adf/process-services/processDetailsPage';
import { TaskDetailsPage } from '../pages/adf/process-services/taskDetailsPage';
@@ -15,9 +15,8 @@
* limitations under the License.
*/
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../pages/adf/process-services/tasksPage';
import { Widget } from '../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../util/constants');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');
@@ -18,9 +18,8 @@
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { AppsActions } from '../../actions/APS/apps.actions';
import { UsersActions } from '../../actions/users.actions';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions, Widget } from '@alfresco/adf-testing';
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
import { Widget } from '../../pages/adf/process-services/widgets/widget';
import CONSTANTS = require('../../util/constants');
import TestConfig = require('../../test.config');
import resources = require('../../util/resources');