fix e2e tests and cleanup e2e typings (#5770)

* cleanup e2e typings

* fix e2e tests
This commit is contained in:
Denys Vuika
2020-06-10 20:37:21 +01:00
committed by GitHub
parent 98774395d2
commit 8025434de9
119 changed files with 1381 additions and 1384 deletions

View File

@@ -15,24 +15,23 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { DocumentListPage } from '../pages/document-list.page';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
import { DropdownPage } from '../../core/pages/material/dropdown.page';
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
export class ContentNodeSelectorDialogPage {
dialog: ElementFinder = element(by.css(`adf-content-node-selector`));
header: ElementFinder = this.dialog.element(by.css(`header[data-automation-id='content-node-selector-title']`));
searchInputElement: ElementFinder = this.dialog.element(by.css(`input[data-automation-id='content-node-selector-search-input']`));
searchLabel: ElementFinder = this.searchInputElement.element(by.xpath("ancestor::div[@class='mat-form-field-infix']/span/label"));
selectedRow: ElementFinder = this.dialog.element(by.css(`adf-datatable-row[class*="adf-is-selected"]`));
cancelButton: ElementFinder = element(by.css(`button[data-automation-id='content-node-selector-actions-cancel']`));
moveCopyButton: ElementFinder = element(by.css(`button[data-automation-id='content-node-selector-actions-choose']`));
dialog = element(by.css(`adf-content-node-selector`));
header = this.dialog.element(by.css(`header[data-automation-id='content-node-selector-title']`));
searchInputElement = this.dialog.element(by.css(`input[data-automation-id='content-node-selector-search-input']`));
searchLabel = this.searchInputElement.element(by.xpath("ancestor::div[@class='mat-form-field-infix']/span/label"));
selectedRow = this.dialog.element(by.css(`adf-datatable-row[class*="adf-is-selected"]`));
cancelButton = element(by.css(`button[data-automation-id='content-node-selector-actions-cancel']`));
moveCopyButton = element(by.css(`button[data-automation-id='content-node-selector-actions-choose']`));
contentList: DocumentListPage = new DocumentListPage(this.dialog);
dataTable: DataTableComponentPage = this.contentList.dataTablePage();
contentList = new DocumentListPage(this.dialog);
dataTable = this.contentList.dataTablePage();
siteListDropdown = new DropdownPage(this.dialog.element(by.css(`mat-select[data-automation-id='site-my-files-option']`)));
async checkDialogIsDisplayed(): Promise<void> {
@@ -55,7 +54,7 @@ export class ContentNodeSelectorDialogPage {
return BrowserActions.getText(this.searchLabel);
}
async checkSelectedSiteIsDisplayed(siteName): Promise<void> {
async checkSelectedSiteIsDisplayed(siteName: string): Promise<void> {
await this.siteListDropdown.checkOptionIsSelected(siteName);
}
@@ -100,11 +99,11 @@ export class ContentNodeSelectorDialogPage {
await BrowserActions.clearSendKeys(this.searchInputElement, text);
}
async clickContentNodeSelectorResult(name): Promise<void> {
async clickContentNodeSelectorResult(name: string): Promise<void> {
await this.dataTable.clickRowByContent(name);
}
async doubleClickContentNodeSelectorResult(name): Promise<void> {
async doubleClickContentNodeSelectorResult(name: string): Promise<void> {
// First click to select from search mode and second click to actually open node
await this.dataTable.doubleClickRowByContent(name);
await this.dataTable.doubleClickRowByContent(name);

View File

@@ -15,11 +15,11 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
export class DownloadDialogPage {
cancelButton: ElementFinder = element(by.id(`cancel-button`));
cancelButton = element(by.id(`cancel-button`));
async clickCancelButton(): Promise<void> {
await BrowserActions.click(this.cancelButton);

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { by, element, ElementFinder, browser, Locator } from 'protractor';
import { by, element, ElementFinder, browser } from 'protractor';
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
@@ -23,11 +23,11 @@ import { BrowserActions } from '../../core/utils/browser-actions';
export class DocumentListPage {
rootElement: ElementFinder;
optionButton: Locator = by.css('button[data-automation-id*="action_menu_"]');
optionButton = by.css('button[data-automation-id*="action_menu_"]');
tableBody: ElementFinder;
dataTable: DataTableComponentPage;
constructor(rootElement: ElementFinder = element.all(by.css('adf-document-list')).first()) {
constructor(rootElement = element.all(by.css('adf-document-list')).first()) {
this.rootElement = rootElement;
this.dataTable = new DataTableComponentPage(this.rootElement);
this.tableBody = rootElement.all(by.css('div[class="adf-datatable-body"]')).first();
@@ -67,7 +67,7 @@ export class DocumentListPage {
async clickOnActionMenu(content: string): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
const row: ElementFinder = this.dataTable.getRow('Display name', content);
const row = this.dataTable.getRow('Display name', content);
await BrowserActions.click(row.element(this.optionButton));
await BrowserActions.waitUntilActionMenuIsVisible();
await browser.sleep(500);

View File

@@ -22,8 +22,8 @@ import { BrowserVisibility } from '../../../core/utils/browser-visibility';
export class SearchRadioPage {
filter: ElementFinder;
showMoreButton: ElementFinder = element(by.css('adf-search-radio button[title="Show more"]'));
showLessButton: ElementFinder = element(by.css('adf-search-radio button[title="Show less"]'));
showMoreButton = element(by.css('adf-search-radio button[title="Show more"]'));
showLessButton = element(by.css('adf-search-radio button[title="Show less"]'));
constructor(filter: ElementFinder) {
this.filter = filter;

View File

@@ -15,15 +15,15 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
export class EditJsonDialog {
dialog: ElementFinder = element(by.css(`.adf-edit-json-dialog`));
closeButton: ElementFinder = element(by.cssContainingText(`button span`, 'Close'));
dialogContent: ElementFinder = this.dialog.element(by.css(`mat-dialog-content textarea`));
dialog = element(by.css(`.adf-edit-json-dialog`));
closeButton = element(by.cssContainingText(`button span`, 'Close'));
dialogContent = this.dialog.element(by.css(`mat-dialog-content textarea`));
async checkDialogIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { DataTableComponentPage } from './data-table-component.page';
@@ -47,23 +47,23 @@ export class AboutPage {
version: 'version'
};
appTitle: ElementFinder = element(by.css('[data-automation-id="adf-github-app-title"]'));
sourceCodeTitle: ElementFinder = element(by.css('[data-automation-id="adf-github-source-code-title"]'));
githubUrl: ElementFinder = element(by.css('[data-automation-id="adf-github-url"]'));
githubVersion: ElementFinder = element(by.css('[data-automation-id="adf-github-version"]'));
bpmHost: ElementFinder = element(by.css('[data-automation-id="adf-process-service-host"]'));
ecmHost: ElementFinder = element(by.css('[data-automation-id="adf-content-service-host"]'));
productVersionTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-product-version-title"]'));
bpmEdition: ElementFinder = element(by.css('[data-automation-id="adf-about-bpm-edition"]'));
ecmEdition: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-edition"]'));
bpmVersion: ElementFinder = element(by.css('[data-automation-id="adf-about-bpm-version"]'));
ecmVersion: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-version"]'));
ecmStatusTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-status-title"]'));
ecmLicenseTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-license-title"]'));
ecmModulesTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-modules-title"]'));
aboutModulesTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-modules-title"]'));
appTitle = element(by.css('[data-automation-id="adf-github-app-title"]'));
sourceCodeTitle = element(by.css('[data-automation-id="adf-github-source-code-title"]'));
githubUrl = element(by.css('[data-automation-id="adf-github-url"]'));
githubVersion = element(by.css('[data-automation-id="adf-github-version"]'));
bpmHost = element(by.css('[data-automation-id="adf-process-service-host"]'));
ecmHost = element(by.css('[data-automation-id="adf-content-service-host"]'));
productVersionTitle = element(by.css('[data-automation-id="adf-about-product-version-title"]'));
bpmEdition = element(by.css('[data-automation-id="adf-about-bpm-edition"]'));
ecmEdition = element(by.css('[data-automation-id="adf-about-ecm-edition"]'));
bpmVersion = element(by.css('[data-automation-id="adf-about-bpm-version"]'));
ecmVersion = element(by.css('[data-automation-id="adf-about-ecm-version"]'));
ecmStatusTitle = element(by.css('[data-automation-id="adf-about-ecm-status-title"]'));
ecmLicenseTitle = element(by.css('[data-automation-id="adf-about-ecm-license-title"]'));
ecmModulesTitle = element(by.css('[data-automation-id="adf-about-ecm-modules-title"]'));
aboutModulesTitle = element(by.css('[data-automation-id="adf-about-modules-title"]'));
dataTable: DataTableComponentPage = new DataTableComponentPage();
dataTable = new DataTableComponentPage();
getDataTable(): DataTableComponentPage {
return this.dataTable;

View File

@@ -15,15 +15,15 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserActions } from '../utils/browser-actions';
export class BreadcrumbPage {
breadcrumb: ElementFinder = element(by.css(`adf-breadcrumb nav[data-automation-id='breadcrumb']`));
currentItem: ElementFinder = element(by.css('.adf-breadcrumb-item-current'));
breadcrumb = element(by.css(`adf-breadcrumb nav[data-automation-id='breadcrumb']`));
currentItem = element(by.css('.adf-breadcrumb-item-current'));
async chooseBreadCrumb(breadCrumbItem): Promise<void> {
async chooseBreadCrumb(breadCrumbItem: string): Promise<void> {
const path = this.breadcrumb.element(by.css(`a[data-automation-id='breadcrumb_${breadCrumbItem}']`));
await BrowserActions.click(path);
}

View File

@@ -33,7 +33,7 @@ export class CardBooleanItemPage {
}
async checkLabelIsPresent(): Promise<void> {
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
const labelElement = this.rootElement.element(this.labelLocator);
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
}
}

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { element, by, ElementFinder, Locator } from 'protractor';
import { element, by, ElementFinder } from 'protractor';
import { DateTimePickerPage } from '../material/date-time-picker.page';
import { DatePickerPage } from '../material/date-picker.page';
@@ -25,10 +25,10 @@ export class CardDateItemPage {
dateTimePickerPage: DateTimePickerPage;
datePickerPage = new DatePickerPage();
labelLocator: Locator = by.css('div[data-automation-id*="card-date-label"]');
valueLocator: Locator = by.css('span[data-automation-id*="card-date"]');
dateTimePicker: ElementFinder = element.all(by.css('.mat-datetimepicker-toggle')).first();
saveButton: Locator = by.css('button[data-automation-id*="card-dateitem-update"]');
labelLocator = by.css('div[data-automation-id*="card-date-label"]');
valueLocator = by.css('span[data-automation-id*="card-date"]');
dateTimePicker = element.all(by.css('.mat-datetimepicker-toggle')).first();
saveButton = by.css('button[data-automation-id*="card-dateitem-update"]');
constructor(label: string = 'minDate') {
this.rootElement = element(by.xpath(`//div[contains(@data-automation-id, "label-${label}")]/ancestor::adf-card-view-dateitem`));

View File

@@ -31,7 +31,7 @@ export class CardSelectItemPage {
}
async checkLabelIsPresent(): Promise<void> {
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
const labelElement = this.rootElement.element(this.labelLocator);
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
}

View File

@@ -15,19 +15,19 @@
* limitations under the License.
*/
import { element, by, ElementFinder, Locator, Key } from 'protractor';
import { element, by, ElementFinder, Key } from 'protractor';
import { BrowserActions, BrowserVisibility } from '../../utils/public-api';
export class CardTextItemPage {
rootElement: ElementFinder;
textField: Locator = by.css('[data-automation-id*="card-textitem-value"]');
saveButton: Locator = by.css('button[data-automation-id*="card-textitem-update"]');
clearButton: Locator = by.css('button[data-automation-id*="card-textitem-reset"]');
field: Locator = by.css('[data-automation-id*="card-textitem-value"]');
labelLocator: Locator = by.css('div[data-automation-id*="card-textitem-label"]');
errorMessage: Locator = by.css('.adf-textitem-editable-error');
clickableElement: Locator = by.css('.adf-textitem-clickable');
readOnlyField: Locator = by.css('.adf-property-read-only');
textField = by.css('[data-automation-id*="card-textitem-value"]');
saveButton = by.css('button[data-automation-id*="card-textitem-update"]');
clearButton = by.css('button[data-automation-id*="card-textitem-reset"]');
field = by.css('[data-automation-id*="card-textitem-value"]');
labelLocator = by.css('div[data-automation-id*="card-textitem-label"]');
errorMessage = by.css('.adf-textitem-editable-error');
clickableElement = by.css('.adf-textitem-clickable');
readOnlyField = by.css('.adf-property-read-only');
constructor(label: string = 'assignee') {
this.rootElement = element(by.xpath(`//div[contains(@data-automation-id, "label-${label}")]/ancestor::adf-card-view-textitem`));
@@ -39,7 +39,7 @@ export class CardTextItemPage {
}
async checkLabelIsPresent(): Promise<void> {
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
const labelElement = this.rootElement.element(this.labelLocator);
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
}

View File

@@ -15,26 +15,26 @@
* limitations under the License.
*/
import { element, by, browser, ElementFinder } from 'protractor';
import { element, by, browser } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
export class ConfigEditorPage {
textField: ElementFinder = element(by.css('#adf-form-config-editor div.overflow-guard > textarea'));
textField = element(by.css('#adf-form-config-editor div.overflow-guard > textarea'));
async enterConfiguration(text): Promise<void> {
async enterConfiguration(text: string): Promise<void> {
await BrowserActions.clearSendKeys(this.textField, text);
}
async clickSaveButton(): Promise<void> {
const saveButton: ElementFinder = element(by.id('app-form-config-save'));
const saveButton = element(by.id('app-form-config-save'));
await BrowserActions.click(saveButton);
}
async clickClearButton(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.textField);
const clearButton: ElementFinder = element(by.id('app-form-config-clear'));
const clearButton = element(by.id('app-form-config-clear'));
await BrowserActions.click(clearButton);
}

View File

@@ -16,11 +16,11 @@
*/
import { BrowserActions } from '../utils/browser-actions';
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserVisibility } from '../public-api';
export class ContextMenuPage {
contextMenu: ElementFinder = element(by.id('adf-context-menu-content'));
contextMenu = element(by.id('adf-context-menu-content'));
async isContextMenuDisplayed(): Promise<boolean> {
try {

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { browser, by, element, Locator, protractor, ElementFinder, ElementArrayFinder } from 'protractor';
import { browser, by, element, protractor, ElementFinder, ElementArrayFinder } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
@@ -25,14 +25,14 @@ export class DataTableComponentPage {
list: ElementArrayFinder;
contents: ElementArrayFinder;
tableBody: ElementFinder;
rows: Locator = by.css(`adf-datatable div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`);
rows = by.css(`adf-datatable div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`);
allColumns: ElementArrayFinder;
selectedRowNumber: ElementFinder;
allSelectedRows: ElementArrayFinder;
selectAll: ElementFinder;
copyColumnTooltip: ElementFinder;
constructor(rootElement: ElementFinder = element.all(by.css('adf-datatable')).first()) {
constructor(rootElement = element.all(by.css('adf-datatable')).first()) {
this.rootElement = rootElement;
this.list = this.rootElement.all(by.css(`div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`));
this.contents = this.rootElement.all(by.css('div[class="adf-datatable-body"] span'));

View File

@@ -25,7 +25,7 @@ export class DataTableItem {
rootElement: ElementFinder;
rows: Locator = by.css(`div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`);
constructor(rootElement: ElementFinder = element.all(by.css('adf-datatable')).first()) {
constructor(rootElement = element.all(by.css('adf-datatable')).first()) {
this.rootElement = rootElement;
}

View File

@@ -16,14 +16,14 @@
*/
import { BrowserVisibility } from '../utils/browser-visibility';
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserActions } from '../utils/browser-actions';
export class ErrorPage {
errorPageCode: ElementFinder = element(by.css('adf-error-content .adf-error-content-code'));
errorPageTitle: ElementFinder = element(by.css('adf-error-content .adf-error-content-title'));
errorPageDescription: ElementFinder = element(by.css('adf-error-content .adf-error-content-description'));
errorPageCode = element(by.css('adf-error-content .adf-error-content-code'));
errorPageTitle = element(by.css('adf-error-content .adf-error-content-title'));
errorPageDescription = element(by.css('adf-error-content .adf-error-content-description'));
async checkErrorCode(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.errorPageCode);

View File

@@ -15,24 +15,24 @@
* limitations under the License.
*/
import { by, element, Locator, ElementFinder } from 'protractor';
import { by, element, ElementFinder } from 'protractor';
import { BrowserVisibility, BrowserActions } from '../../utils/public-api';
import { DropdownPage } from '../material/dropdown.page';
export class FormFields {
formContent: ElementFinder = element(by.css('adf-form-renderer'));
refreshButton: ElementFinder = element(by.css('div[class*="form-reload-button"] mat-icon'));
saveButton: ElementFinder = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
valueLocator: Locator = by.css('input');
labelLocator: Locator = by.css('label');
noFormMessage: ElementFinder = element(by.css('.adf-empty-content__title'));
noFormTemplate: ElementFinder = element(by.css('adf-empty-content'));
completedTaskNoFormMessage: ElementFinder = element(by.css('div[id*="completed-form-message"] p'));
attachFormButton: ElementFinder = element(by.id('adf-attach-form-attach-button'));
completeButton: ElementFinder = element(by.id('adf-form-complete'));
cancelButton: ElementFinder = element(by.css('#adf-no-form-cancel-button'));
errorMessage: Locator = by.css('.adf-error-text-container .adf-error-text');
formContent = element(by.css('adf-form-renderer'));
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('.adf-empty-content__title'));
noFormTemplate = element(by.css('adf-empty-content'));
completedTaskNoFormMessage = element(by.css('div[id*="completed-form-message"] p'));
attachFormButton = element(by.id('adf-attach-form-attach-button'));
completeButton = element(by.id('adf-form-complete'));
cancelButton = element(by.css('#adf-no-form-cancel-button'));
errorMessage = by.css('.adf-error-text-container .adf-error-text');
selectFormDropdown = new DropdownPage(element.all(by.css('adf-attach-form div[class*="mat-select-arrow"]')).first());
@@ -41,8 +41,8 @@ export class FormFields {
await BrowserActions.clearSendKeys(fieldElement, value);
}
async clickField(locator, field: string, fieldtext?: string): Promise<void> {
const fieldElement = fieldtext ? element(locator(field, fieldtext)) : element(locator(field));
async clickField(locator, field: string, fieldText?: string): Promise<void> {
const fieldElement = fieldText ? element(locator(field, fieldText)) : element(locator(field));
await BrowserActions.click(fieldElement);
}
@@ -61,12 +61,12 @@ export class FormFields {
await BrowserVisibility.waitUntilElementIsNotVisible(hiddenElement, 6000);
}
getWidget(fieldId): ElementFinder {
getWidget(fieldId: string): ElementFinder {
return element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
}
async getFieldValue(fieldId: string, valueLocatorParam?: any): Promise<string> {
const valueWidget: ElementFinder = await (await this.getWidget(fieldId)).element(valueLocatorParam || this.valueLocator);
const valueWidget = await (await this.getWidget(fieldId)).element(valueLocatorParam || this.valueLocator);
await BrowserVisibility.waitUntilElementIsVisible(valueWidget);
return valueWidget.getAttribute('value');
@@ -89,7 +89,7 @@ export class FormFields {
}
async getFieldPlaceHolder(fieldId: string, locator = 'input'): Promise<string> {
const placeHolderLocator: ElementFinder = element(by.css(`${locator}#${fieldId}`));
const placeHolderLocator = element(by.css(`${locator}#${fieldId}`));
await BrowserVisibility.waitUntilElementIsVisible(placeHolderLocator);
return placeHolderLocator.getAttribute('placeholder');
}
@@ -146,7 +146,7 @@ export class FormFields {
await BrowserActions.click(formNameElement);
}
async checkWidgetIsReadOnlyMode(fieldId): Promise<ElementFinder> {
async checkWidgetIsReadOnlyMode(fieldId: string): Promise<ElementFinder> {
const widget = element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
const widgetReadOnly = widget.element(by.css('div[class*="adf-readonly"]'));
await BrowserVisibility.waitUntilElementIsVisible(widgetReadOnly);

View File

@@ -15,29 +15,29 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserVisibility } from '../../utils/browser-visibility';
import { BrowserActions } from '../../utils/public-api';
export class FormPage {
errorLog: ElementFinder = element(by.css('div[class*="console"]'));
saveButton: ElementFinder = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
errorLog = element(by.css('div[class*="console"]'));
saveButton = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
async checkErrorMessageForWidgetIsDisplayed(errorMessage): Promise<void> {
async checkErrorMessageForWidgetIsDisplayed(errorMessage: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('.adf-error-text', errorMessage)));
}
async checkErrorMessageForWidgetIsNotDisplayed(errorMessage): Promise<void> {
async checkErrorMessageForWidgetIsNotDisplayed(errorMessage: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('.adf-error-text', errorMessage)));
}
async checkErrorLogMessage(errorMessage): Promise<void> {
async checkErrorLogMessage(errorMessage: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.errorLog);
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
}
async checkErrorMessageIsNotDisplayed(errorMessage): Promise<void> {
async checkErrorMessageIsNotDisplayed(errorMessage: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.errorLog);
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
}

View File

@@ -18,20 +18,20 @@
import { FormFields } from '../form-fields';
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
import * as remote from 'selenium-webdriver/remote';
import { element, by, browser, ElementFinder } from 'protractor';
import { element, by, browser } from 'protractor';
export class AttachFileWidgetPage {
formFields: FormFields = new FormFields();
formFields = new FormFields();
uploadLocator = by.css('button[id="attachfile"]');
localStorageButton: ElementFinder = element(by.css('input[id="attachfile"]'));
localStorageButton = element(by.css('input[id="attachfile"]'));
filesListLocator = by.css('div[id="adf-attach-widget-readonly-list"]');
attachFileWidget: ElementFinder = element(by.css('#attachfile'));
attachedFileMenu: ElementFinder = element(by.css('mat-list-item button'));
attachedFileOptions: ElementFinder = element(by.css('.mat-menu-panel .mat-menu-content'));
viewFileOptionButton: ElementFinder = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="show-file"]`));
downloadFileOptionButton: ElementFinder = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="download-file"]`));
removeFileOptionButton: ElementFinder = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="remove"]`));
attachFileWidget = element(by.css('#attachfile'));
attachedFileMenu = element(by.css('mat-list-item button'));
attachedFileOptions = element(by.css('.mat-menu-panel .mat-menu-content'));
viewFileOptionButton = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="show-file"]`));
downloadFileOptionButton = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="download-file"]`));
removeFileOptionButton = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="remove"]`));
async attachFile(fieldId, fileLocation): Promise<void> {
browser.setFileDetector(new remote.FileDetector());
@@ -48,7 +48,7 @@ export class AttachFileWidgetPage {
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
}
async viewFile(name): Promise<void> {
async viewFile(name: string): Promise<void> {
const fileView = element(this.filesListLocator).element(by.cssContainingText('mat-list-item span ', name));
await BrowserActions.click(fileView);
await browser.actions().doubleClick(fileView).perform();

View File

@@ -17,34 +17,34 @@
import { FormFields } from '../form-fields';
import { BrowserActions, BrowserVisibility } from '../../../utils/public-api';
import { by, element, Locator, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
export class CheckboxWidgetPage {
formFields: FormFields = new FormFields();
checkboxLabel: ElementFinder = element(by.css('span[class*="mat-checkbox-label"]'));
checkboxLocator: Locator = by.css('mat-checkbox');
formFields = new FormFields();
checkboxLabel = element(by.css('span[class*="mat-checkbox-label"]'));
checkboxLocator = by.css('mat-checkbox');
getCheckboxLabel(): Promise<string> {
return BrowserActions.getText(this.checkboxLabel);
}
async clickCheckboxInput(fieldId): Promise<void> {
async clickCheckboxInput(fieldId: string): Promise<void> {
const checkboxInput = element.all(by.css(`mat-checkbox[id="${fieldId}"] div`)).first();
await BrowserActions.click(checkboxInput);
}
async isCheckboxDisplayed(fieldId): Promise<void> {
async isCheckboxDisplayed(fieldId: string): Promise<void> {
await this.formFields.checkWidgetIsVisible(fieldId);
}
async isCheckboxHidden(fieldId): Promise<void> {
async isCheckboxHidden(fieldId: string): Promise<void> {
await this.formFields.checkWidgetIsHidden(fieldId);
}
async isCheckboxChecked(fieldId): Promise<boolean> {
async isCheckboxChecked(fieldId: string): Promise<boolean> {
let isChecked: boolean = false;
const checkboxWidget: ElementFinder = await (await this.formFields.getWidget(fieldId)).element(this.checkboxLocator);
const checkboxWidget = await (await this.formFields.getWidget(fieldId)).element(this.checkboxLocator);
await BrowserVisibility.waitUntilElementIsVisible(checkboxWidget);
await checkboxWidget.getAttribute('class').then((attributeValue) => {
isChecked = attributeValue.includes('mat-checkbox-checked');

View File

@@ -16,13 +16,13 @@
*/
import { FormFields } from '../form-fields';
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
export class DateTimeWidgetPage {
formFields: FormFields = new FormFields();
outsideLayer: ElementFinder = element(by.css('div[class*="cdk-overlay-container"]'));
formFields = new FormFields();
outsideLayer = element(by.css('div[class*="cdk-overlay-container"]'));
async checkWidgetIsVisible(fieldId): Promise<void> {
await this.formFields.checkWidgetIsVisible(fieldId);
@@ -46,34 +46,34 @@ export class DateTimeWidgetPage {
await BrowserActions.click(this.outsideLayer);
}
async getErrorMessage(fieldId): Promise<string> {
async getErrorMessage(fieldId: string): Promise<string> {
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
return BrowserActions.getText(errorMessage);
}
async selectDay(day): Promise<void> {
async selectDay(day: string): Promise<void> {
const selectedDay = element(by.cssContainingText('div[class*="mat-datetimepicker-calendar-body-cell-content"]', day));
await BrowserActions.click(selectedDay);
}
async openDatepicker(fieldId): Promise<void> {
async openDatepicker(fieldId: string): Promise<void> {
await BrowserActions.click(element(by.id(fieldId)));
}
async selectTime(time): Promise<void> {
async selectTime(time: string): Promise<void> {
const selectedTime = element.all(by.cssContainingText('div[class*="mat-datetimepicker-clock-cell"]', time)).first();
await BrowserActions.click(selectedTime);
}
async selectHour(hour): Promise<void> {
async selectHour(hour: string): Promise<void> {
return this.selectTime(hour);
}
async selectMinute(minute): Promise<void> {
async selectMinute(minute: string): Promise<void> {
return this.selectTime(minute);
}
async getPlaceholder(fieldId): Promise<string> {
async getPlaceholder(fieldId: string): Promise<string> {
return this.formFields.getFieldPlaceHolder(fieldId);
}
@@ -83,7 +83,7 @@ export class DateTimeWidgetPage {
await BrowserActions.clearWithBackSpace(amountWidgetInput);
}
async clearDateTimeInput(fieldId): Promise<void> {
async clearDateTimeInput(fieldId: string): Promise<void> {
const dateInput = element(by.id(fieldId));
await BrowserVisibility.waitUntilElementIsVisible(dateInput);
await dateInput.clear();

View File

@@ -16,25 +16,25 @@
*/
import { FormFields } from '../form-fields';
import { by, element, ElementArrayFinder, ElementFinder, Locator, protractor } from 'protractor';
import { by, element, protractor } from 'protractor';
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
export class DynamicTableWidgetPage {
formFields: FormFields = new FormFields();
formFields = new FormFields();
labelLocator: Locator = by.css('dynamic-table-widget div div');
columnNameLocator: Locator = by.css('table[id*="dynamic-table"] th');
cancelButton: ElementFinder = element(by.cssContainingText('button span', 'Cancel'));
editButton: ElementFinder = element(by.cssContainingText('button span', 'edit'));
columnDateTime: ElementFinder = element(by.id('columnDateTime'));
columnDate: ElementFinder = element(by.id('columnDate'));
calendarHeader: ElementFinder = element(by.css('div[class="mat-datetimepicker-calendar-header-date-time"]'));
calendarContent: ElementFinder = element(by.css('div[class="mat-datetimepicker-calendar-content"]'));
saveButton: ElementFinder = element(by.cssContainingText('button span', 'Save'));
errorMessage: ElementFinder = element(by.css('div[class="adf-error-text"]'));
dateWidget: ElementFinder = element.all(by.css('mat-datepicker-toggle button')).first();
tableRow: ElementArrayFinder = element.all(by.css('tbody tr'));
labelLocator = by.css('dynamic-table-widget div div');
columnNameLocator = by.css('table[id*="dynamic-table"] th');
cancelButton = element(by.cssContainingText('button span', 'Cancel'));
editButton = element(by.cssContainingText('button span', 'edit'));
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'));
getFieldLabel(fieldId): Promise<string> {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
@@ -63,7 +63,7 @@ export class DynamicTableWidgetPage {
}
async setDatatableInput(text, id = 'id'): Promise<void> {
const dataTableInput: ElementFinder = element(by.id(id));
const dataTableInput = element(by.id(id));
await BrowserVisibility.waitUntilElementIsVisible(dataTableInput);
await BrowserActions.clearSendKeys(dataTableInput, text);
}

View File

@@ -16,25 +16,25 @@
*/
import { FormFields } from '../form-fields';
import { by, element, ElementFinder, Locator } from 'protractor';
import { by, element } from 'protractor';
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
export class GroupWidgetPage {
groupField: ElementFinder = element(by.css('input[data-automation-id="adf-group-search-input"]'));
firstResult: ElementFinder = element(by.id('adf-group-widget-user-0'));
formFields: FormFields = new FormFields();
groupDropDownList: Locator = by.css('.mat-autocomplete-panel');
groupField = element(by.css('input[data-automation-id="adf-group-search-input"]'));
firstResult = element(by.id('adf-group-widget-user-0'));
formFields = new FormFields();
groupDropDownList = by.css('.mat-autocomplete-panel');
getFieldLabel(fieldId): Promise<string> {
getFieldLabel(fieldId: string): Promise<string> {
return this.formFields.getFieldLabel(fieldId);
}
getFieldValue(fieldId): Promise<string> {
getFieldValue(fieldId: string): Promise<string> {
return this.formFields.getFieldValue(fieldId);
}
getFieldText(fieldId): Promise<string> {
getFieldText(fieldId: string): Promise<string> {
return this.formFields.getFieldText(fieldId);
}

View File

@@ -16,31 +16,31 @@
*/
import { FormFields } from '../form-fields';
import { by, element, ElementFinder, Locator } from 'protractor';
import { by, element } from 'protractor';
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
export class PeopleWidgetPage {
peopleField: ElementFinder = element(by.css('input[data-automation-id="adf-people-search-input"]'));
firstResult: ElementFinder = element(by.id('adf-people-widget-user-0'));
formFields: FormFields = new FormFields();
labelLocator: Locator = by.css('div[class*="display-text-widget"]');
inputLocator: Locator = by.id('involvepeople');
peopleDropDownList: Locator = by.css('div[class*="adf-people-widget-list"]');
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): Promise<string> {
getFieldLabel(fieldId: string): Promise<string> {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
getFieldValue(fieldId): Promise<string> {
getFieldValue(fieldId: string): Promise<string> {
return this.formFields.getFieldValue(fieldId, this.inputLocator);
}
getFieldText(fieldId): Promise<string> {
getFieldText(fieldId: string): Promise<string> {
return this.formFields.getFieldText(fieldId, this.labelLocator);
}
insertUser(fieldId, value): Promise<void> {
insertUser(fieldId: string, value: string): Promise<void> {
return this.formFields.setValueInInputById(fieldId, value);
}
@@ -48,12 +48,12 @@ export class PeopleWidgetPage {
await BrowserVisibility.waitUntilElementIsVisible(element(this.peopleDropDownList));
}
async checkUserIsListed(userName): Promise<void> {
async checkUserIsListed(userName: string): Promise<void> {
const user = element(by.cssContainingText('.adf-people-label-name', userName));
await BrowserVisibility.waitUntilElementIsVisible(user);
}
async selectUserFromDropDown(userName): Promise<void> {
async selectUserFromDropDown(userName: string): Promise<void> {
const user = element(by.cssContainingText('.adf-people-label-name', userName));
await BrowserActions.click(user);
}

View File

@@ -16,29 +16,29 @@
*/
import { FormFields } from '../form-fields';
import { by, element, ElementFinder, Locator } from 'protractor';
import { by, element } from 'protractor';
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
export class TypeaheadWidgetPage {
field: ElementFinder = element(by.css('input[data-automation-id="adf-typeahed-search-input"]'));
firstResult: ElementFinder = element(by.id('adf-typeahed-widget-user-0'));
formFields: FormFields = new FormFields();
groupDropDownList: Locator = by.css('.mat-autocomplete-panel');
field = element(by.css('input[data-automation-id="adf-typeahed-search-input"]'));
firstResult = element(by.id('adf-typeahed-widget-user-0'));
formFields = new FormFields();
groupDropDownList = by.css('.mat-autocomplete-panel');
getFieldLabel(fieldId): Promise<string> {
getFieldLabel(fieldId: string): Promise<string> {
return this.formFields.getFieldLabel(fieldId);
}
getFieldValue(fieldId): Promise<string> {
getFieldValue(fieldId: string): Promise<string> {
return this.formFields.getFieldValue(fieldId);
}
getFieldText(fieldId): Promise<string> {
getFieldText(fieldId: string): Promise<string> {
return this.formFields.getFieldText(fieldId);
}
insertValue(fieldId, value): Promise<void> {
insertValue(fieldId: string, value: string): Promise<void> {
return this.formFields.setValueInInputById(fieldId, value);
}
@@ -46,7 +46,7 @@ export class TypeaheadWidgetPage {
await BrowserVisibility.waitUntilElementIsVisible(element(this.groupDropDownList));
}
async checkOptionIsListed(option): Promise<void> {
async checkOptionIsListed(option: string): Promise<void> {
const optionElement = element(by.cssContainingText('[id="adf-typeahed-label-name"]', option));
await BrowserVisibility.waitUntilElementIsVisible(optionElement);
}
@@ -57,7 +57,7 @@ export class TypeaheadWidgetPage {
return element.all(option).map((elementFinder) => elementFinder.getText());
}
async selectOptionFromDropDown(userName): Promise<void> {
async selectOptionFromDropDown(userName: string): Promise<void> {
const option = element(by.cssContainingText('[id="adf-typeahed-label-name"]', userName));
await BrowserActions.click(option);
}
@@ -66,7 +66,7 @@ export class TypeaheadWidgetPage {
await BrowserVisibility.waitUntilElementIsVisible(this.field);
}
async fillTypeaheadField(value): Promise<void> {
async fillTypeaheadField(value: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsClickable(this.field);
await BrowserActions.clearSendKeys(this.field, value);
}

View File

@@ -15,23 +15,23 @@
* limitations under the License.
*/
import { element, by, protractor, browser, ElementFinder } from 'protractor';
import { element, by, protractor, browser } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
export class HeaderPage {
checkBox: ElementFinder = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
headerColor: ElementFinder = element(by.css('option[value="primary"]'));
titleInput: ElementFinder = element(by.css('input[name="title"]'));
iconInput: ElementFinder = element(by.css('input[placeholder="URL path"]'));
hexColorInput: ElementFinder = element(by.css('input[placeholder="hex color code"]'));
logoHyperlinkInput: ElementFinder = element(by.css('input[placeholder="Redirect URL"]'));
logoTooltipInput: ElementFinder = element(by.css('input[placeholder="Tooltip text"]'));
positionStart: ElementFinder = element.all(by.css('mat-radio-button[value="start"]')).first();
positionEnd: ElementFinder = element.all(by.css('mat-radio-button[value="end"]')).first();
sideBarPositionRight: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
sideBarPositionLeft: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
checkBox = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
headerColor = element(by.css('option[value="primary"]'));
titleInput = element(by.css('input[name="title"]'));
iconInput = element(by.css('input[placeholder="URL path"]'));
hexColorInput = element(by.css('input[placeholder="hex color code"]'));
logoHyperlinkInput = element(by.css('input[placeholder="Redirect URL"]'));
logoTooltipInput = element(by.css('input[placeholder="Tooltip text"]'));
positionStart = element.all(by.css('mat-radio-button[value="start"]')).first();
positionEnd = element.all(by.css('mat-radio-button[value="end"]')).first();
sideBarPositionRight = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
sideBarPositionLeft = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox);
@@ -54,28 +54,28 @@ export class HeaderPage {
await BrowserActions.click(checkBox);
}
async changeHeaderColor(color): Promise<void> {
async changeHeaderColor(color: string): Promise<void> {
const headerColor = element(by.css('option[value="' + color + '"]'));
await BrowserActions.click(headerColor);
}
async checkAppTitle(name): Promise<void> {
async checkAppTitle(name: string): Promise<void> {
const title = element(by.cssContainingText('.adf-app-title', name));
await BrowserVisibility.waitUntilElementIsVisible(title);
}
async addTitle(title): Promise<void> {
async addTitle(title: string): Promise<void> {
await BrowserActions.click(this.titleInput);
await BrowserActions.clearSendKeys(this.titleInput, title);
await this.titleInput.sendKeys(protractor.Key.ENTER);
}
async checkIconIsDisplayed(url): Promise<void> {
async checkIconIsDisplayed(url: string): Promise<void> {
const icon = element(by.css('img[src="' + url + '"]'));
await BrowserVisibility.waitUntilElementIsVisible(icon);
}
async addIcon(url): Promise<void> {
async addIcon(url: string): Promise<void> {
await BrowserActions.click(this.iconInput);
await BrowserActions.clearSendKeys(this.iconInput, url);
await this.iconInput.sendKeys(protractor.Key.ENTER);
@@ -93,19 +93,19 @@ export class HeaderPage {
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput);
}
async addHexCodeColor(hexCode): Promise<void> {
async addHexCodeColor(hexCode: string): Promise<void> {
await BrowserActions.click(this.hexColorInput);
await BrowserActions.clearSendKeys(this.hexColorInput, hexCode);
await this.hexColorInput.sendKeys(protractor.Key.ENTER);
}
async addLogoHyperlink(hyperlink): Promise<void> {
async addLogoHyperlink(hyperlink: string): Promise<void> {
await BrowserActions.click(this.logoHyperlinkInput);
await BrowserActions.clearSendKeys(this.logoHyperlinkInput, hyperlink);
await this.logoHyperlinkInput.sendKeys(protractor.Key.ENTER);
}
async addLogoTooltip(tooltip): Promise<void> {
async addLogoTooltip(tooltip: string): Promise<void> {
await BrowserActions.click(this.logoTooltipInput);
await BrowserActions.clearSendKeys(this.logoTooltipInput, tooltip);
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER);

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { element, by, browser, protractor, ElementFinder } from 'protractor';
import { element, by, browser, protractor } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
import { LocalStorageUtil } from '../utils/local-storage.util';
@@ -29,9 +29,9 @@ export class LoginSSOPage {
header = element(by.tagName('adf-layout-header'));
loginError = element(by.css(`div[data-automation-id="login-error"]`));
txtUsernameBasicAuth: ElementFinder = element(by.css('input[id="username"]'));
txtPasswordBasicAuth: ElementFinder = element(by.css('input[id="password"]'));
signInButtonBasicAuth: ElementFinder = element(by.id('login-button'));
txtUsernameBasicAuth = element(by.css('input[id="username"]'));
txtPasswordBasicAuth = element(by.css('input[id="password"]'));
signInButtonBasicAuth = element(by.id('login-button'));
async goToLoginPage(): Promise<void> {
let currentUrl;
@@ -95,11 +95,11 @@ export class LoginSSOPage {
await BrowserActions.click(this.signInButtonBasicAuth);
}
async enterUsernameBasicAuth(username): Promise<void> {
async enterUsernameBasicAuth(username: string): Promise<void> {
await BrowserActions.clearSendKeys(this.txtUsernameBasicAuth, username);
}
async enterPasswordBasicAuth(password): Promise<void> {
async enterPasswordBasicAuth(password: string): Promise<void> {
await BrowserActions.clearSendKeys(this.txtPasswordBasicAuth, password);
}

View File

@@ -15,17 +15,17 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { DateUtil } from '../../utils/date-util';
import { BrowserVisibility } from '../../utils/browser-visibility';
import { BrowserActions } from '../../utils/browser-actions';
export class DatePickerCalendarPage {
datePicker: ElementFinder = element(by.css('mat-calendar'));
nextMonthButton: ElementFinder = element(by.css('button[class*="mat-calendar-next-button"]'));
previousMonthButton: ElementFinder = element(by.css('button[class*="mat-calendar-previous-button"]'));
todayDate: ElementFinder = element(by.css('.mat-calendar-body-today'));
datePicker = element(by.css('mat-calendar'));
nextMonthButton = element(by.css('button[class*="mat-calendar-next-button"]'));
previousMonthButton = element(by.css('button[class*="mat-calendar-previous-button"]'));
todayDate = element(by.css('.mat-calendar-body-today'));
async getSelectedDate(): Promise<string> {
return element(by.css('td[class*="mat-calendar-body-active"]')).getAttribute('aria-label');

View File

@@ -15,13 +15,13 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserActions } from '../../utils/browser-actions';
import { DatePickerCalendarPage } from './date-picker-calendar.page';
export class DatePickerPage {
datePicker: ElementFinder = element.all(by.css('.mat-datepicker-toggle')).first();
datePicker = element.all(by.css('.mat-datepicker-toggle')).first();
dateTime = new DatePickerCalendarPage();
async setTodayDateValue(): Promise<void> {

View File

@@ -15,21 +15,21 @@
* limitations under the License.
*/
import { element, by, ElementFinder, Locator } from 'protractor';
import { element, by } from 'protractor';
import { BrowserVisibility } from '../../utils/browser-visibility';
import { BrowserActions } from '../../utils/browser-actions';
export class DateTimePickerCalendarPage {
datePicker: ElementFinder = element(by.css(`.mat-datetimepicker-calendar`));
today: ElementFinder = element(by.css(`.mat-datetimepicker-calendar-body-today`));
timePicker: ElementFinder = element(by.css('.mat-datetimepicker-clock'));
hourTime: ElementFinder = element.all(by.css('.mat-datetimepicker-clock-hours .mat-datetimepicker-clock-cell')).first();
minutesTime: ElementFinder = element.all(by.css('.mat-datetimepicker-clock-minutes .mat-datetimepicker-clock-cell')).first();
firstEnabledHourSelector: Locator = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
firstEnabledMinutesSelector: Locator = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
hoursPicker: ElementFinder = element(by.css('.mat-datetimepicker-clock-hours'));
minutePicker: ElementFinder = element(by.css('.mat-datetimepicker-clock-minutes'));
datePicker = element(by.css(`.mat-datetimepicker-calendar`));
today = element(by.css(`.mat-datetimepicker-calendar-body-today`));
timePicker = element(by.css('.mat-datetimepicker-clock'));
hourTime = element.all(by.css('.mat-datetimepicker-clock-hours .mat-datetimepicker-clock-cell')).first();
minutesTime = element.all(by.css('.mat-datetimepicker-clock-minutes .mat-datetimepicker-clock-cell')).first();
firstEnabledHourSelector = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
firstEnabledMinutesSelector = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
hoursPicker = element(by.css('.mat-datetimepicker-clock-hours'));
minutePicker = element(by.css('.mat-datetimepicker-clock-minutes'));
async waitTillDateDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.datePicker);

View File

@@ -22,7 +22,7 @@ import { DateTimePickerCalendarPage } from './date-time-picker-calendar.page';
export class DateTimePickerPage {
rootElement: ElementFinder;
dateTimePicker: ElementFinder = element(by.css('.mat-datetimepicker-toggle'));
dateTimePicker = element(by.css('.mat-datetimepicker-toggle'));
dateTime = new DateTimePickerCalendarPage();
constructor(rootElement?: ElementFinder) {

View File

@@ -23,7 +23,7 @@ export class DropdownPage {
dropDownElement: ElementFinder;
constructor(dropDownElement: ElementFinder = element.all(by.css('div[class="mat-select-arrow-wrapper"]')).first()) {
constructor(dropDownElement = element.all(by.css('div[class="mat-select-arrow-wrapper"]')).first()) {
this.dropDownElement = dropDownElement;
}
@@ -58,8 +58,8 @@ export class DropdownPage {
await BrowserVisibility.waitUntilElementIsVisible(selectedOption);
}
async selectOptionFromIndex(index): Promise<void> {
const value: ElementFinder = element.all(by.className('mat-option')).get(index);
async selectOptionFromIndex(index: number): Promise<void> {
const value = element.all(by.className('mat-option')).get(index);
await BrowserActions.click(value);
}

View File

@@ -15,13 +15,13 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { BrowserActions } from '../utils/browser-actions';
import { BrowserVisibility } from '../utils/browser-visibility';
export class NotificationHistoryPage {
notificationList: ElementFinder = element(by.css('#adf-notification-history-list'));
notificationList = element(by.css('#adf-notification-history-list'));
async clickNotificationButton(): Promise<void> {
await BrowserActions.clickExecuteScript('#adf-notification-history-open-button');

View File

@@ -15,28 +15,28 @@
* limitations under the License.
*/
import { browser, by, element, Locator, ElementFinder } from 'protractor';
import { browser, by, element } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
export class PaginationPage {
pageSelectorDropDown: ElementFinder = element(by.css('div[class*="adf-pagination__page-selector"]'));
pageSelectorArrow: ElementFinder = element(by.css('button[data-automation-id="page-selector"]'));
itemsPerPage: ElementFinder = element(by.css('span[class="adf-pagination__max-items"]'));
itemsPerPageOpenDropdown: ElementFinder = element(by.css('.adf-pagination__perpage-block button'));
itemsPerPageOptions: Locator = by.css('.adf-pagination__page-selector .mat-menu-item');
currentPage: ElementFinder = element(by.css('span[class="adf-pagination__current-page"]'));
totalPages: ElementFinder = element(by.css('span[class="adf-pagination__total-pages"]'));
paginationRange: ElementFinder = element(by.css('span[class="adf-pagination__range"]'));
nextPageButton: ElementFinder = element(by.css('button[class*="adf-pagination__next-button"]'));
nextButtonDisabled: ElementFinder = element(by.css('button[class*="adf-pagination__next-button"][disabled]'));
previousButtonDisabled: ElementFinder = element(by.css('button[class*="adf-pagination__previous-button"][disabled]'));
pageDropDown: ElementFinder = element(by.css('div[class*="adf-pagination__actualinfo-block"] button'));
pageDropDownOptions: Locator = by.css('div[class*="mat-menu-content"] button');
paginationSection: ElementFinder = element(by.css('adf-pagination'));
paginationSectionEmpty: ElementFinder = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
totalFiles: ElementFinder = element(by.css('span[class="adf-pagination__range"]'));
pageSelectorDropDown = element(by.css('div[class*="adf-pagination__page-selector"]'));
pageSelectorArrow = element(by.css('button[data-automation-id="page-selector"]'));
itemsPerPage = element(by.css('span[class="adf-pagination__max-items"]'));
itemsPerPageOpenDropdown = element(by.css('.adf-pagination__perpage-block button'));
itemsPerPageOptions = by.css('.adf-pagination__page-selector .mat-menu-item');
currentPage = element(by.css('span[class="adf-pagination__current-page"]'));
totalPages = element(by.css('span[class="adf-pagination__total-pages"]'));
paginationRange = element(by.css('span[class="adf-pagination__range"]'));
nextPageButton = element(by.css('button[class*="adf-pagination__next-button"]'));
nextButtonDisabled = element(by.css('button[class*="adf-pagination__next-button"][disabled]'));
previousButtonDisabled = element(by.css('button[class*="adf-pagination__previous-button"][disabled]'));
pageDropDown = element(by.css('div[class*="adf-pagination__actualinfo-block"] button'));
pageDropDownOptions = by.css('div[class*="mat-menu-content"] button');
paginationSection = element(by.css('adf-pagination'));
paginationSectionEmpty = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
totalFiles = element(by.css('span[class="adf-pagination__range"]'));
async selectItemsPerPage(numberOfItem: string): Promise<void> {
await browser.executeScript(`document.querySelector('div[class*="adf-pagination__perpage-block"] button').click();`);

View File

@@ -15,29 +15,29 @@
* limitations under the License.
*/
import { browser, by, element, ElementFinder } from 'protractor';
import { browser, by, element } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
import { DropdownPage } from '../../core/pages/material/dropdown.page';
export class SettingsPage {
settingsURL: string = browser.baseUrl + '/settings';
ecmText: ElementFinder = element(by.css('input[data-automation-id*="ecmHost"]'));
bpmText: ElementFinder = element(by.css('input[data-automation-id*="bpmHost"]'));
clientIdText: ElementFinder = element(by.css('input[id="clientId"]'));
authHostText: ElementFinder = element(by.css('input[id="oauthHost"]'));
logoutUrlText: ElementFinder = element(by.css('input[id="logout-url"]'));
basicAuthRadioButton: ElementFinder = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'Basic Authentication'));
identityHostText: ElementFinder = element(by.css('input[id="identityHost"]'));
ssoRadioButton: ElementFinder = element(by.cssContainingText('[id*="mat-radio"]', 'SSO'));
silentLoginToggleLabel: ElementFinder = element(by.css('mat-slide-toggle[name="silentLogin"] label'));
silentLoginToggleElement: ElementFinder = element(by.css('mat-slide-toggle[name="silentLogin"]'));
implicitFlowLabel: ElementFinder = element(by.css('mat-slide-toggle[name="implicitFlow"] label'));
implicitFlowElement: ElementFinder = element(by.css('mat-slide-toggle[name="implicitFlow"]'));
applyButton: ElementFinder = element(by.css('button[data-automation-id*="host-button"]'));
backButton: ElementFinder = element(by.cssContainingText('button span[class="mat-button-wrapper"]', 'Back'));
validationMessage: ElementFinder = element(by.cssContainingText('mat-error', 'This field is required'));
settingsURL = browser.baseUrl + '/settings';
ecmText = element(by.css('input[data-automation-id*="ecmHost"]'));
bpmText = element(by.css('input[data-automation-id*="bpmHost"]'));
clientIdText = element(by.css('input[id="clientId"]'));
authHostText = element(by.css('input[id="oauthHost"]'));
logoutUrlText = element(by.css('input[id="logout-url"]'));
basicAuthRadioButton = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'Basic Authentication'));
identityHostText = element(by.css('input[id="identityHost"]'));
ssoRadioButton = element(by.cssContainingText('[id*="mat-radio"]', 'SSO'));
silentLoginToggleLabel = element(by.css('mat-slide-toggle[name="silentLogin"] label'));
silentLoginToggleElement = element(by.css('mat-slide-toggle[name="silentLogin"]'));
implicitFlowLabel = element(by.css('mat-slide-toggle[name="implicitFlow"] label'));
implicitFlowElement = element(by.css('mat-slide-toggle[name="implicitFlow"]'));
applyButton = element(by.css('button[data-automation-id*="host-button"]'));
backButton = element(by.cssContainingText('button span[class="mat-button-wrapper"]', 'Back'));
validationMessage = element(by.cssContainingText('mat-error', 'This field is required'));
providerDropdown = new DropdownPage(element(by.css('mat-select[id="adf-provider-selector"]')));

View File

@@ -15,14 +15,14 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
export class SnackbarPage {
notificationSnackBar: ElementFinder = element.all(by.css('simple-snack-bar span')).first();
snackBarAction: ElementFinder = element(by.css('simple-snack-bar button span'));
notificationSnackBar = element.all(by.css('simple-snack-bar span')).first();
snackBarAction = element(by.css('simple-snack-bar button span'));
snackBarContainerCss = by.css('.mat-snack-bar-container');
async waitForSnackBarToAppear() {

View File

@@ -15,30 +15,30 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { TabsPage } from '../../core/pages/material/tabs.page';
import { BrowserActions } from '../utils/browser-actions';
export class UserInfoPage {
dialog: ElementFinder = element.all(by.css('mat-card[class*="adf-userinfo-card"]')).first();
userImage: ElementFinder = element(by.css('div[id="user-initial-image"]'));
userInfoEcmHeaderTitle: ElementFinder = element(by.css('div[id="ecm-username"]'));
userInfoEcmTitle: ElementFinder = element(by.css('mat-card-content span[id="ecm-full-name"]'));
ecmEmail: ElementFinder = element(by.css('span[id="ecm-email"]'));
ecmJobTitle: ElementFinder = element(by.css('span[id="ecm-job-title"]'));
userInfoProcessHeaderTitle: ElementFinder = element(by.css('div[id="bpm-username"]'));
userInfoProcessTitle: ElementFinder = element(by.css('mat-card-content span[id="bpm-full-name"]'));
processEmail: ElementFinder = element(by.css('span[id="bpm-email"]'));
processTenant: ElementFinder = element(by.css('span[class="detail-profile"]'));
apsImage: ElementFinder = element(by.css('img[id="bpm-user-detail-image"]'));
acsImage: ElementFinder = element(by.css('img[id="ecm-user-detail-image"]'));
initialImage: ElementFinder = element.all(by.css('div[id="user-initials-image"]')).first();
userInfoSsoHeaderTitle: ElementFinder = this.dialog.element(by.css('div[id="identity-username"]'));
userInfoSsoTitle: ElementFinder = element(by.css('.adf-userinfo__detail-title'));
ssoEmail: ElementFinder = element(by.id('identity-email'));
userProfileButton: ElementFinder = element(by.css('button[data-automation-id="adf-user-profile"]'));
dialog = element.all(by.css('mat-card[class*="adf-userinfo-card"]')).first();
userImage = element(by.css('div[id="user-initial-image"]'));
userInfoEcmHeaderTitle = element(by.css('div[id="ecm-username"]'));
userInfoEcmTitle = element(by.css('mat-card-content span[id="ecm-full-name"]'));
ecmEmail = element(by.css('span[id="ecm-email"]'));
ecmJobTitle = element(by.css('span[id="ecm-job-title"]'));
userInfoProcessHeaderTitle = element(by.css('div[id="bpm-username"]'));
userInfoProcessTitle = element(by.css('mat-card-content span[id="bpm-full-name"]'));
processEmail = element(by.css('span[id="bpm-email"]'));
processTenant = element(by.css('span[class="detail-profile"]'));
apsImage = element(by.css('img[id="bpm-user-detail-image"]'));
acsImage = element(by.css('img[id="ecm-user-detail-image"]'));
initialImage = element.all(by.css('div[id="user-initials-image"]')).first();
userInfoSsoHeaderTitle = this.dialog.element(by.css('div[id="identity-username"]'));
userInfoSsoTitle = element(by.css('.adf-userinfo__detail-title'));
ssoEmail = element(by.id('identity-email'));
userProfileButton = element(by.css('button[data-automation-id="adf-user-profile"]'));
tabsPage: TabsPage;
constructor() {

View File

@@ -19,95 +19,95 @@ import { BrowserActions } from '../utils/browser-actions';
import { TabsPage } from './material/tabs.page';
import { TogglePage } from './material/toggle.page';
import { BrowserVisibility } from '../utils/browser-visibility';
import { element, by, ElementFinder, browser, protractor } from 'protractor';
import { element, by, browser, protractor } from 'protractor';
export class ViewerPage {
tabsPage: TabsPage = new TabsPage();
togglePage: TogglePage = new TogglePage();
tabsPage = new TabsPage();
togglePage = new TogglePage();
closeButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-back"]'));
fileName: ElementFinder = element(by.id('adf-viewer-display-name'));
infoButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-sidebar"]'));
leftSideBarButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-left-sidebar"]'));
previousPageButton: ElementFinder = element(by.id('viewer-previous-page-button'));
nextPageButton: ElementFinder = element(by.id('viewer-next-page-button'));
zoomInButton: ElementFinder = element(by.id('viewer-zoom-in-button'));
zoomOutButton: ElementFinder = element(by.id('viewer-zoom-out-button'));
scalePageButton: ElementFinder = element(by.id('viewer-scale-page-button'));
fullScreenButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-fullscreen"]'));
rotateLeft: ElementFinder = element(by.css('button[id="viewer-rotate-left-button"]'));
rotateRight: ElementFinder = element(by.css('button[id="viewer-rotate-right-button"]'));
scaleImg: ElementFinder = element(by.css('button[id="viewer-reset-button"]'));
fileThumbnail: ElementFinder = element(by.css('img[data-automation-id="adf-file-thumbnail"]'));
pageSelectorInput: ElementFinder = element(by.css('input[data-automation-id="adf-page-selector"]'));
imgContainer: ElementFinder = element(by.css('div[data-automation-id="adf-image-container"]'));
mediaContainer: ElementFinder = element(by.css('adf-media-player[class="adf-media-player ng-star-inserted"]'));
percentage: ElementFinder = element(by.css('div[data-automation-id="adf-page-scale"'));
thumbnailsBtn: ElementFinder = element(by.css('button[data-automation-id="adf-thumbnails-button"]'));
thumbnailsContent: ElementFinder = element(by.css('div[data-automation-id="adf-thumbnails-content"]'));
thumbnailsClose: ElementFinder = element(by.css('button[data-automation-id="adf-thumbnails-close"]'));
secondThumbnail: ElementFinder = element(by.css('adf-pdf-thumb > img[title="Page 2"'));
lastThumbnailDisplayed: ElementFinder = element.all(by.css('adf-pdf-thumb')).last();
passwordDialog: ElementFinder = element(by.css('adf-pdf-viewer-password-dialog'));
passwordSubmit: ElementFinder = element(by.css('button[data-automation-id="adf-password-dialog-submit"]'));
passwordDialogClose: ElementFinder = element(by.css('button[data-automation-id="adf-password-dialog-close"]'));
passwordSubmitDisabled: ElementFinder = element(by.css('button[data-automation-id="adf-password-dialog-submit"][disabled]'));
passwordInput: ElementFinder = element(by.css('input[data-automation-id="adf-password-dialog-input"]'));
passwordError: ElementFinder = element(by.css('mat-error[data-automation-id="adf-password-dialog-error"]'));
infoSideBar: ElementFinder = element(by.id('adf-right-sidebar'));
leftSideBar: ElementFinder = element(by.id('adf-left-sidebar'));
viewer: ElementFinder = element(by.css('adf-viewer'));
pdfViewer: ElementFinder = element(by.css('adf-pdf-viewer'));
imgViewer: ElementFinder = element(by.css('adf-img-viewer'));
activeTab: ElementFinder = element(by.css('div[class*="mat-tab-label-active"]'));
toolbarSwitch: ElementFinder = element(by.id('adf-switch-toolbar'));
toolbar: ElementFinder = element(by.id('adf-viewer-toolbar'));
lastButton: ElementFinder = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
goBackSwitch: ElementFinder = element(by.id('adf-switch-goback'));
canvasLayer: ElementFinder = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
closeButton = element(by.css('button[data-automation-id="adf-toolbar-back"]'));
fileName = element(by.id('adf-viewer-display-name'));
infoButton = element(by.css('button[data-automation-id="adf-toolbar-sidebar"]'));
leftSideBarButton = element(by.css('button[data-automation-id="adf-toolbar-left-sidebar"]'));
previousPageButton = element(by.id('viewer-previous-page-button'));
nextPageButton = element(by.id('viewer-next-page-button'));
zoomInButton = element(by.id('viewer-zoom-in-button'));
zoomOutButton = element(by.id('viewer-zoom-out-button'));
scalePageButton = element(by.id('viewer-scale-page-button'));
fullScreenButton = element(by.css('button[data-automation-id="adf-toolbar-fullscreen"]'));
rotateLeft = element(by.css('button[id="viewer-rotate-left-button"]'));
rotateRight = element(by.css('button[id="viewer-rotate-right-button"]'));
scaleImg = element(by.css('button[id="viewer-reset-button"]'));
fileThumbnail = element(by.css('img[data-automation-id="adf-file-thumbnail"]'));
pageSelectorInput = element(by.css('input[data-automation-id="adf-page-selector"]'));
imgContainer = element(by.css('div[data-automation-id="adf-image-container"]'));
mediaContainer = element(by.css('adf-media-player[class="adf-media-player ng-star-inserted"]'));
percentage = element(by.css('div[data-automation-id="adf-page-scale"'));
thumbnailsBtn = element(by.css('button[data-automation-id="adf-thumbnails-button"]'));
thumbnailsContent = element(by.css('div[data-automation-id="adf-thumbnails-content"]'));
thumbnailsClose = element(by.css('button[data-automation-id="adf-thumbnails-close"]'));
secondThumbnail = element(by.css('adf-pdf-thumb > img[title="Page 2"'));
lastThumbnailDisplayed = element.all(by.css('adf-pdf-thumb')).last();
passwordDialog = element(by.css('adf-pdf-viewer-password-dialog'));
passwordSubmit = element(by.css('button[data-automation-id="adf-password-dialog-submit"]'));
passwordDialogClose = element(by.css('button[data-automation-id="adf-password-dialog-close"]'));
passwordSubmitDisabled = element(by.css('button[data-automation-id="adf-password-dialog-submit"][disabled]'));
passwordInput = element(by.css('input[data-automation-id="adf-password-dialog-input"]'));
passwordError = element(by.css('mat-error[data-automation-id="adf-password-dialog-error"]'));
infoSideBar = element(by.id('adf-right-sidebar'));
leftSideBar = element(by.id('adf-left-sidebar'));
viewer = element(by.css('adf-viewer'));
pdfViewer = element(by.css('adf-pdf-viewer'));
imgViewer = element(by.css('adf-img-viewer'));
activeTab = element(by.css('div[class*="mat-tab-label-active"]'));
toolbarSwitch = element(by.id('adf-switch-toolbar'));
toolbar = element(by.id('adf-viewer-toolbar'));
lastButton = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
goBackSwitch = element(by.id('adf-switch-goback'));
canvasLayer = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
openWithSwitch: ElementFinder = element(by.id('adf-switch-openwith'));
openWith: ElementFinder = element(by.id('adf-viewer-openwith'));
openWithSwitch = element(by.id('adf-switch-openwith'));
openWith = element(by.id('adf-viewer-openwith'));
moreActionsMenuSwitch: ElementFinder = element(by.id('adf-switch-moreactionsmenu'));
moreActionsMenu: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-more-actions"]'));
moreActionsMenuSwitch = element(by.id('adf-switch-moreactionsmenu'));
moreActionsMenu = element(by.css('button[data-automation-id="adf-toolbar-more-actions"]'));
customNameSwitch: ElementFinder = element(by.id('adf-switch-custoname'));
customToolbarToggle: ElementFinder = element(by.id('adf-toggle-custom-toolbar'));
customToolbar: ElementFinder = element(by.css('adf-viewer-toolbar[data-automation-id="adf-viewer-custom-toolbar"]'));
customNameSwitch = element(by.id('adf-switch-custoname'));
customToolbarToggle = element(by.id('adf-toggle-custom-toolbar'));
customToolbar = element(by.css('adf-viewer-toolbar[data-automation-id="adf-viewer-custom-toolbar"]'));
showRightSidebarSwitch: ElementFinder = element(by.id('adf-switch-showrightsidebar'));
showLeftSidebarSwitch: ElementFinder = element(by.id('adf-switch-showleftsidebar'));
showRightSidebarSwitch = element(by.id('adf-switch-showrightsidebar'));
showLeftSidebarSwitch = element(by.id('adf-switch-showleftsidebar'));
moreActionsSwitch: ElementFinder = element(by.id('adf-switch-moreactions'));
pdfPageLoaded: ElementFinder = element(by.css('[data-page-number="1"][data-loaded="true"], adf-img-viewer, adf-txt-viewer'));
moreActionsSwitch = element(by.id('adf-switch-moreactions'));
pdfPageLoaded = element(by.css('[data-page-number="1"][data-loaded="true"], adf-img-viewer, adf-txt-viewer'));
downloadSwitch: ElementFinder = element(by.id('adf-switch-download'));
downloadButton: ElementFinder = element(by.id('adf-viewer-download'));
downloadSwitch = element(by.id('adf-switch-download'));
downloadButton = element(by.id('adf-viewer-download'));
printSwitch: ElementFinder = element(by.id('adf-switch-print'));
printButton: ElementFinder = element(by.id('adf-viewer-print'));
printSwitch = element(by.id('adf-switch-print'));
printButton = element(by.id('adf-viewer-print'));
allowSidebarSwitch: ElementFinder = element(by.id('adf-switch-allowsidebar'));
allowLeftSidebarSwitch: ElementFinder = element(by.id('adf-switch-allowLeftSidebar'));
allowSidebarSwitch = element(by.id('adf-switch-allowsidebar'));
allowLeftSidebarSwitch = element(by.id('adf-switch-allowLeftSidebar'));
uploadButton: ElementFinder = element(by.id('adf-viewer-upload'));
timeButton: ElementFinder = element(by.id('adf-viewer-time'));
bugButton: ElementFinder = element(by.id('adf-viewer-bug'));
uploadButton = element(by.id('adf-viewer-upload'));
timeButton = element(by.id('adf-viewer-time'));
bugButton = element(by.id('adf-viewer-bug'));
codeViewer: ElementFinder = element(by.id('adf-monaco-file-editor'));
codeViewer = element(by.id('adf-monaco-file-editor'));
showTabWithIconSwitch: ElementFinder = element(by.id('adf-tab-with-icon'));
showTabWithIconAndLabelSwitch: ElementFinder = element(by.id('adf-icon-and-label-tab'));
unknownFormat: ElementFinder = element(by.css(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`));
showTabWithIconSwitch = element(by.id('adf-tab-with-icon'));
showTabWithIconAndLabelSwitch = element(by.id('adf-icon-and-label-tab'));
unknownFormat = element(by.css(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`));
async checkCodeViewerIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.codeViewer);
}
async viewFile(fileName): Promise<void> {
const fileView: ElementFinder = element.all(by.css(`#document-list-container div[data-automation-id="${fileName}"]`)).first();
const fileView = element.all(by.css(`#document-list-container div[data-automation-id="${fileName}"]`)).first();
await BrowserActions.click(fileView);
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
}
@@ -176,7 +176,7 @@ export class ViewerPage {
}
async checkCurrentThumbnailIsSelected(): Promise<void> {
const selectedThumbnail: ElementFinder = element(by.css('adf-pdf-thumb[class="adf-pdf-thumbnails__thumb ng-star-inserted adf-pdf-thumbnails__thumb--selected"] > img'));
const selectedThumbnail = element(by.css('adf-pdf-thumb[class="adf-pdf-thumbnails__thumb ng-star-inserted adf-pdf-thumbnails__thumb--selected"] > img'));
const pageNumber = await this.pageSelectorInput.getAttribute('value');
await expect('Page ' + pageNumber).toEqual(await selectedThumbnail.getAttribute('title'));
@@ -274,9 +274,9 @@ export class ViewerPage {
async checkFileContent(pageNumber: string, text: string): Promise<void> {
const allPages = this.canvasLayer;
const pageLoaded: ElementFinder = element.all(by.css('div[data-page-number="' + pageNumber + '"][data-loaded="true"]')).first();
const textLayerLoaded: ElementFinder = element.all(by.css('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]')).first();
const specificText: ElementFinder = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]', text)).first();
const pageLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"][data-loaded="true"]')).first();
const textLayerLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]')).first();
const specificText = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]', text)).first();
await BrowserVisibility.waitUntilElementIsVisible(allPages);
await BrowserVisibility.waitUntilElementIsVisible(pageLoaded);
@@ -346,7 +346,7 @@ export class ViewerPage {
}
async checkTabIsActive(tabName): Promise<void> {
const tab: ElementFinder = element(by.cssContainingText('.adf-info-drawer-layout-content div.mat-tab-labels div.mat-tab-label-active .mat-tab-label-content', tabName));
const tab = element(by.cssContainingText('.adf-info-drawer-layout-content div.mat-tab-labels div.mat-tab-label-active .mat-tab-label-content', tabName));
await BrowserVisibility.waitUntilElementIsVisible(tab);
}
@@ -593,7 +593,7 @@ export class ViewerPage {
}
async enterCustomName(text: string): Promise<void> {
const textField: ElementFinder = element(by.css('input[data-automation-id="adf-text-custom-name"]'));
const textField = element(by.css('input[data-automation-id="adf-text-custom-name"]'));
// await BrowserVisibility.waitUntilElementIsVisible(textField);
await BrowserActions.clearSendKeys(textField, text);
}
@@ -611,22 +611,22 @@ export class ViewerPage {
}
async checkTabHasNoIcon(index: number): Promise<void> {
const tab: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
}
async checkTabHasNoLabel(index: number): Promise<void> {
const tab: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
}
async getTabLabelById(index: number): Promise<string> {
const tab: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
return BrowserActions.getText(tab);
}
async getTabIconById(index: number): Promise<string> {
const tab: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
return BrowserActions.getText(tab);
}

View File

@@ -15,23 +15,23 @@
* limitations under the License.
*/
import { element, by, ElementArrayFinder, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
export class AppListCloudPage {
apsAppsContainer: ElementFinder = element(by.css('adf-cloud-app-list'));
allApps: ElementArrayFinder = element.all(by.css('adf-cloud-app-details'));
nameOfAllApps: ElementArrayFinder = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1'));
firstApp: ElementFinder = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1')).first();
apsAppsContainer = element(by.css('adf-cloud-app-list'));
allApps = element.all(by.css('adf-cloud-app-details'));
nameOfAllApps = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1'));
firstApp = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1')).first();
async checkApsContainer(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.apsAppsContainer);
await BrowserVisibility.waitUntilElementIsVisible(this.firstApp);
}
async goToApp(applicationName): Promise<void> {
async goToApp(applicationName: string): Promise<void> {
await BrowserActions.clickExecuteScript('mat-card[title="' + applicationName + '"]');
}
@@ -43,12 +43,12 @@ export class AppListCloudPage {
return BrowserActions.getArrayText(this.nameOfAllApps);
}
async checkAppIsNotDisplayed(applicationName): Promise<void> {
async checkAppIsNotDisplayed(applicationName: string): Promise<void> {
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
await BrowserVisibility.waitUntilElementIsNotVisible(app);
}
async checkAppIsDisplayed(applicationName): Promise<void> {
async checkAppIsDisplayed(applicationName: string): Promise<void> {
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
await BrowserVisibility.waitUntilElementIsVisible(app);
}

View File

@@ -15,17 +15,17 @@
* limitations under the License.
*/
import { browser, by, element, ElementFinder, Locator } from 'protractor';
import { browser, by, element } from 'protractor';
import { BrowserVisibility } from '../../../core/utils/browser-visibility';
import { BrowserActions } from '../../../core/utils/browser-actions';
export class EditProcessFilterDialogPage {
componentElement: ElementFinder = element(by.css('adf-cloud-process-filter-dialog-cloud'));
title: ElementFinder = element(by.id('adf-process-filter-dialog-title'));
filterNameInput: ElementFinder = element(by.id('adf-filter-name-id'));
saveButtonLocator: Locator = by.id('adf-save-button-id');
cancelButtonLocator: Locator = by.id('adf-cancel-button-id');
componentElement = element(by.css('adf-cloud-process-filter-dialog-cloud'));
title = element(by.id('adf-process-filter-dialog-title'));
filterNameInput = element(by.id('adf-filter-name-id'));
saveButtonLocator = by.id('adf-save-button-id');
cancelButtonLocator = by.id('adf-cancel-button-id');
async clickOnSaveButton(): Promise<void> {
const saveButton = this.componentElement.element(this.saveButtonLocator);

View File

@@ -15,17 +15,17 @@
* limitations under the License.
*/
import { browser, by, element, Locator, ElementFinder } from 'protractor';
import { browser, by, element } from 'protractor';
import { BrowserVisibility } from '../../../core/utils/browser-visibility';
import { BrowserActions } from '../../../core/utils/browser-actions';
export class EditTaskFilterDialogPage {
componentElement: ElementFinder = element(by.css('adf-cloud-task-filter-dialog'));
title: ElementFinder = element(by.id('adf-task-filter-dialog-title'));
filterNameInput: ElementFinder = element(by.id('adf-filter-name-id'));
saveButtonLocator: Locator = by.id('adf-save-button-id');
cancelButtonLocator: Locator = by.id('adf-cancel-button-id');
componentElement = element(by.css('adf-cloud-task-filter-dialog'));
title = element(by.id('adf-task-filter-dialog-title'));
filterNameInput = element(by.id('adf-filter-name-id'));
saveButtonLocator = by.id('adf-save-button-id');
cancelButtonLocator = by.id('adf-cancel-button-id');
async clickOnSaveButton(): Promise<void> {
const saveButton = this.componentElement.element(this.saveButtonLocator);

View File

@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { browser, by, element, protractor, ElementFinder } from 'protractor';
import { browser, by, element, protractor } from 'protractor';
import { EditProcessFilterDialogPage } from './dialog/edit-process-filter-dialog.page';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
@@ -22,11 +22,11 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
export class EditProcessFilterCloudComponentPage {
customiseFilter: ElementFinder = element(by.id('adf-edit-process-filter-title-id'));
saveButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-save"]'));
saveAsButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-saveAs"]'));
deleteButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-delete"]'));
filter: ElementFinder = element(by.css(`adf-cloud-edit-process-filter mat-expansion-panel-header`));
customiseFilter = element(by.id('adf-edit-process-filter-title-id'));
saveButton = element(by.css('button[data-automation-id="adf-filter-action-save"]'));
saveAsButton = element(by.css('button[data-automation-id="adf-filter-action-saveAs"]'));
deleteButton = element(by.css('button[data-automation-id="adf-filter-action-delete"]'));
filter = element(by.css(`adf-cloud-edit-process-filter mat-expansion-panel-header`));
private locatorAppNameDropdown = element(by.css(`mat-select[data-automation-id='adf-cloud-edit-process-property-appName']`));
private locatorStatusDropdown = element(by.css(`mat-select[data-automation-id='adf-cloud-edit-process-property-status']`));
@@ -115,15 +115,15 @@ export class EditProcessFilterCloudComponentPage {
return BrowserVisibility.waitUntilElementIsNotVisible(emptyList);
}
async setProcessInstanceId(option): Promise<void> {
async setProcessInstanceId(option: string): Promise<void> {
await this.setProperty('processInstanceId', option);
}
async setProcessDefinitionKey(option): Promise<void> {
async setProcessDefinitionKey(option: string): Promise<void> {
await this.setProperty('processDefinitionKey', option);
}
async setProcessName(option): Promise<void> {
async setProcessName(option: string): Promise<void> {
await this.setProperty('processName', option);
}

View File

@@ -23,21 +23,21 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
export class EditTaskFilterCloudComponentPage {
customiseFilter: ElementFinder = element(by.id('adf-edit-task-filter-title-id'));
assignee: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-assignee"]'));
priority: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-priority"]'));
taskName: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskName"]'));
id: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskId"]'));
processDefinitionId: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processDefinitionId"]'));
processInstanceId: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]'));
lastModifiedFrom: ElementFinder = element(by.css('input[placeholder="LastModifiedFrom"]'));
lastModifiedTo: ElementFinder = element(by.css('input[placeholder="LastModifiedTo"]'));
parentTaskId: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-parentTaskId"]'));
owner: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-owner"]'));
saveButton: ElementFinder = element(by.css('[data-automation-id="adf-filter-action-save"]'));
saveAsButton: ElementFinder = element(by.css('[data-automation-id="adf-filter-action-saveAs"]'));
deleteButton: ElementFinder = element(by.css('[data-automation-id="adf-filter-action-delete"]'));
filter: ElementFinder = element(by.css(`adf-cloud-edit-task-filter mat-expansion-panel-header`));
customiseFilter = element(by.id('adf-edit-task-filter-title-id'));
assignee = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-assignee"]'));
priority = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-priority"]'));
taskName = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskName"]'));
id = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskId"]'));
processDefinitionId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processDefinitionId"]'));
processInstanceId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]'));
lastModifiedFrom = element(by.css('input[placeholder="LastModifiedFrom"]'));
lastModifiedTo = element(by.css('input[placeholder="LastModifiedTo"]'));
parentTaskId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-parentTaskId"]'));
owner = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-owner"]'));
saveButton = element(by.css('[data-automation-id="adf-filter-action-save"]'));
saveAsButton = element(by.css('[data-automation-id="adf-filter-action-saveAs"]'));
deleteButton = element(by.css('[data-automation-id="adf-filter-action-delete"]'));
filter = element(by.css(`adf-cloud-edit-task-filter mat-expansion-panel-header`));
private locatorAppNameDropdown = element(by.css(`mat-select[data-automation-id='adf-cloud-edit-task-property-appName']`));
private locatorStatusDropdown = element(by.css(`mat-select[data-automation-id='adf-cloud-edit-task-property-status']`));
@@ -200,7 +200,7 @@ export class EditTaskFilterCloudComponentPage {
return this.appNameDropdown.getSelectedOptionText();
}
async setId(option): Promise<void> {
async setId(option: string): Promise<void> {
await this.setProperty('taskId', option);
}

View File

@@ -15,15 +15,15 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
import { ConfigEditorPage } from '../../core/pages/config-editor-page';
export class FormCloudComponentPage {
formCloudEditor: ElementFinder = element.all(by.css('.mat-tab-list .mat-tab-label')).get(1);
formCloudRender: ElementFinder = element.all(by.css('.mat-tab-list .mat-tab-label')).get(0);
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();

View File

@@ -15,21 +15,21 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
import { FormFields } from '../../core/pages/form/form-fields';
export class GroupCloudComponentPage {
groupCloudSearch: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-group-search-input"]'));
formFields: FormFields = new FormFields();
groupCloudSearch = element(by.css('input[data-automation-id="adf-cloud-group-search-input"]'));
formFields = new FormFields();
async searchGroups(name: string): Promise<void> {
await BrowserActions.clearSendKeys(this.groupCloudSearch, name);
}
async searchGroupsToExisting(name) {
async searchGroupsToExisting(name: string) {
await BrowserActions.clearSendKeys(this.groupCloudSearch, name);
}
@@ -87,7 +87,7 @@ export class GroupCloudComponentPage {
}
}
async checkGroupActiveField(name): Promise <boolean> {
async checkGroupActiveField(name: string): Promise <boolean> {
const activeGroupField = element(by.css('group-cloud-widget .adf-readonly'));
try {
await BrowserActions.clearSendKeys(activeGroupField, name);

View File

@@ -15,20 +15,20 @@
* limitations under the License.
*/
import { by, element, ElementFinder, Locator, protractor } from 'protractor';
import { by, element, protractor } from 'protractor';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
import { FormFields } from '../../core/pages/form/form-fields';
export class PeopleCloudComponentPage {
peopleCloudSearch: ElementFinder = element(by.css('input[data-automation-id="adf-people-cloud-search-input"]'));
assigneeField: ElementFinder = element(by.css('input[data-automation-id="adf-people-cloud-search-input"]'));
selectionReady: ElementFinder = element(by.css('div[data-automation-id="adf-people-cloud-row"]'));
formFields: FormFields = new FormFields();
labelLocator: Locator = by.css("label[class*='adf-label']");
inputLocator: Locator = by.css('input');
assigneeChipList: ElementFinder = element(by.css('mat-chip-list[data-automation-id="adf-cloud-people-chip-list"]'));
peopleCloudSearch = element(by.css('input[data-automation-id="adf-people-cloud-search-input"]'));
assigneeField = element(by.css('input[data-automation-id="adf-people-cloud-search-input"]'));
selectionReady = element(by.css('div[data-automation-id="adf-people-cloud-row"]'));
formFields = new FormFields();
labelLocator = by.css("label[class*='adf-label']");
inputLocator = by.css('input');
assigneeChipList = element(by.css('mat-chip-list[data-automation-id="adf-cloud-people-chip-list"]'));
async clearAssignee(): Promise<void> {
await BrowserActions.clearSendKeys(this.peopleCloudSearch, ' ');
@@ -100,11 +100,11 @@ export class PeopleCloudComponentPage {
return this.assigneeField.getAttribute('value');
}
getFieldLabel(fieldId): Promise<string> {
getFieldLabel(fieldId: string): Promise<string> {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
}
getFieldValue(fieldId): Promise<string> {
getFieldValue(fieldId: string): Promise<string> {
return this.formFields.getFieldValue(fieldId, this.inputLocator);
}
@@ -127,7 +127,7 @@ export class PeopleCloudComponentPage {
}
}
async clickPeopleInput(fieldId): Promise<void> {
async clickPeopleInput(fieldId: string): Promise<void> {
const peopleInput = element.all(by.css(`div[id="field-${fieldId}-container"] `)).first();
await BrowserActions.click(peopleInput);
}
@@ -142,7 +142,7 @@ export class PeopleCloudComponentPage {
}
}
async checkPeopleActiveField(name): Promise<boolean> {
async checkPeopleActiveField(name: string): Promise<boolean> {
const activePeopleField = element(by.css('people-cloud-widget .adf-readonly'));
try {
await BrowserActions.clearSendKeys(activePeopleField, name);

View File

@@ -24,10 +24,10 @@ export class ProcessFiltersCloudComponentPage {
filter: ElementFinder;
filterIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
processFilters: ElementFinder = element(by.css("mat-expansion-panel[data-automation-id='Process Filters']"));
processFilters = element(by.css("mat-expansion-panel[data-automation-id='Process Filters']"));
activeFilter: ElementFinder = element(by.css('.adf-active [data-automation-id="adf-filter-label"]'));
processFiltersList: ElementFinder = element(by.css('adf-cloud-process-filters'));
activeFilter = element(by.css('.adf-active [data-automation-id="adf-filter-label"]'));
processFiltersList = element(by.css('adf-cloud-process-filters'));
async checkProcessFilterIsDisplayed(filterName: string): Promise<void> {
this.filter = this.getProcessFilterLocatorByFilterName(filterName);

View File

@@ -15,19 +15,19 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
export class ProcessHeaderCloudPage {
idField: ElementFinder = element.all(by.css('[data-automation-id="card-textitem-value-id"]')).first();
nameField: ElementFinder = element.all(by.css('[data-automation-id="card-textitem-value-name"]')).first();
statusField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-status"]'));
initiatorField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-initiator"]'));
startDateField: ElementFinder = element.all(by.css('span[data-automation-id*="startDate"] span')).first();
lastModifiedField: ElementFinder = element.all(by.css('span[data-automation-id*="lastModified"] span')).first();
parentIdField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-parentId"]'));
businessKeyField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-businessKey"]'));
idField = element.all(by.css('[data-automation-id="card-textitem-value-id"]')).first();
nameField = element.all(by.css('[data-automation-id="card-textitem-value-name"]')).first();
statusField = element(by.css('[data-automation-id="card-textitem-value-status"]'));
initiatorField = element(by.css('[data-automation-id="card-textitem-value-initiator"]'));
startDateField = element.all(by.css('span[data-automation-id*="startDate"] span')).first();
lastModifiedField = element.all(by.css('span[data-automation-id*="lastModified"] span')).first();
parentIdField = element(by.css('[data-automation-id="card-textitem-value-parentId"]'));
businessKeyField = element(by.css('[data-automation-id="card-textitem-value-businessKey"]'));
async getId(): Promise<string> {
return BrowserActions.getInputValue(this.idField);

View File

@@ -17,7 +17,7 @@
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
import { element, by, ElementFinder, Locator, browser } from 'protractor';
import { element, by, browser } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
export class ProcessListCloudComponentPage {
@@ -27,10 +27,10 @@ export class ProcessListCloudComponentPage {
name: 'Name'
};
processList: ElementFinder = element(by.css('adf-cloud-process-list'));
noProcessFound: ElementFinder = element.all(by.css("div[class='adf-empty-content__title']")).first();
actionMenu: ElementFinder = element(by.css('*[role="menu"]'));
optionButton: Locator = by.css('button[data-automation-id*="action_menu_"]');
processList = element(by.css('adf-cloud-process-list'));
noProcessFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
actionMenu = element(by.css('*[role="menu"]'));
optionButton = by.css('button[data-automation-id*="action_menu_"]');
dataTable: DataTableComponentPage = new DataTableComponentPage(this.processList);
@@ -38,43 +38,43 @@ export class ProcessListCloudComponentPage {
return this.dataTable;
}
selectRow(processName): Promise<void> {
selectRow(processName: string): Promise<void> {
return this.dataTable.selectRow(this.columns.name, processName);
}
selectRowById(processId): Promise<void> {
selectRowById(processId: string): Promise<void> {
return this.dataTable.selectRow(this.columns.id, processId);
}
checkRowIsSelectedById(processId): Promise<void> {
checkRowIsSelectedById(processId: string): Promise<void> {
return this.dataTable.checkRowIsSelected(this.columns.id, processId);
}
checkRowIsNotSelectedById(processId): Promise<void> {
checkRowIsNotSelectedById(processId: string): Promise<void> {
return this.dataTable.checkRowIsNotSelected(this.columns.id, processId);
}
checkRowIsCheckedById(processId): Promise<void> {
checkRowIsCheckedById(processId: string): Promise<void> {
return this.dataTable.checkRowIsChecked(this.columns.id, processId);
}
checkRowIsNotCheckedById(processId): Promise<void> {
checkRowIsNotCheckedById(processId: string): Promise<void> {
return this.dataTable.checkRowIsNotChecked(this.columns.id, processId);
}
checkCheckboxById(processId): Promise<void> {
checkCheckboxById(processId: string): Promise<void> {
return this.dataTable.clickCheckbox(this.columns.id, processId);
}
checkContentIsDisplayedByName(processName): Promise<void> {
checkContentIsDisplayedByName(processName: string): Promise<void> {
return this.dataTable.checkContentIsDisplayed(this.columns.name, processName);
}
checkContentIsNotDisplayedByName(processName): Promise<void> {
checkContentIsNotDisplayedByName(processName: string): Promise<void> {
return this.dataTable.checkContentIsNotDisplayed(this.columns.name, processName);
}
checkContentIsDisplayedById(processId): Promise<void> {
checkContentIsDisplayedById(processId: string): Promise<void> {
return this.dataTable.checkContentIsDisplayed(this.columns.id, processId);
}
@@ -104,7 +104,7 @@ export class ProcessListCloudComponentPage {
async clickOptionsButton(content: string): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
const row: ElementFinder = this.dataTable.getRow('Id', content);
const row = this.dataTable.getRow('Id', content);
await browser.sleep(1000);
await BrowserActions.click(row.element(this.optionButton));
await BrowserVisibility.waitUntilElementIsVisible(this.actionMenu);

View File

@@ -21,16 +21,16 @@ import { BrowserActions } from '../../core/utils/browser-actions';
export class StartTasksCloudPage {
name: ElementFinder = element(by.css('input[id="name_id"]'));
dueDate: ElementFinder = element(by.css('input[id="date_id"]'));
description: ElementFinder = element(by.css('textarea[id="description_id"]'));
priority: ElementFinder = element(by.css('input[formcontrolname="priority"]'));
startButton: ElementFinder = element(by.css('button[id="button-start"]'));
name = element(by.css('input[id="name_id"]'));
dueDate = element(by.css('input[id="date_id"]'));
description = element(by.css('textarea[id="description_id"]'));
priority = element(by.css('input[formcontrolname="priority"]'));
startButton = element(by.css('button[id="button-start"]'));
startButtonEnabled = element(by.css('button[id="button-start"]:not(disabled)'));
cancelButton: ElementFinder = element(by.css('button[id="button-cancel"]'));
form: ElementFinder = element.all(by.css('adf-cloud-start-task form')).first();
formDefinitionSelector: ElementFinder = element(by.css('.adf-form-definition-selector'));
priorityStartTaskField: ElementFinder = element(by.css('input[formControlName="priority"]'));
cancelButton = element(by.css('button[id="button-cancel"]'));
form = element.all(by.css('adf-cloud-start-task form')).first();
formDefinitionSelector = element(by.css('.adf-form-definition-selector'));
priorityStartTaskField = element(by.css('input[formControlName="priority"]'));
async checkFormIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.form);

View File

@@ -22,8 +22,8 @@ import { BrowserActions } from '../../core/utils/browser-actions';
export class TaskFiltersCloudComponentPage {
filter: ElementFinder;
taskFilters: ElementFinder = element(by.css(`mat-expansion-panel[data-automation-id='Task Filters']`));
activeFilter: ElementFinder = element(by.css('.adf-active [data-automation-id="adf-filter-label"]'));
taskFilters = element(by.css(`mat-expansion-panel[data-automation-id='Task Filters']`));
activeFilter = element(by.css('.adf-active [data-automation-id="adf-filter-label"]'));
async checkTaskFilterIsDisplayed(filterName: string): Promise<void> {
this.filter = this.getTaskFilterLocatorByFilterName(filterName);

View File

@@ -22,16 +22,16 @@ import { FormFields } from '../../core/pages/form/form-fields';
export class TaskFormCloudComponent {
cancelButton: ElementFinder = element(by.css('button[id="adf-cloud-cancel-task"]'));
completeButton: ElementFinder = element(by.css('button[id="adf-form-complete"]'));
releaseButton: ElementFinder = element(by.css('button[adf-cloud-unclaim-task]'));
saveButton: ElementFinder = element(by.css('button[id="adf-form-save"]'));
claimButton: ElementFinder = element(by.css('button[adf-cloud-claim-task]'));
form: ElementFinder = element(by.css('adf-cloud-form'));
formTitle: ElementFinder = element(by.css(`span.adf-form-title`));
emptyContentIcon: ElementFinder = element(by.css(`div.adf-empty-content adf-icon.adf-empty-content__icon`));
emptyContentTitle: ElementFinder = element(by.css(`div.adf-empty-content div.adf-empty-content__title`));
emptyContentSubtitle: ElementFinder = element(by.css(`div.adf-empty-content div.adf-empty-content__subtitle`));
cancelButton = element(by.css('button[id="adf-cloud-cancel-task"]'));
completeButton = element(by.css('button[id="adf-form-complete"]'));
releaseButton = element(by.css('button[adf-cloud-unclaim-task]'));
saveButton = element(by.css('button[id="adf-form-save"]'));
claimButton = element(by.css('button[adf-cloud-claim-task]'));
form = element(by.css('adf-cloud-form'));
formTitle = element(by.css(`span.adf-form-title`));
emptyContentIcon = element(by.css(`div.adf-empty-content adf-icon.adf-empty-content__icon`));
emptyContentTitle = element(by.css(`div.adf-empty-content div.adf-empty-content__title`));
emptyContentSubtitle = element(by.css(`div.adf-empty-content div.adf-empty-content__subtitle`));
readOnlyForm = element(by.css('div[class="adf-readonly-form"]'));
async isCompleteButtonEnabled(): Promise<boolean> {

View File

@@ -15,25 +15,25 @@
* limitations under the License.
*/
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { CardTextItemPage } from '../../core/pages/card-view/card-view-text-item.page';
export class TaskHeaderCloudPage {
assigneeCardTextItem: CardTextItemPage = new CardTextItemPage('assignee');
statusCardTextItem: CardTextItemPage = new CardTextItemPage('status');
priorityCardTextItem: CardTextItemPage = new CardTextItemPage('priority');
dueDateField: ElementFinder = element.all(by.css('span[data-automation-id*="dueDate"] span')).first();
categoryCardTextItem: CardTextItemPage = new CardTextItemPage('category');
createdField: ElementFinder = element(by.css('span[data-automation-id="card-dateitem-created"] span'));
parentNameCardTextItem: CardTextItemPage = new CardTextItemPage('parentName');
parentTaskIdCardTextItem: CardTextItemPage = new CardTextItemPage('parentTaskId');
endDateField: ElementFinder = element.all(by.css('span[data-automation-id*="endDate"] span')).first();
idCardTextItem: CardTextItemPage = new CardTextItemPage('id');
descriptionCardTextItem: CardTextItemPage = new CardTextItemPage('description');
taskPropertyList: ElementFinder = element(by.css('adf-cloud-task-header adf-card-view div[class="adf-property-list"]'));
assigneeCardTextItem = new CardTextItemPage('assignee');
statusCardTextItem = new CardTextItemPage('status');
priorityCardTextItem = new CardTextItemPage('priority');
dueDateField = element.all(by.css('span[data-automation-id*="dueDate"] span')).first();
categoryCardTextItem = new CardTextItemPage('category');
createdField = element(by.css('span[data-automation-id="card-dateitem-created"] span'));
parentNameCardTextItem = new CardTextItemPage('parentName');
parentTaskIdCardTextItem = new CardTextItemPage('parentTaskId');
endDateField = element.all(by.css('span[data-automation-id*="endDate"] span')).first();
idCardTextItem = new CardTextItemPage('id');
descriptionCardTextItem = new CardTextItemPage('description');
taskPropertyList = element(by.css('adf-cloud-task-header adf-card-view div[class="adf-property-list"]'));
async getAssignee(): Promise<string> {
return this.assigneeCardTextItem.getFieldValue();

View File

@@ -17,7 +17,7 @@
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
import { element, by, ElementFinder, Locator } from 'protractor';
import { element, by, ElementFinder } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
const column = {
@@ -36,8 +36,8 @@ export class TaskListCloudComponentPage {
taskList = element(by.css('adf-cloud-task-list'));
noTasksFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
actionMenu: ElementFinder = element(by.css('*[role="menu"]'));
optionButton: Locator = by.css('button[data-automation-id*="action_menu_"]');
actionMenu = element(by.css('*[role="menu"]'));
optionButton = by.css('button[data-automation-id*="action_menu_"]');
dataTable = new DataTableComponentPage(this.taskList);
@@ -89,7 +89,7 @@ export class TaskListCloudComponentPage {
return this.dataTable.selectRow(column.id, taskId);
}
getRow(taskName): ElementFinder {
getRow(taskName: string): ElementFinder {
return this.dataTable.getCellElementByValue(column.name, taskName);
}
@@ -164,7 +164,7 @@ export class TaskListCloudComponentPage {
async clickOptionsButton(content: string) {
await BrowserActions.closeMenuAndDialogs();
const row: ElementFinder = this.dataTable.getRow('Id', content);
const row = this.dataTable.getRow('Id', content);
await BrowserActions.click(row.element(this.optionButton));
await BrowserVisibility.waitUntilElementIsVisible(this.actionMenu);
}

View File

@@ -15,17 +15,17 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { ContentNodeSelectorDialogPage } from '../../content-services/dialog/content-node-selector-dialog.page';
import { DocumentListPage } from '../../content-services/pages/document-list.page';
export class ExternalNodeSelectorDialogPage extends ContentNodeSelectorDialogPage {
txtUsername: ElementFinder = element(by.css('input[id="username"]'));
txtPassword: ElementFinder = element(by.css('input[id="password"]'));
loginElement: ElementFinder = element(by.css('[data-automation-id="attach-file-dialog-actions-login"]'));
title: ElementFinder = element(by.css('[data-automation-id="content-node-selector-title"]'));
txtUsername = element(by.css('input[id="username"]'));
txtPassword = element(by.css('input[id="password"]'));
loginElement = element(by.css('[data-automation-id="attach-file-dialog-actions-login"]'));
title = element(by.css('[data-automation-id="content-node-selector-title"]'));
constructor() {
super();

View File

@@ -21,8 +21,8 @@ import { by, element, ElementFinder } from 'protractor';
export class FiltersPage {
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
buttonWindow: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
accordionMenu = element(by.css('.app-processes-menu mat-accordion'));
buttonWindow = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
processIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
async clickFilterButton(filterElement: ElementFinder): Promise<void> {
@@ -33,8 +33,8 @@ export class FiltersPage {
return filterElement.isEnabled();
}
async isFilterHighlighted(filterName): Promise<boolean> {
const processNameHighlighted: ElementFinder = element(by.css(`.adf-active [data-automation-id='${filterName}_filter']`));
async isFilterHighlighted(filterName: string): Promise<boolean> {
const processNameHighlighted = element(by.css(`.adf-active [data-automation-id='${filterName}_filter']`));
try {
await BrowserVisibility.waitUntilElementIsVisible(processNameHighlighted);
return true;
@@ -43,8 +43,8 @@ export class FiltersPage {
}
}
async isFilterDisplayed(name): Promise<boolean> {
const filterName: ElementFinder = element(by.css(`[data-automation-id='${name}_filter']`));
async isFilterDisplayed(name: string): Promise<boolean> {
const filterName = element(by.css(`[data-automation-id='${name}_filter']`));
try {
await BrowserVisibility.waitUntilElementIsVisible(filterName);
return true;
@@ -53,14 +53,14 @@ export class FiltersPage {
}
}
async checkFilterHasNoIcon(name): Promise<void> {
const filterName: ElementFinder = element(by.css(`[data-automation-id='${name}_filter']`));
async checkFilterHasNoIcon(name: string): Promise<void> {
const filterName = element(by.css(`[data-automation-id='${name}_filter']`));
await BrowserVisibility.waitUntilElementIsVisible(filterName);
await BrowserVisibility.waitUntilElementIsNotVisible(filterName.element(this.processIcon));
}
async getFilterIcon(name): Promise<string> {
const filterName: ElementFinder = element(by.css(`[data-automation-id='${name}_filter']`));
async getFilterIcon(name: string): Promise<string> {
const filterName = element(by.css(`[data-automation-id='${name}_filter']`));
await BrowserVisibility.waitUntilElementIsVisible(filterName);
const icon = filterName.element(this.processIcon);
return BrowserActions.getText(icon);

View File

@@ -23,16 +23,16 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
export class FormFieldsPage {
formContent: ElementFinder = element(by.css('adf-form'));
refreshButton: ElementFinder = element(by.css('div[class*="form-reload-button"] mat-icon'));
saveButton: ElementFinder = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
valueLocator: Locator = by.css('input');
labelLocator: Locator = by.css('label');
noFormMessage: ElementFinder = element(by.css('.adf-empty-content__title'));
completedTaskNoFormMessage: ElementFinder = element(by.css('div[id*="completed-form-message"] p'));
attachFormButton: ElementFinder = element(by.id('adf-attach-form-attach-button'));
completeButton: ElementFinder = element(by.id('adf-form-complete'));
errorMessage: Locator = by.css('.adf-error-text-container .adf-error-text');
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('.adf-empty-content__title'));
completedTaskNoFormMessage = element(by.css('div[id*="completed-form-message"] p'));
attachFormButton = element(by.id('adf-attach-form-attach-button'));
completeButton = element(by.id('adf-form-complete'));
errorMessage = by.css('.adf-error-text-container .adf-error-text');
selectFormDropdown = new DropdownPage(element.all(by.css('adf-attach-form div[class*="mat-select-arrow"]')).first());
@@ -59,7 +59,7 @@ export class FormFieldsPage {
}
async getFieldValue(fieldId: string, valueLocatorParam: Locator): Promise<string> {
const widget: ElementFinder = await this.getWidget(fieldId);
const widget = await this.getWidget(fieldId);
const value = widget.element(valueLocatorParam || this.valueLocator);
await BrowserVisibility.waitUntilElementIsVisible(value);
return value.getAttribute('value');

View File

@@ -15,17 +15,17 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { FiltersPage } from './filters.page';
export class ProcessFiltersPage {
filtersPage = new FiltersPage();
runningFilter: ElementFinder = element(by.css('button[data-automation-id="Running_filter"]'));
completedFilter: ElementFinder = element(by.css('button[data-automation-id="Completed_filter"]'));
allFilter: ElementFinder = element(by.css('button[data-automation-id="All_filter"]'));
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
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"]'));
accordionMenu = element(by.css('.app-processes-menu mat-accordion'));
async clickRunningFilterButton(): Promise<void> {
await this.filtersPage.clickFilterButton(this.runningFilter);

View File

@@ -16,15 +16,15 @@
*/
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
export class ProcessInstanceTasksPage {
startProcessDialog: ElementFinder = element(by.id('adf-start-process-dialog'));
title: ElementFinder = this.startProcessDialog.element(by.css('h4.mat-dialog-title'));
closeButton: ElementFinder = this.startProcessDialog.element(by.cssContainingText(`div.adf-start-process-dialog-actions button span`, 'Close'));
startForm: ElementFinder = element(by.css('div[data-automation-id="start-form"]'));
startProcessDialog = element(by.id('adf-start-process-dialog'));
title = this.startProcessDialog.element(by.css('h4.mat-dialog-title'));
closeButton = this.startProcessDialog.element(by.cssContainingText(`div.adf-start-process-dialog-actions button span`, 'Close'));
startForm = element(by.css('div[data-automation-id="start-form"]'));
async clickOnStartForm(): Promise<void> {
await BrowserActions.click(this.startForm);

View File

@@ -18,13 +18,13 @@
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
import { BrowserActions } from '../../core/utils/browser-actions';
import { element, by, ElementFinder } from 'protractor';
import { element, by } from 'protractor';
export class ProcessListPage {
processListEmptyTitle: ElementFinder = element(by.css('div[class="adf-empty-content__title"]'));
processInstanceList: ElementFinder = element(by.css('adf-process-instance-list'));
dataTable: DataTableComponentPage = new DataTableComponentPage(this.processInstanceList);
processListEmptyTitle = element(by.css('div[class="adf-empty-content__title"]'));
processInstanceList = element(by.css('adf-process-instance-list'));
dataTable = new DataTableComponentPage(this.processInstanceList);
getDisplayedProcessListEmptyTitle(): Promise<string> {
return BrowserActions.getText(this.processListEmptyTitle);

View File

@@ -16,16 +16,16 @@
*/
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
import { DropdownPage } from '../../core/pages/material/dropdown.page';
export class SelectAppsDialog {
selectAppsDialog: ElementFinder = element(by.css('mat-dialog-container[aria-labelledby="adf-select-app-dialog-title"]'));
title: ElementFinder = element(by.id('adf-select-app-dialog-title'));
selectAppsDialog = element(by.css('mat-dialog-container[aria-labelledby="adf-select-app-dialog-title"]'));
title = element(by.id('adf-select-app-dialog-title'));
appsDropdown = new DropdownPage(element(by.id('adf-select-app-dialog-dropdown')));
continueButton: ElementFinder = element(by.css('adf-select-apps-dialog .mat-button-wrapper'));
continueButton = element(by.css('adf-select-apps-dialog .mat-button-wrapper'));
async checkSelectAppsDialogIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.selectAppsDialog);

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { by, element, Key, protractor, browser, ElementFinder } from 'protractor';
import { by, element, Key, protractor, browser } from 'protractor';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
import { DropdownPage } from '../../core/pages/material/dropdown.page';
@@ -23,16 +23,16 @@ import { FormFields } from '../../core/pages/form/form-fields';
export class StartProcessPage {
defaultProcessName: ElementFinder = element(by.css('input[id="processName"]'));
processNameInput: ElementFinder = element(by.id('processName'));
disabledSelectProcessDropdown: ElementFinder = element(by.css('input[id="processDefinitionName"][disabled]'));
selectProcessDropdownArrow: ElementFinder = element(by.css('button[id="adf-select-process-dropdown"]'));
cancelProcessButton: ElementFinder = element(by.id('cancel_process'));
formStartProcessButton: ElementFinder = element(by.css('button[data-automation-id="adf-form-start process"]'));
startProcessButton: ElementFinder = element(by.css('button[data-automation-id="btn-start"]'));
noProcess: ElementFinder = element(by.css('.adf-empty-content__title'));
processDefinition: ElementFinder = element(by.css('input[id="processDefinitionName"]'));
processDefinitionOptionsPanel: ElementFinder = element(by.css('div[class*="mat-autocomplete-panel"]'));
defaultProcessName = element(by.css('input[id="processName"]'));
processNameInput = element(by.id('processName'));
disabledSelectProcessDropdown = element(by.css('input[id="processDefinitionName"][disabled]'));
selectProcessDropdownArrow = element(by.css('button[id="adf-select-process-dropdown"]'));
cancelProcessButton = element(by.id('cancel_process'));
formStartProcessButton = element(by.css('button[data-automation-id="adf-form-start process"]'));
startProcessButton = element(by.css('button[data-automation-id="btn-start"]'));
noProcess = element(by.css('.adf-empty-content__title'));
processDefinition = element(by.css('input[id="processDefinitionName"]'));
processDefinitionOptionsPanel = element(by.css('div[class*="mat-autocomplete-panel"]'));
processDefinitionDropdown = new DropdownPage(element(by.id('adf-select-process-dropdown')));
applicationDropdown = new DropdownPage(element(by.css('[data-automation-id*="start-process-app"] div[class="mat-select-arrow"]')));
@@ -134,8 +134,8 @@ export class StartProcessPage {
return processPlaceholder;
}
async checkValidationErrorIsDisplayed(error, elementRef = 'mat-error'): Promise<void> {
const errorElement: ElementFinder = element(by.cssContainingText(elementRef, error));
async checkValidationErrorIsDisplayed(error: string, elementRef = 'mat-error'): Promise<void> {
const errorElement = element(by.cssContainingText(elementRef, error));
await BrowserVisibility.waitUntilElementIsVisible(errorElement);
}

View File

@@ -15,18 +15,18 @@
* limitations under the License.
*/
import { by, element, ElementFinder } from 'protractor';
import { by, element } from 'protractor';
import { FiltersPage } from './filters.page';
export class TaskFiltersPage {
filtersPage = new FiltersPage();
myTasks: ElementFinder = element(by.css('[data-automation-id="My Tasks_filter"]'));
queuedTask: ElementFinder = element(by.css('[data-automation-id="Queued Tasks_filter"]'));
completedTask: ElementFinder = element(by.css('[data-automation-id="Completed Tasks_filter"]'));
involvedTask: ElementFinder = element(by.css('[data-automation-id="Involved Tasks_filter"]'));
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
myTasks = element(by.css('[data-automation-id="My Tasks_filter"]'));
queuedTask = element(by.css('[data-automation-id="Queued Tasks_filter"]'));
completedTask = element(by.css('[data-automation-id="Completed Tasks_filter"]'));
involvedTask = element(by.css('[data-automation-id="Involved Tasks_filter"]'));
accordionMenu = element(by.css('.app-processes-menu mat-accordion'));
async clickMyTasksFilterButton(): Promise<void> {
await this.filtersPage.clickFilterButton(this.myTasks);

View File

@@ -26,7 +26,7 @@ export class TaskListPage {
noTasksFound: ElementFinder;
constructor(
rootElement: ElementFinder = element.all(by.css('adf-tasklist')).first()
rootElement = element.all(by.css('adf-tasklist')).first()
) {
this.rootElement = rootElement;
this.dataTable = new DataTableComponentPage(this.rootElement);