mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-726] Add new return await rule (#5203)
* add new return await rule * update tslint * add lint exception
This commit is contained in:
committed by
Denys Vuika
parent
a4730cd9cf
commit
2e046945c7
@@ -65,7 +65,7 @@ export class AppsActions {
|
|||||||
const pathFile = path.join(browser.params.testConfig.main.rootPath + appFileLocation);
|
const pathFile = path.join(browser.params.testConfig.main.rootPath + appFileLocation);
|
||||||
const file = fs.createReadStream(pathFile);
|
const file = fs.createReadStream(pathFile);
|
||||||
|
|
||||||
return await alfrescoJsApi.activiti.appsApi.importAppDefinition(file);
|
return alfrescoJsApi.activiti.appsApi.importAppDefinition(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
async publishDeployApp(alfrescoJsApi, appId) {
|
async publishDeployApp(alfrescoJsApi, appId) {
|
||||||
@@ -116,7 +116,7 @@ export class AppsActions {
|
|||||||
startProcessOptions.name = processName;
|
startProcessOptions.name = processName;
|
||||||
}
|
}
|
||||||
|
|
||||||
return await alfrescoJsApi.activiti.processApi.startNewProcessInstance(startProcessOptions);
|
return alfrescoJsApi.activiti.processApi.startNewProcessInstance(startProcessOptions);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ export class AppsRuntimeActions {
|
|||||||
|
|
||||||
async getRuntimeAppDefinitions(alfrescoJsApi) {
|
async getRuntimeAppDefinitions(alfrescoJsApi) {
|
||||||
|
|
||||||
return await alfrescoJsApi.activiti.appsRuntimeApi.getAppDefinitions();
|
return alfrescoJsApi.activiti.appsRuntimeApi.getAppDefinitions();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -19,12 +19,12 @@ export class ModelsActions {
|
|||||||
|
|
||||||
async deleteVersionModel(alfrescoJsApi, modelId) {
|
async deleteVersionModel(alfrescoJsApi, modelId) {
|
||||||
|
|
||||||
return await alfrescoJsApi.activiti.modelsApi.deleteModel(modelId, { cascade: false, deleteRuntimeApp : true });
|
return alfrescoJsApi.activiti.modelsApi.deleteModel(modelId, { cascade: false, deleteRuntimeApp : true });
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteEntireModel(alfrescoJsApi, modelId) {
|
async deleteEntireModel(alfrescoJsApi, modelId) {
|
||||||
|
|
||||||
return await alfrescoJsApi.activiti.modelsApi.deleteModel(modelId, { cascade: true, deleteRuntimeApp : true });
|
return alfrescoJsApi.activiti.modelsApi.deleteModel(modelId, { cascade: true, deleteRuntimeApp : true });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -84,7 +84,7 @@ export class DropActions {
|
|||||||
fs.accessSync(absolutePath, fs.constants.F_OK);
|
fs.accessSync(absolutePath, fs.constants.F_OK);
|
||||||
const elem = await dropArea.getWebElement();
|
const elem = await dropArea.getWebElement();
|
||||||
const input: any = await browser.executeScript(JS_BIND_INPUT, elem);
|
const input: any = await browser.executeScript(JS_BIND_INPUT, elem);
|
||||||
return await input.sendKeys(absolutePath);
|
return input.sendKeys(absolutePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
async dropFolder(dropArea, folderPath) {
|
async dropFolder(dropArea, folderPath) {
|
||||||
@@ -95,6 +95,6 @@ export class DropActions {
|
|||||||
|
|
||||||
const elem = await dropArea.getWebElement();
|
const elem = await dropArea.getWebElement();
|
||||||
const input: any = await browser.executeScript(JS_BIND_INPUT_FOLDER, elem);
|
const input: any = await browser.executeScript(JS_BIND_INPUT_FOLDER, elem);
|
||||||
return await input.sendKeys(absolutePath);
|
return input.sendKeys(absolutePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ export class TreeViewPage {
|
|||||||
|
|
||||||
async getNodeId(): Promise<string> {
|
async getNodeId(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.nodeIdInput);
|
await BrowserVisibility.waitUntilElementIsVisible(this.nodeIdInput);
|
||||||
return await this.nodeIdInput.getAttribute('value');
|
return this.nodeIdInput.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickNode(nodeName): Promise<void> {
|
async clickNode(nodeName): Promise<void> {
|
||||||
@@ -81,6 +81,6 @@ export class TreeViewPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getTotalNodes() {
|
async getTotalNodes() {
|
||||||
return await this.nodesOnPage.count();
|
return this.nodesOnPage.count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -112,11 +112,11 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkLockedIcon(content): Promise<void> {
|
async checkLockedIcon(content): Promise<void> {
|
||||||
return await this.contentList.checkLockedIcon(content);
|
return this.contentList.checkLockedIcon(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUnlockedIcon(content): Promise<void> {
|
async checkUnlockedIcon(content): Promise<void> {
|
||||||
return await this.contentList.checkUnlockedIcon(content);
|
return this.contentList.checkUnlockedIcon(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkDeleteIsDisabled(content): Promise<void> {
|
async checkDeleteIsDisabled(content): Promise<void> {
|
||||||
@@ -186,7 +186,7 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getElementsDisplayedId() {
|
async getElementsDisplayedId() {
|
||||||
return await this.contentList.dataTablePage().getAllRowsColumnValues(this.columns.nodeId);
|
return this.contentList.dataTablePage().getAllRowsColumnValues(this.columns.nodeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkElementsDateSortedAsc(elements) {
|
checkElementsDateSortedAsc(elements) {
|
||||||
@@ -248,7 +248,7 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getRecentFileIcon(): Promise<string> {
|
async getRecentFileIcon(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.recentFileIcon);
|
return BrowserActions.getText(this.recentFileIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAcsContainer(): Promise<void> {
|
async checkAcsContainer(): Promise<void> {
|
||||||
@@ -269,15 +269,15 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async numberOfResultsDisplayed(): Promise<number> {
|
async numberOfResultsDisplayed(): Promise<number> {
|
||||||
return await this.contentList.dataTablePage().numberOfRows();
|
return this.contentList.dataTablePage().numberOfRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
async currentFolderName(): Promise<string> {
|
async currentFolderName(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.currentFolder);
|
return BrowserActions.getText(this.currentFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsNameColumn(): Promise<any> {
|
async getAllRowsNameColumn(): Promise<any> {
|
||||||
return await this.contentList.getAllRowsColumnValues(this.columns.name);
|
return this.contentList.getAllRowsColumnValues(this.columns.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
async sortByName(sortOrder: string): Promise<any> {
|
async sortByName(sortOrder: string): Promise<any> {
|
||||||
@@ -294,33 +294,33 @@ export class ContentServicesPage {
|
|||||||
|
|
||||||
async sortAndCheckListIsOrderedByName(sortOrder: string): Promise<any> {
|
async sortAndCheckListIsOrderedByName(sortOrder: string): Promise<any> {
|
||||||
await this.sortByName(sortOrder);
|
await this.sortByName(sortOrder);
|
||||||
return await this.checkListIsSortedByNameColumn(sortOrder);
|
return this.checkListIsSortedByNameColumn(sortOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkListIsSortedByNameColumn(sortOrder: string): Promise<any> {
|
async checkListIsSortedByNameColumn(sortOrder: string): Promise<any> {
|
||||||
return await this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.name);
|
return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkListIsSortedByCreatedColumn(sortOrder: string): Promise<any> {
|
async checkListIsSortedByCreatedColumn(sortOrder: string): Promise<any> {
|
||||||
return await this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.created);
|
return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.created);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkListIsSortedByAuthorColumn(sortOrder: string): Promise<any> {
|
async checkListIsSortedByAuthorColumn(sortOrder: string): Promise<any> {
|
||||||
return await this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.createdBy);
|
return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.createdBy);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkListIsSortedBySizeColumn(sortOrder: string): Promise<any> {
|
async checkListIsSortedBySizeColumn(sortOrder: string): Promise<any> {
|
||||||
return await this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.size);
|
return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
async sortAndCheckListIsOrderedByAuthor(sortOrder: string): Promise<any> {
|
async sortAndCheckListIsOrderedByAuthor(sortOrder: string): Promise<any> {
|
||||||
await this.sortByAuthor(sortOrder);
|
await this.sortByAuthor(sortOrder);
|
||||||
return await this.checkListIsSortedByAuthorColumn(sortOrder);
|
return this.checkListIsSortedByAuthorColumn(sortOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
async sortAndCheckListIsOrderedByCreated(sortOrder: string): Promise<any> {
|
async sortAndCheckListIsOrderedByCreated(sortOrder: string): Promise<any> {
|
||||||
await this.sortByCreated(sortOrder);
|
await this.sortByCreated(sortOrder);
|
||||||
return await this.checkListIsSortedByCreatedColumn(sortOrder);
|
return this.checkListIsSortedByCreatedColumn(sortOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
async doubleClickRow(nodeName): Promise<void> {
|
async doubleClickRow(nodeName): Promise<void> {
|
||||||
@@ -378,7 +378,7 @@ export class ContentServicesPage {
|
|||||||
|
|
||||||
async getActiveBreadcrumb(): Promise<string> {
|
async getActiveBreadcrumb(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.activeBreadcrumb);
|
await BrowserVisibility.waitUntilElementIsVisible(this.activeBreadcrumb);
|
||||||
return await this.activeBreadcrumb.getAttribute('title');
|
return this.activeBreadcrumb.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async uploadFile(fileLocation): Promise<void> {
|
async uploadFile(fileLocation): Promise<void> {
|
||||||
@@ -405,17 +405,17 @@ export class ContentServicesPage {
|
|||||||
|
|
||||||
async getSingleFileButtonTooltip(): Promise<string> {
|
async getSingleFileButtonTooltip(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(this.uploadFileButton);
|
await BrowserVisibility.waitUntilElementIsPresent(this.uploadFileButton);
|
||||||
return await this.uploadFileButtonInput.getAttribute('title');
|
return this.uploadFileButtonInput.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMultipleFileButtonTooltip(): Promise<string> {
|
async getMultipleFileButtonTooltip(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(this.uploadMultipleFileButton);
|
await BrowserVisibility.waitUntilElementIsPresent(this.uploadMultipleFileButton);
|
||||||
return await this.uploadMultipleFileButton.getAttribute('title');
|
return this.uploadMultipleFileButton.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFolderButtonTooltip(): Promise<string> {
|
async getFolderButtonTooltip(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(this.uploadFolderButton);
|
await BrowserVisibility.waitUntilElementIsPresent(this.uploadFolderButton);
|
||||||
return await this.uploadFolderButton.getAttribute('title');
|
return this.uploadFolderButton.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUploadButton(): Promise<void> {
|
async checkUploadButton(): Promise<void> {
|
||||||
@@ -423,7 +423,7 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async uploadButtonIsEnabled(): Promise<boolean> {
|
async uploadButtonIsEnabled(): Promise<boolean> {
|
||||||
return await this.uploadFileButton.isEnabled();
|
return this.uploadFileButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getErrorMessage(): Promise<string> {
|
async getErrorMessage(): Promise<string> {
|
||||||
@@ -457,7 +457,7 @@ export class ContentServicesPage {
|
|||||||
async getDocumentListRowNumber(): Promise<number> {
|
async getDocumentListRowNumber(): Promise<number> {
|
||||||
const documentList: ElementFinder = element(by.css('adf-upload-drag-area adf-document-list'));
|
const documentList: ElementFinder = element(by.css('adf-upload-drag-area adf-document-list'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(documentList);
|
await BrowserVisibility.waitUntilElementIsVisible(documentList);
|
||||||
return await $$('adf-upload-drag-area adf-document-list .adf-datatable-row').count();
|
return $$('adf-upload-drag-area adf-document-list .adf-datatable-row').count();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkColumnNameHeader(): Promise<void> {
|
async checkColumnNameHeader(): Promise<void> {
|
||||||
@@ -496,13 +496,13 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getColumnValueForRow(file, columnName): Promise<string> {
|
async getColumnValueForRow(file, columnName): Promise<string> {
|
||||||
return await this.contentList.dataTablePage().getColumnValueForRow(this.columns.name, file, columnName);
|
return this.contentList.dataTablePage().getColumnValueForRow(this.columns.name, file, columnName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStyleValueForRowText(rowName, styleName): Promise<string> {
|
async getStyleValueForRowText(rowName, styleName): Promise<string> {
|
||||||
const row: ElementFinder = element(by.css(`div.adf-datatable-cell[data-automation-id="${rowName}"] span.adf-datatable-cell-value[title="${rowName}"]`));
|
const row: ElementFinder = element(by.css(`div.adf-datatable-cell[data-automation-id="${rowName}"] span.adf-datatable-cell-value[title="${rowName}"]`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||||
return await row.getCssValue(styleName);
|
return row.getCssValue(styleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkEmptyFolderTextToBe(text): Promise<void> {
|
async checkEmptyFolderTextToBe(text): Promise<void> {
|
||||||
@@ -522,7 +522,7 @@ export class ContentServicesPage {
|
|||||||
async getRowIconImageUrl(fileName): Promise<string> {
|
async getRowIconImageUrl(fileName): Promise<string> {
|
||||||
const iconRow: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`));
|
const iconRow: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(iconRow);
|
await BrowserVisibility.waitUntilElementIsVisible(iconRow);
|
||||||
return await iconRow.getAttribute('src');
|
return iconRow.getAttribute('src');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkGridViewButtonIsVisible(): Promise<void> {
|
async checkGridViewButtonIsVisible(): Promise<void> {
|
||||||
@@ -545,7 +545,7 @@ export class ContentServicesPage {
|
|||||||
|
|
||||||
async getDocumentCardIconForElement(elementName): Promise<string> {
|
async getDocumentCardIconForElement(elementName): Promise<string> {
|
||||||
const elementIcon: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"] img`));
|
const elementIcon: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"] img`));
|
||||||
return await elementIcon.getAttribute('src');
|
return elementIcon.getAttribute('src');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkDocumentCardPropertyIsShowed(elementName, propertyName): Promise<void> {
|
async checkDocumentCardPropertyIsShowed(elementName, propertyName): Promise<void> {
|
||||||
@@ -555,7 +555,7 @@ export class ContentServicesPage {
|
|||||||
|
|
||||||
async getAttributeValueForElement(elementName, propertyName): Promise<string> {
|
async getAttributeValueForElement(elementName, propertyName): Promise<string> {
|
||||||
const elementSize = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`));
|
const elementSize = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`));
|
||||||
return await BrowserActions.getText(elementSize);
|
return BrowserActions.getText(elementSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkMenuIsShowedForElementIndex(elementIndex): Promise<void> {
|
async checkMenuIsShowedForElementIndex(elementIndex): Promise<void> {
|
||||||
|
@@ -138,7 +138,7 @@ export class DataTablePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getCopyContentTooltip(): Promise<string> {
|
async getCopyContentTooltip(): Promise<string> {
|
||||||
return await this.dataTable.getCopyContentTooltip();
|
return this.dataTable.getCopyContentTooltip();
|
||||||
}
|
}
|
||||||
|
|
||||||
async mouseOverNameColumn(name: string): Promise<void> {
|
async mouseOverNameColumn(name: string): Promise<void> {
|
||||||
@@ -191,6 +191,6 @@ export class DataTablePage {
|
|||||||
|
|
||||||
async getClipboardInputText(): Promise<string> {
|
async getClipboardInputText(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.pasteClipboardInput);
|
await BrowserVisibility.waitUntilElementIsVisible(this.pasteClipboardInput);
|
||||||
return await this.pasteClipboardInput.getAttribute('value');
|
return this.pasteClipboardInput.getAttribute('value');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -100,7 +100,7 @@ export class TasksCloudDemoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getActiveFilterName(): Promise<string> {
|
async getActiveFilterName(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.activeFilter);
|
return BrowserActions.getText(this.activeFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
customTaskFilter(filterName): TaskFiltersCloudComponentPage {
|
customTaskFilter(filterName): TaskFiltersCloudComponentPage {
|
||||||
@@ -146,13 +146,13 @@ export class TasksCloudDemoPage {
|
|||||||
|
|
||||||
async getNoOfSelectedRows(): Promise<number> {
|
async getNoOfSelectedRows(): Promise<number> {
|
||||||
await this.checkSelectedRowsIsDisplayed();
|
await this.checkSelectedRowsIsDisplayed();
|
||||||
return await this.noOfSelectedRows.count();
|
return this.noOfSelectedRows.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getSelectedTaskRowText(rowNo: string): Promise<string> {
|
async getSelectedTaskRowText(rowNo: string): Promise<string> {
|
||||||
await this.checkSelectedRowsIsDisplayed();
|
await this.checkSelectedRowsIsDisplayed();
|
||||||
const row: ElementFinder = element(by.xpath(`//div[text()=' Selected Rows: ']//li[${rowNo}]`));
|
const row: ElementFinder = element(by.xpath(`//div[text()=' Selected Rows: ']//li[${rowNo}]`));
|
||||||
return await BrowserActions.getText(row);
|
return BrowserActions.getText(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addActionIsDisplayed(): Promise<void> {
|
async addActionIsDisplayed(): Promise<void> {
|
||||||
|
@@ -35,7 +35,7 @@ export class CreateLibraryDialog {
|
|||||||
|
|
||||||
async getSelectedRadio(): Promise<string> {
|
async getSelectedRadio(): Promise<string> {
|
||||||
const radio: ElementFinder = element(by.css('.mat-radio-button[class*="checked"]'));
|
const radio: ElementFinder = element(by.css('.mat-radio-button[class*="checked"]'));
|
||||||
return await BrowserActions.getText(radio);
|
return BrowserActions.getText(radio);
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForDialogToOpen(): Promise<void> {
|
async waitForDialogToOpen(): Promise<void> {
|
||||||
@@ -47,27 +47,27 @@ export class CreateLibraryDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async isDialogOpen(): Promise<any> {
|
async isDialogOpen(): Promise<any> {
|
||||||
return await browser.isElementPresent(this.libraryDialog);
|
return browser.isElementPresent(this.libraryDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTitle(): Promise<string> {
|
async getTitle(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.libraryTitle);
|
return BrowserActions.getText(this.libraryTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getLibraryIdText(): Promise<string> {
|
async getLibraryIdText(): Promise<string> {
|
||||||
return await this.libraryIdField.getAttribute('value');
|
return this.libraryIdField.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async isErrorMessageDisplayed(): Promise<boolean> {
|
async isErrorMessageDisplayed(): Promise<boolean> {
|
||||||
return await this.errorMessage.isDisplayed();
|
return this.errorMessage.isDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getErrorMessage(): Promise<string> {
|
async getErrorMessage(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.errorMessage);
|
return BrowserActions.getText(this.errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getErrorMessages(position): Promise<string> {
|
async getErrorMessages(position): Promise<string> {
|
||||||
return await BrowserActions.getText(this.errorMessages.get(position));
|
return BrowserActions.getText(this.errorMessages.get(position));
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForLibraryNameHint(): Promise<void> {
|
async waitForLibraryNameHint(): Promise<void> {
|
||||||
@@ -75,39 +75,39 @@ export class CreateLibraryDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getLibraryNameHint(): Promise<string> {
|
async getLibraryNameHint(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.libraryNameHint);
|
return BrowserActions.getText(this.libraryNameHint);
|
||||||
}
|
}
|
||||||
|
|
||||||
async isNameDisplayed(): Promise<boolean> {
|
async isNameDisplayed(): Promise<boolean> {
|
||||||
return await this.libraryNameField.isDisplayed();
|
return this.libraryNameField.isDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isLibraryIdDisplayed(): Promise<boolean> {
|
async isLibraryIdDisplayed(): Promise<boolean> {
|
||||||
return await this.libraryIdField.isDisplayed();
|
return this.libraryIdField.isDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isDescriptionDisplayed(): Promise<boolean> {
|
async isDescriptionDisplayed(): Promise<boolean> {
|
||||||
return await this.libraryDescriptionField.isDisplayed();
|
return this.libraryDescriptionField.isDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isPublicDisplayed(): Promise<boolean> {
|
async isPublicDisplayed(): Promise<boolean> {
|
||||||
return await this.publicRadioButton.isDisplayed();
|
return this.publicRadioButton.isDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isModeratedDisplayed(): Promise<boolean> {
|
async isModeratedDisplayed(): Promise<boolean> {
|
||||||
return await this.moderatedRadioButton.isDisplayed();
|
return this.moderatedRadioButton.isDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isPrivateDisplayed(): Promise<boolean> {
|
async isPrivateDisplayed(): Promise<boolean> {
|
||||||
return await this.privateRadioButton.isDisplayed();
|
return this.privateRadioButton.isDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isCreateEnabled(): Promise<boolean> {
|
async isCreateEnabled(): Promise<boolean> {
|
||||||
return await this.createButton.isEnabled();
|
return this.createButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isCancelEnabled(): Promise<boolean> {
|
async isCancelEnabled(): Promise<boolean> {
|
||||||
return await this.cancelButton.isEnabled();
|
return this.cancelButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickCreate(): Promise<void> {
|
async clickCreate(): Promise<void> {
|
||||||
|
@@ -28,7 +28,7 @@ export class FolderDialog {
|
|||||||
validationMessage: ElementFinder = this.folderDialog.element(by.css('div.mat-form-field-subscript-wrapper mat-hint span'));
|
validationMessage: ElementFinder = this.folderDialog.element(by.css('div.mat-form-field-subscript-wrapper mat-hint span'));
|
||||||
|
|
||||||
async getDialogTitle(): Promise<string> {
|
async getDialogTitle(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.folderTitle);
|
return BrowserActions.getText(this.folderTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFolderDialogIsDisplayed(): Promise<void> {
|
async checkFolderDialogIsDisplayed(): Promise<void> {
|
||||||
@@ -62,11 +62,11 @@ export class FolderDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getFolderName(): Promise<string> {
|
async getFolderName(): Promise<string> {
|
||||||
return await this.folderNameField.getAttribute('value');
|
return this.folderNameField.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getValidationMessage(): Promise<string> {
|
async getValidationMessage(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.validationMessage);
|
return BrowserActions.getText(this.validationMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkValidationMessageIsNotDisplayed(): Promise<void> {
|
async checkValidationMessageIsNotDisplayed(): Promise<void> {
|
||||||
|
@@ -84,15 +84,15 @@ export class SearchDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getSpecificRowsHighlightName(name): Promise<string> {
|
async getSpecificRowsHighlightName(name): Promise<string> {
|
||||||
return await BrowserActions.getText(this.getRowByRowName(name).element(this.highlightName));
|
return BrowserActions.getText(this.getRowByRowName(name).element(this.highlightName));
|
||||||
}
|
}
|
||||||
|
|
||||||
async getSpecificRowsCompleteName(name): Promise<string> {
|
async getSpecificRowsCompleteName(name): Promise<string> {
|
||||||
return await BrowserActions.getText(this.getRowByRowName(name).element(this.completeName));
|
return BrowserActions.getText(this.getRowByRowName(name).element(this.completeName));
|
||||||
}
|
}
|
||||||
|
|
||||||
async getSpecificRowsAuthor(name): Promise<string> {
|
async getSpecificRowsAuthor(name): Promise<string> {
|
||||||
return await BrowserActions.getText(this.getRowByRowName(name).element(this.rowsAuthor));
|
return BrowserActions.getText(this.getRowByRowName(name).element(this.rowsAuthor));
|
||||||
}
|
}
|
||||||
|
|
||||||
async clearText(): Promise<void> {
|
async clearText(): Promise<void> {
|
||||||
|
@@ -61,7 +61,7 @@ export class ShareDialog {
|
|||||||
|
|
||||||
async getShareLink(): Promise<string> {
|
async getShareLink(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.shareLink);
|
await BrowserVisibility.waitUntilElementIsVisible(this.shareLink);
|
||||||
return await this.shareLink.getAttribute('value');
|
return this.shareLink.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickCloseButton(): Promise<void> {
|
async clickCloseButton(): Promise<void> {
|
||||||
@@ -120,7 +120,7 @@ export class ShareDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getExpirationDate(): Promise<string> {
|
async getExpirationDate(): Promise<string> {
|
||||||
return await this.expirationDateInput.getAttribute('value');
|
return this.expirationDateInput.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async expirationDateInputHasValue(value): Promise<void> {
|
async expirationDateInputHasValue(value): Promise<void> {
|
||||||
|
@@ -107,7 +107,7 @@ export class UploadDialog {
|
|||||||
|
|
||||||
async getTitleText(): Promise<string> {
|
async getTitleText(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.title);
|
await BrowserVisibility.waitUntilElementIsVisible(this.title);
|
||||||
return await this.title.getText();
|
return this.title.getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getConfirmationDialogTitleText(): Promise<string> {
|
async getConfirmationDialogTitleText(): Promise<string> {
|
||||||
@@ -152,7 +152,7 @@ export class UploadDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getTooltip(): Promise<string> {
|
async getTooltip(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.errorTooltip);
|
return BrowserActions.getText(this.errorTooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -30,7 +30,7 @@ export class IconsPage {
|
|||||||
async isCustomIconDisplayed(name) {
|
async isCustomIconDisplayed(name) {
|
||||||
const present = await browser.isElementPresent(this.locateCustomIcon(name));
|
const present = await browser.isElementPresent(this.locateCustomIcon(name));
|
||||||
if (present) {
|
if (present) {
|
||||||
return await this.locateCustomIcon(name).isDisplayed();
|
return this.locateCustomIcon(name).isDisplayed();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ export class IconsPage {
|
|||||||
async isLigatureIconDisplayed(name) {
|
async isLigatureIconDisplayed(name) {
|
||||||
const present = await browser.isElementPresent(this.locateLigatureIcon(name));
|
const present = await browser.isElementPresent(this.locateLigatureIcon(name));
|
||||||
if (present) {
|
if (present) {
|
||||||
return await this.locateLigatureIcon(name).isDisplayed();
|
return this.locateLigatureIcon(name).isDisplayed();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -47,51 +47,51 @@ export class MetadataViewPage {
|
|||||||
applyAspect: ElementFinder = element(by.cssContainingText(`button span.mat-button-wrapper`, 'Apply Aspect'));
|
applyAspect: ElementFinder = element(by.cssContainingText(`button span.mat-button-wrapper`, 'Apply Aspect'));
|
||||||
|
|
||||||
async getTitle(): Promise<string> {
|
async getTitle(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.title);
|
return BrowserActions.getText(this.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getExpandedAspectName(): Promise<string> {
|
async getExpandedAspectName(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.expandedAspect.element(this.aspectTitle));
|
return BrowserActions.getText(this.expandedAspect.element(this.aspectTitle));
|
||||||
}
|
}
|
||||||
|
|
||||||
async getName(): Promise<string> {
|
async getName(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.name);
|
return BrowserActions.getText(this.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getCreator(): Promise<string> {
|
async getCreator(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.creator);
|
return BrowserActions.getText(this.creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getCreatedDate(): Promise<string> {
|
async getCreatedDate(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.createdDate);
|
return BrowserActions.getText(this.createdDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getModifier(): Promise<string> {
|
async getModifier(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.modifier);
|
return BrowserActions.getText(this.modifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getModifiedDate(): Promise<string> {
|
async getModifiedDate(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.modifiedDate);
|
return BrowserActions.getText(this.modifiedDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMimetypeName(): Promise<string> {
|
async getMimetypeName(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.mimetypeName);
|
return BrowserActions.getText(this.mimetypeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getSize(): Promise<string> {
|
async getSize(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.size);
|
return BrowserActions.getText(this.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDescription(): Promise<string> {
|
async getDescription(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.description);
|
return BrowserActions.getText(this.description);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAuthor(): Promise<string> {
|
async getAuthor(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.author);
|
return BrowserActions.getText(this.author);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTitleProperty(): Promise<string> {
|
async getTitleProperty(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.titleProperty);
|
return BrowserActions.getText(this.titleProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
async editIconIsDisplayed(): Promise<void> {
|
async editIconIsDisplayed(): Promise<void> {
|
||||||
@@ -119,11 +119,11 @@ export class MetadataViewPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getInformationButtonText(): Promise<string> {
|
async getInformationButtonText(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.informationSpan);
|
return BrowserActions.getText(this.informationSpan);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getInformationIconText(): Promise<string> {
|
async getInformationIconText(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.informationIcon);
|
return BrowserActions.getText(this.informationIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnPropertiesTab(): Promise<void> {
|
async clickOnPropertiesTab(): Promise<void> {
|
||||||
@@ -132,7 +132,7 @@ export class MetadataViewPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getEditIconTooltip(): Promise<string> {
|
async getEditIconTooltip(): Promise<string> {
|
||||||
return await this.editIcon.getAttribute('title');
|
return this.editIcon.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async editPropertyIconIsDisplayed(propertyName: string) {
|
async editPropertyIconIsDisplayed(propertyName: string) {
|
||||||
@@ -179,7 +179,7 @@ export class MetadataViewPage {
|
|||||||
const propertyType = type || 'textitem';
|
const propertyType = type || 'textitem';
|
||||||
const textField: ElementFinder = element(by.css('span[data-automation-id="card-' + propertyType + '-value-' + propertyName + '"]'));
|
const textField: ElementFinder = element(by.css('span[data-automation-id="card-' + propertyType + '-value-' + propertyName + '"]'));
|
||||||
|
|
||||||
return await BrowserActions.getText(textField);
|
return BrowserActions.getText(textField);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clearPropertyIconIsDisplayed(propertyName: string): Promise<void> {
|
async clearPropertyIconIsDisplayed(propertyName: string): Promise<void> {
|
||||||
@@ -194,7 +194,7 @@ export class MetadataViewPage {
|
|||||||
|
|
||||||
async getPropertyIconTooltip(propertyName: string): Promise<string> {
|
async getPropertyIconTooltip(propertyName: string): Promise<string> {
|
||||||
const editPropertyIcon: ElementFinder = element(by.css('button[data-automation-id="card-textitem-edit-icon-' + propertyName + '"]'));
|
const editPropertyIcon: ElementFinder = element(by.css('button[data-automation-id="card-textitem-edit-icon-' + propertyName + '"]'));
|
||||||
return await editPropertyIcon.getAttribute('title');
|
return editPropertyIcon.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickMetadataGroup(groupName: string): Promise<void> {
|
async clickMetadataGroup(groupName: string): Promise<void> {
|
||||||
@@ -226,7 +226,7 @@ export class MetadataViewPage {
|
|||||||
|
|
||||||
async getMetadataGroupTitle(groupName: string): Promise<string> {
|
async getMetadataGroupTitle(groupName: string): Promise<string> {
|
||||||
const group = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"] > mat-expansion-panel-header > span > mat-panel-title'));
|
const group = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"] > mat-expansion-panel-header > span > mat-panel-title'));
|
||||||
return await BrowserActions.getText(group);
|
return BrowserActions.getText(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkPropertyIsVisible(propertyName: string, type: string): Promise<void> {
|
async checkPropertyIsVisible(propertyName: string, type: string): Promise<void> {
|
||||||
|
@@ -100,7 +100,7 @@ export class PermissionsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getPermissionInheritedButtonText(): Promise<string> {
|
async getPermissionInheritedButtonText(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.permissionInheritedButton);
|
return BrowserActions.getText(this.permissionInheritedButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkPermissionsDatatableIsDisplayed(): Promise<void> {
|
async checkPermissionsDatatableIsDisplayed(): Promise<void> {
|
||||||
@@ -109,7 +109,7 @@ export class PermissionsPage {
|
|||||||
|
|
||||||
async getRoleCellValue(rowName): Promise<string> {
|
async getRoleCellValue(rowName): Promise<string> {
|
||||||
const locator = this.dataTableComponentPage.getCellByRowContentAndColumn('Authority ID', rowName, column.role);
|
const locator = this.dataTableComponentPage.getCellByRowContentAndColumn('Authority ID', rowName, column.role);
|
||||||
return await BrowserActions.getText(locator);
|
return BrowserActions.getText(locator);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickRoleDropdownByUserOrGroupName(name): Promise<void> {
|
async clickRoleDropdownByUserOrGroupName(name): Promise<void> {
|
||||||
|
@@ -38,7 +38,7 @@ export class FiltersPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsNameColumn() {
|
async getAllRowsNameColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues('Name');
|
return this.dataTable.getAllRowsColumnValues('Name');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -85,7 +85,7 @@ export class ProcessFiltersPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async numberOfProcessRows(): Promise<number> {
|
async numberOfProcessRows(): Promise<number> {
|
||||||
return await element.all(this.rows).count();
|
return element.all(this.rows).count();
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForTableBody(): Promise<void> {
|
async waitForTableBody(): Promise<void> {
|
||||||
@@ -102,7 +102,7 @@ export class ProcessFiltersPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsNameColumn() {
|
async getAllRowsNameColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues('Name');
|
return this.dataTable.getAllRowsColumnValues('Name');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFilterIsDisplayed(name): Promise<void> {
|
async checkFilterIsDisplayed(name): Promise<void> {
|
||||||
@@ -120,7 +120,7 @@ export class ProcessFiltersPage {
|
|||||||
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||||
const icon = filterName.element(this.processIcon);
|
const icon = filterName.element(this.processIcon);
|
||||||
return await BrowserActions.getText(icon);
|
return BrowserActions.getText(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFilterIsNotDisplayed(name): Promise<void> {
|
async checkFilterIsNotDisplayed(name): Promise<void> {
|
||||||
|
@@ -372,7 +372,7 @@ export class TaskDetailsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async isCompleteButtonWithFormEnabled(): Promise<boolean> {
|
async isCompleteButtonWithFormEnabled(): Promise<boolean> {
|
||||||
return await this.completeFormTask.isEnabled();
|
return this.completeFormTask.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -141,11 +141,11 @@ export class TasksPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clickSortByNameAsc(): Promise<any> {
|
async clickSortByNameAsc(): Promise<any> {
|
||||||
return await this.tasksListPage().getDataTable().sortByColumn('ASC', 'name');
|
return this.tasksListPage().getDataTable().sortByColumn('ASC', 'name');
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickSortByNameDesc(): Promise<any> {
|
async clickSortByNameDesc(): Promise<any> {
|
||||||
return await this.tasksListPage().getDataTable().sortByColumn('DESC', 'name');
|
return this.tasksListPage().getDataTable().sortByColumn('DESC', 'name');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -120,11 +120,11 @@ export class SearchFiltersPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async isTypeFacetQueryGroupPresent(): Promise<boolean> {
|
async isTypeFacetQueryGroupPresent(): Promise<boolean> {
|
||||||
return await this.facetQueriesTypeGroup.isPresent();
|
return this.facetQueriesTypeGroup.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isSizeFacetQueryGroupPresent(): Promise<boolean> {
|
async isSizeFacetQueryGroupPresent(): Promise<boolean> {
|
||||||
return await this.facetQueriesSizeGroup.isPresent();
|
return this.facetQueriesSizeGroup.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickCheckListFilter(): Promise<void> {
|
async clickCheckListFilter(): Promise<void> {
|
||||||
|
@@ -40,7 +40,7 @@ export class SearchResultsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async numberOfResultsDisplayed(): Promise<number> {
|
async numberOfResultsDisplayed(): Promise<number> {
|
||||||
return await this.dataTable.numberOfRows();
|
return this.dataTable.numberOfRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkContentIsNotDisplayed(content): Promise<void> {
|
async checkContentIsNotDisplayed(content): Promise<void> {
|
||||||
|
@@ -37,7 +37,7 @@ export class TagPage {
|
|||||||
|
|
||||||
async getNodeId(): Promise<string> {
|
async getNodeId(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.insertNodeIdElement);
|
await BrowserVisibility.waitUntilElementIsVisible(this.insertNodeIdElement);
|
||||||
return await this.insertNodeIdElement.getAttribute('value');
|
return this.insertNodeIdElement.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async insertNodeId(nodeId) {
|
async insertNodeId(nodeId) {
|
||||||
@@ -72,17 +72,17 @@ export class TagPage {
|
|||||||
|
|
||||||
async getNewTagInput(): Promise<string> {
|
async getNewTagInput(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.newTagInput);
|
await BrowserVisibility.waitUntilElementIsVisible(this.newTagInput);
|
||||||
return await this.newTagInput.getAttribute('value');
|
return this.newTagInput.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getNewTagPlaceholder(): Promise<string> {
|
async getNewTagPlaceholder(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.newTagInput);
|
await BrowserVisibility.waitUntilElementIsVisible(this.newTagInput);
|
||||||
return await this.newTagInput.getAttribute('placeholder');
|
return this.newTagInput.getAttribute('placeholder');
|
||||||
}
|
}
|
||||||
|
|
||||||
async addTagButtonIsEnabled(): Promise<boolean> {
|
async addTagButtonIsEnabled(): Promise<boolean> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.addTagButton);
|
await BrowserVisibility.waitUntilElementIsVisible(this.addTagButton);
|
||||||
return await this.addTagButton.isEnabled();
|
return this.addTagButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTagIsDisplayedInTagList(tagName): Promise<void> {
|
async checkTagIsDisplayedInTagList(tagName): Promise<void> {
|
||||||
@@ -119,7 +119,7 @@ export class TagPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getErrorMessage(): Promise<string> {
|
async getErrorMessage(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.errorMessage);
|
return BrowserActions.getText(this.errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTagListIsOrderedAscending(): Promise<any> {
|
async checkTagListIsOrderedAscending(): Promise<any> {
|
||||||
@@ -181,7 +181,7 @@ export class TagPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkTagsOnList(): Promise<number> {
|
async checkTagsOnList(): Promise<number> {
|
||||||
return await this.tagsOnPage.count();
|
return this.tagsOnPage.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkShowLessButtonIsDisplayed(): Promise<void> {
|
async checkShowLessButtonIsDisplayed(): Promise<void> {
|
||||||
|
@@ -29,7 +29,7 @@ export class TrashcanPage {
|
|||||||
restoreButton: ElementFinder = element(by.css(`button[title='Restore']`));
|
restoreButton: ElementFinder = element(by.css(`button[title='Restore']`));
|
||||||
|
|
||||||
async numberOfResultsDisplayed(): Promise<number> {
|
async numberOfResultsDisplayed(): Promise<number> {
|
||||||
return await element.all(this.rows).count();
|
return element.all(this.rows).count();
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForTableBody(): Promise<void> {
|
async waitForTableBody(): Promise<void> {
|
||||||
|
@@ -52,7 +52,7 @@ export class VersionManagePage {
|
|||||||
|
|
||||||
async getFileVersionName(version): Promise<string> {
|
async getFileVersionName(version): Promise<string> {
|
||||||
const fileElement: ElementFinder = element(by.css(`[id="adf-version-list-item-name-${version}"]`));
|
const fileElement: ElementFinder = element(by.css(`[id="adf-version-list-item-name-${version}"]`));
|
||||||
return await BrowserActions.getText(fileElement);
|
return BrowserActions.getText(fileElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFileVersionExist(version): Promise<void> {
|
async checkFileVersionExist(version): Promise<void> {
|
||||||
@@ -67,12 +67,12 @@ export class VersionManagePage {
|
|||||||
|
|
||||||
async getFileVersionComment(version): Promise<string> {
|
async getFileVersionComment(version): Promise<string> {
|
||||||
const fileComment: ElementFinder = element(by.id(`adf-version-list-item-comment-${version}`));
|
const fileComment: ElementFinder = element(by.id(`adf-version-list-item-comment-${version}`));
|
||||||
return await BrowserActions.getText(fileComment);
|
return BrowserActions.getText(fileComment);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFileVersionDate(version): Promise<string> {
|
async getFileVersionDate(version): Promise<string> {
|
||||||
const fileDate: ElementFinder = element(by.id(`adf-version-list-item-date-${version}`));
|
const fileDate: ElementFinder = element(by.id(`adf-version-list-item-date-${version}`));
|
||||||
return await BrowserActions.getText(fileDate);
|
return BrowserActions.getText(fileDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterCommentText(text): Promise<void> {
|
async enterCommentText(text): Promise<void> {
|
||||||
|
@@ -15,6 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* tslint:disable:no-console */
|
||||||
|
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
@@ -123,7 +123,7 @@ export class ViewUtilService {
|
|||||||
} else {
|
} else {
|
||||||
retries += 1;
|
retries += 1;
|
||||||
await this.wait(1000);
|
await this.wait(1000);
|
||||||
return await this.waitRendition(nodeId, renditionId, retries);
|
return this.waitRendition(nodeId, renditionId, retries);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -216,7 +216,7 @@ export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
const isUserValid: boolean = this.userExists(result);
|
const isUserValid: boolean = this.userExists(result);
|
||||||
return isUserValid ? result : null;
|
return isUserValid ? result : null;
|
||||||
});
|
});
|
||||||
return await Promise.all(promiseBatch);
|
return Promise.all(promiseBatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
async searchUser(user: IdentityUserModel) {
|
async searchUser(user: IdentityUserModel) {
|
||||||
@@ -231,7 +231,7 @@ export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'id': return await this.identityUserService.findUserById(user[key]).toPromise();
|
case 'id': return this.identityUserService.findUserById(user[key]).toPromise();
|
||||||
case 'username': return (await this.identityUserService.findUserByUsername(user[key]).toPromise())[0];
|
case 'username': return (await this.identityUserService.findUserByUsername(user[key]).toPromise())[0];
|
||||||
case 'email': return (await this.identityUserService.findUserByEmail(user[key]).toPromise())[0];
|
case 'email': return (await this.identityUserService.findUserByEmail(user[key]).toPromise())[0];
|
||||||
default: return of([]);
|
default: return of([]);
|
||||||
|
@@ -39,7 +39,7 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getDialogHeaderText(): Promise<string> {
|
async getDialogHeaderText(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.header);
|
return BrowserActions.getText(this.header);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkSearchInputIsDisplayed(): Promise<void> {
|
async checkSearchInputIsDisplayed(): Promise<void> {
|
||||||
@@ -47,7 +47,7 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getSearchLabel(): Promise<string> {
|
async getSearchLabel(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.searchLabel);
|
return BrowserActions.getText(this.searchLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkSelectedSiteIsDisplayed(siteName): Promise<void> {
|
async checkSelectedSiteIsDisplayed(siteName): Promise<void> {
|
||||||
@@ -63,11 +63,11 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkCancelButtonIsEnabled(): Promise<boolean> {
|
async checkCancelButtonIsEnabled(): Promise<boolean> {
|
||||||
return await this.cancelButton.isEnabled();
|
return this.cancelButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkCopyMoveButtonIsEnabled(): Promise<boolean> {
|
async checkCopyMoveButtonIsEnabled(): Promise<boolean> {
|
||||||
return await this.moveCopyButton.isEnabled();
|
return this.moveCopyButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkMoveCopyButtonIsDisplayed(): Promise<void> {
|
async checkMoveCopyButtonIsDisplayed(): Promise<void> {
|
||||||
@@ -75,7 +75,7 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getMoveCopyButtonText(): Promise<string> {
|
async getMoveCopyButtonText(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.moveCopyButton);
|
return BrowserActions.getText(this.moveCopyButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickMoveCopyButton(): Promise<void> {
|
async clickMoveCopyButton(): Promise<void> {
|
||||||
@@ -83,7 +83,7 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async numberOfResultsDisplayed(): Promise<number> {
|
async numberOfResultsDisplayed(): Promise<number> {
|
||||||
return await this.contentList.dataTablePage().numberOfRows();
|
return this.contentList.dataTablePage().numberOfRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeIntoNodeSelectorSearchField(text): Promise<void> {
|
async typeIntoNodeSelectorSearchField(text): Promise<void> {
|
||||||
|
@@ -50,7 +50,7 @@ export class DocumentListPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getTooltip(nodeName: string): Promise<string> {
|
async getTooltip(nodeName: string): Promise<string> {
|
||||||
return await this.dataTable.getTooltip('Display name', nodeName);
|
return this.dataTable.getTooltip('Display name', nodeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectRow(nodeName: string): Promise<void> {
|
async selectRow(nodeName: string): Promise<void> {
|
||||||
@@ -78,7 +78,7 @@ export class DocumentListPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsColumnValues(column: string) {
|
async getAllRowsColumnValues(column: string) {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column);
|
return this.dataTable.getAllRowsColumnValues(column);
|
||||||
}
|
}
|
||||||
|
|
||||||
async doubleClickRow(nodeName: string): Promise<void> {
|
async doubleClickRow(nodeName: string): Promise<void> {
|
||||||
|
@@ -37,7 +37,7 @@ export class DateRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getFromDate(): Promise<string> {
|
async getFromDate(): Promise<string> {
|
||||||
return await this.filter.element(this.fromField).getAttribute('value');
|
return this.filter.element(this.fromField).getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async putFromDate(date): Promise<void> {
|
async putFromDate(date): Promise<void> {
|
||||||
@@ -91,7 +91,7 @@ export class DateRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getToDate(): Promise<string> {
|
async getToDate(): Promise<string> {
|
||||||
return await this.filter.element(this.toField).getAttribute('value');
|
return this.filter.element(this.toField).getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async putToDate(date): Promise<void> {
|
async putToDate(date): Promise<void> {
|
||||||
|
@@ -40,7 +40,7 @@ export class NumberRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getFromNumber(): Promise<string> {
|
async getFromNumber(): Promise<string> {
|
||||||
return await this.filter.element(this.fromInput).getAttribute('value');
|
return this.filter.element(this.fromInput).getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async putFromNumber(value): Promise<void> {
|
async putFromNumber(value): Promise<void> {
|
||||||
@@ -50,7 +50,7 @@ export class NumberRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getFromErrorRequired(): Promise<string> {
|
async getFromErrorRequired(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.filter.element(this.fromErrorRequired));
|
return BrowserActions.getText(this.filter.element(this.fromErrorRequired));
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFromErrorRequiredIsDisplayed(): Promise<void> {
|
async checkFromErrorRequiredIsDisplayed(): Promise<void> {
|
||||||
@@ -58,7 +58,7 @@ export class NumberRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getFromErrorInvalid(): Promise<string> {
|
async getFromErrorInvalid(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.filter.element(this.fromErrorInvalid));
|
return BrowserActions.getText(this.filter.element(this.fromErrorInvalid));
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFromErrorInvalidIsDisplayed(): Promise<void> {
|
async checkFromErrorInvalidIsDisplayed(): Promise<void> {
|
||||||
@@ -75,7 +75,7 @@ export class NumberRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getToNumber(): Promise<string> {
|
async getToNumber(): Promise<string> {
|
||||||
return await this.filter.element(this.toInput).getAttribute('value');
|
return this.filter.element(this.toInput).getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async putToNumber(value): Promise<void> {
|
async putToNumber(value): Promise<void> {
|
||||||
@@ -85,7 +85,7 @@ export class NumberRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getToErrorRequired(): Promise<string> {
|
async getToErrorRequired(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.filter.element(this.toErrorRequired));
|
return BrowserActions.getText(this.filter.element(this.toErrorRequired));
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkToErrorRequiredIsDisplayed(): Promise<void> {
|
async checkToErrorRequiredIsDisplayed(): Promise<void> {
|
||||||
@@ -93,7 +93,7 @@ export class NumberRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getToErrorInvalid(): Promise<string> {
|
async getToErrorInvalid(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.filter.element(this.toErrorInvalid));
|
return BrowserActions.getText(this.filter.element(this.toErrorInvalid));
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkToErrorInvalidIsDisplayed(): Promise<void> {
|
async checkToErrorInvalidIsDisplayed(): Promise<void> {
|
||||||
@@ -113,7 +113,7 @@ export class NumberRangeFilterPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkApplyButtonIsEnabled(): Promise<boolean> {
|
async checkApplyButtonIsEnabled(): Promise<boolean> {
|
||||||
return await this.filter.element(this.applyButton).isEnabled();
|
return this.filter.element(this.applyButton).isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickClearButton(): Promise<void> {
|
async clickClearButton(): Promise<void> {
|
||||||
|
@@ -31,15 +31,15 @@ export class SearchSliderPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getMaxValue() {
|
async getMaxValue() {
|
||||||
return await this.filter.element(this.slider).getAttribute('aria-valuemax');
|
return this.filter.element(this.slider).getAttribute('aria-valuemax');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMinValue() {
|
async getMinValue() {
|
||||||
return await this.filter.element(this.slider).getAttribute('aria-valuemin');
|
return this.filter.element(this.slider).getAttribute('aria-valuemin');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getValue() {
|
async getValue() {
|
||||||
return await this.filter.element(this.slider).getAttribute('aria-valuenow');
|
return this.filter.element(this.slider).getAttribute('aria-valuenow');
|
||||||
}
|
}
|
||||||
|
|
||||||
async setValue(value: number): Promise<void> {
|
async setValue(value: number): Promise<void> {
|
||||||
@@ -65,7 +65,7 @@ export class SearchSliderPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkClearButtonIsEnabled() {
|
async checkClearButtonIsEnabled() {
|
||||||
return await this.filter.element(this.clearButton).isEnabled();
|
return this.filter.element(this.clearButton).isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkClearButtonIsDisplayed(): Promise<void> {
|
async checkClearButtonIsDisplayed(): Promise<void> {
|
||||||
|
@@ -81,7 +81,7 @@ export class DataTableComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getNumberOfSelectedRows(): Promise<number> {
|
async getNumberOfSelectedRows(): Promise<number> {
|
||||||
return await this.allSelectedRows.count();
|
return this.allSelectedRows.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectRow(columnName, columnValue): Promise<void> {
|
async selectRow(columnName, columnValue): Promise<void> {
|
||||||
@@ -110,7 +110,7 @@ export class DataTableComponentPage {
|
|||||||
const row = this.getRow(identifyingColumn, identifyingValue);
|
const row = this.getRow(identifyingColumn, identifyingValue);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||||
const rowColumn = row.element(by.css(`div[title="${columnName}"] span`));
|
const rowColumn = row.element(by.css(`div[title="${columnName}"] span`));
|
||||||
return await BrowserActions.getText(rowColumn);
|
return BrowserActions.getText(rowColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -146,7 +146,7 @@ export class DataTableComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getTooltip(columnName, columnValue): Promise<string> {
|
async getTooltip(columnName, columnValue): Promise<string> {
|
||||||
return await this.getCellElementByValue(columnName, columnValue).getAttribute('title');
|
return this.getCellElementByValue(columnName, columnValue).getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async rightClickOnRowByIndex(index: number): Promise<void> {
|
async rightClickOnRowByIndex(index: number): Promise<void> {
|
||||||
@@ -160,15 +160,15 @@ export class DataTableComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async numberOfRows(): Promise<number> {
|
async numberOfRows(): Promise<number> {
|
||||||
return await this.rootElement.all(this.rows).count();
|
return this.rootElement.all(this.rows).count();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsColumnValues(column: string) {
|
async getAllRowsColumnValues(column: string) {
|
||||||
const columnLocator = by.css("adf-datatable div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row'] div[title='" + column + "'] span");
|
const columnLocator = by.css("adf-datatable div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row'] div[title='" + column + "'] span");
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(element.all(columnLocator).first());
|
await BrowserVisibility.waitUntilElementIsPresent(element.all(columnLocator).first());
|
||||||
return await element.all(columnLocator)
|
return element.all(columnLocator)
|
||||||
.filter(async (el) => await el.isPresent())
|
.filter(async (el) => el.isPresent())
|
||||||
.map(async (el) => await el.getText());
|
.map(async (el) => el.getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRowsWithSameColumnValues(columnName: string, columnValue) {
|
async getRowsWithSameColumnValues(columnName: string, columnValue) {
|
||||||
@@ -189,7 +189,7 @@ export class DataTableComponentPage {
|
|||||||
|
|
||||||
async getFirstElementDetail(detail: string): Promise<string> {
|
async getFirstElementDetail(detail: string): Promise<string> {
|
||||||
const firstNode = element.all(by.css(`adf-datatable div[title="${detail}"] span`)).first();
|
const firstNode = element.all(by.css(`adf-datatable div[title="${detail}"] span`)).first();
|
||||||
return await BrowserActions.getText(firstNode);
|
return BrowserActions.getText(firstNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
geCellElementDetail(detail: string): ElementArrayFinder {
|
geCellElementDetail(detail: string): ElementArrayFinder {
|
||||||
@@ -241,7 +241,7 @@ export class DataTableComponentPage {
|
|||||||
|
|
||||||
async contentInPosition(position: number): Promise<string> {
|
async contentInPosition(position: number): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first());
|
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first());
|
||||||
return await BrowserActions.getText(this.contents.get(position - 1));
|
return BrowserActions.getText(this.contents.get(position - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
getCellElementByValue(columnName: string, columnValue: string): ElementFinder {
|
getCellElementByValue(columnName: string, columnValue: string): ElementFinder {
|
||||||
@@ -261,11 +261,11 @@ export class DataTableComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getNumberOfColumns(): Promise<number> {
|
async getNumberOfColumns(): Promise<number> {
|
||||||
return await this.allColumns.count();
|
return this.allColumns.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getNumberOfRows(): Promise<number> {
|
async getNumberOfRows(): Promise<number> {
|
||||||
return await this.list.count();
|
return this.list.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
getCellByRowNumberAndColumnName(rowNumber, columnName): ElementFinder {
|
getCellByRowNumberAndColumnName(rowNumber, columnName): ElementFinder {
|
||||||
@@ -333,7 +333,7 @@ export class DataTableComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getCopyContentTooltip(): Promise<string> {
|
async getCopyContentTooltip(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.copyColumnTooltip);
|
return BrowserActions.getText(this.copyColumnTooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
async copyContentTooltipIsNotDisplayed(): Promise<void> {
|
async copyContentTooltipIsNotDisplayed(): Promise<void> {
|
||||||
|
@@ -31,7 +31,7 @@ export class AmountWidget {
|
|||||||
|
|
||||||
async getAmountFieldCurrency(fieldId): Promise<string> {
|
async getAmountFieldCurrency(fieldId): Promise<string> {
|
||||||
const widget = await this.formFields.getWidget(fieldId);
|
const widget = await this.formFields.getWidget(fieldId);
|
||||||
return await BrowserActions.getText(widget.element(this.currency));
|
return BrowserActions.getText(widget.element(this.currency));
|
||||||
}
|
}
|
||||||
|
|
||||||
async setFieldValue(fieldId, value): Promise<void> {
|
async setFieldValue(fieldId, value): Promise<void> {
|
||||||
|
@@ -127,7 +127,7 @@ export class LoginPage {
|
|||||||
|
|
||||||
async getSignInButtonIsEnabled(): Promise<boolean> {
|
async getSignInButtonIsEnabled(): Promise<boolean> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.signInButton);
|
await BrowserVisibility.waitUntilElementIsVisible(this.signInButton);
|
||||||
return await this.signInButton.isEnabled();
|
return this.signInButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async loginToAllUsingUserModel(userModel): Promise<void> {
|
async loginToAllUsingUserModel(userModel): Promise<void> {
|
||||||
|
@@ -73,11 +73,11 @@ export class SettingsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getBpmHostUrl() {
|
async getBpmHostUrl() {
|
||||||
return await this.bpmText.getAttribute('value');
|
return this.bpmText.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getEcmHostUrl() {
|
async getEcmHostUrl() {
|
||||||
return await this.ecmText.getAttribute('value');
|
return this.ecmText.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
getBpmOption() {
|
getBpmOption() {
|
||||||
|
@@ -118,20 +118,20 @@ export class ViewerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getZoom(): Promise<string> {
|
async getZoom(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.percentage);
|
return BrowserActions.getText(this.percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getCanvasWidth(): Promise<string> {
|
async getCanvasWidth(): Promise<string> {
|
||||||
return await this.canvasLayer.getAttribute(`width`);
|
return this.canvasLayer.getAttribute(`width`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getCanvasHeight(): Promise<string> {
|
async getCanvasHeight(): Promise<string> {
|
||||||
return await this.canvasLayer.getAttribute(`height`);
|
return this.canvasLayer.getAttribute(`height`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDisplayedFileName(): Promise<string> {
|
async getDisplayedFileName(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.fileName);
|
await BrowserVisibility.waitUntilElementIsVisible(this.fileName);
|
||||||
return await BrowserActions.getText(this.fileName);
|
return BrowserActions.getText(this.fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async exitFullScreen(): Promise<void> {
|
async exitFullScreen(): Promise<void> {
|
||||||
@@ -209,11 +209,11 @@ export class ViewerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getLastButtonTitle(): Promise<string> {
|
async getLastButtonTitle(): Promise<string> {
|
||||||
return await this.lastButton.getAttribute('title');
|
return this.lastButton.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMoreActionsMenuTitle(): Promise<string> {
|
async getMoreActionsMenuTitle(): Promise<string> {
|
||||||
return await this.moreActionsMenu.getAttribute('title');
|
return this.moreActionsMenu.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkDownloadButtonIsDisplayed(): Promise<void> {
|
async checkDownloadButtonIsDisplayed(): Promise<void> {
|
||||||
@@ -428,7 +428,7 @@ export class ViewerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getActiveTab(): Promise<string> {
|
async getActiveTab(): Promise<string> {
|
||||||
return await BrowserActions.getText(this.activeTab);
|
return BrowserActions.getText(this.activeTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnCommentsTab(): Promise<void> {
|
async clickOnCommentsTab(): Promise<void> {
|
||||||
@@ -617,12 +617,12 @@ export class ViewerPage {
|
|||||||
|
|
||||||
async getTabLabelById(index: number): Promise<string> {
|
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: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
|
||||||
return await BrowserActions.getText(tab);
|
return BrowserActions.getText(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTabIconById(index: number): Promise<string> {
|
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: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
|
||||||
return await BrowserActions.getText(tab);
|
return BrowserActions.getText(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUnknownFormatIsDisplayed(): Promise<void> {
|
async checkUnknownFormatIsDisplayed(): Promise<void> {
|
||||||
@@ -631,6 +631,6 @@ export class ViewerPage {
|
|||||||
|
|
||||||
async getUnknownFormatMessage(): Promise<string> {
|
async getUnknownFormatMessage(): Promise<string> {
|
||||||
const unknownFormatLabel = this.unknownFormat.element(by.css(`.label`));
|
const unknownFormatLabel = this.unknownFormat.element(by.css(`.label`));
|
||||||
return await BrowserActions.getText(unknownFormatLabel);
|
return BrowserActions.getText(unknownFormatLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -72,7 +72,7 @@ export class BrowserActions {
|
|||||||
static async getColor(elementFinder: ElementFinder): Promise<string> {
|
static async getColor(elementFinder: ElementFinder): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(elementFinder);
|
await BrowserVisibility.waitUntilElementIsVisible(elementFinder);
|
||||||
const webElem = await elementFinder.getWebElement();
|
const webElem = await elementFinder.getWebElement();
|
||||||
return await webElem.getCssValue('color');
|
return webElem.getCssValue('color');
|
||||||
}
|
}
|
||||||
|
|
||||||
static async clearWithBackSpace(elementFinder: ElementFinder) {
|
static async clearWithBackSpace(elementFinder: ElementFinder) {
|
||||||
|
@@ -27,7 +27,7 @@ export class DatePickerPage {
|
|||||||
previousMonthButton: ElementFinder = element(by.css('button[class*="mat-calendar-previous-button"]'));
|
previousMonthButton: ElementFinder = element(by.css('button[class*="mat-calendar-previous-button"]'));
|
||||||
|
|
||||||
async getSelectedDate(): Promise<string> {
|
async getSelectedDate(): Promise<string> {
|
||||||
return await element(by.css('td[class*="mat-calendar-body-active"]')).getAttribute('aria-label');
|
return element(by.css('td[class*="mat-calendar-body-active"]')).getAttribute('aria-label');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkDatesAfterDateAreDisabled(date): Promise<void> {
|
async checkDatesAfterDateAreDisabled(date): Promise<void> {
|
||||||
|
@@ -41,7 +41,7 @@ export class AppListCloudPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getNameOfTheApplications(): Promise<string> {
|
async getNameOfTheApplications(): Promise<string> {
|
||||||
return await BrowserActions.getArrayText(this.nameOfAllApps);
|
return BrowserActions.getArrayText(this.nameOfAllApps);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAppIsNotDisplayed(applicationName): Promise<void> {
|
async checkAppIsNotDisplayed(applicationName): Promise<void> {
|
||||||
|
@@ -36,7 +36,7 @@ export class EditProcessFilterCloudComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async isFilterDisplayed(): Promise<boolean> {
|
async isFilterDisplayed(): Promise<boolean> {
|
||||||
return await BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
return BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
async openFilter(): Promise<void> {
|
async openFilter(): Promise<void> {
|
||||||
@@ -71,7 +71,7 @@ export class EditProcessFilterCloudComponentPage {
|
|||||||
|
|
||||||
async getSortFilterDropDownValue(): Promise<string> {
|
async getSortFilterDropDownValue(): Promise<string> {
|
||||||
const sortLocator = element.all(by.css("mat-form-field[data-automation-id='sort'] span")).first();
|
const sortLocator = element.all(by.css("mat-form-field[data-automation-id='sort'] span")).first();
|
||||||
return await BrowserActions.getText(sortLocator);
|
return BrowserActions.getText(sortLocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
async setOrderFilterDropDown(option): Promise<void> {
|
async setOrderFilterDropDown(option): Promise<void> {
|
||||||
@@ -100,7 +100,7 @@ export class EditProcessFilterCloudComponentPage {
|
|||||||
|
|
||||||
async getApplicationSelected(): Promise<string> {
|
async getApplicationSelected(): Promise<string> {
|
||||||
const applicationDropdown = element(by.css(`[data-automation-id='adf-cloud-edit-process-property-appName']`));
|
const applicationDropdown = element(by.css(`[data-automation-id='adf-cloud-edit-process-property-appName']`));
|
||||||
return await applicationDropdown.getText();
|
return applicationDropdown.getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAppNamesAreUnique(): Promise<boolean> {
|
async checkAppNamesAreUnique(): Promise<boolean> {
|
||||||
@@ -121,7 +121,7 @@ export class EditProcessFilterCloudComponentPage {
|
|||||||
|
|
||||||
async isApplicationListLoaded(): Promise<boolean> {
|
async isApplicationListLoaded(): Promise<boolean> {
|
||||||
const emptyList = element(by.css(`[data-automation-id='adf-cloud-edit-process-property-appName'] .mat-select-placeholder`));
|
const emptyList = element(by.css(`[data-automation-id='adf-cloud-edit-process-property-appName'] .mat-select-placeholder`));
|
||||||
return await BrowserVisibility.waitUntilElementIsNotVisible(emptyList);
|
return BrowserVisibility.waitUntilElementIsNotVisible(emptyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
async setProcessInstanceId(option): Promise<void> {
|
async setProcessInstanceId(option): Promise<void> {
|
||||||
|
@@ -47,7 +47,7 @@ export class EditTaskFilterCloudComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async isFilterDisplayed(): Promise<boolean> {
|
async isFilterDisplayed(): Promise<boolean> {
|
||||||
return await BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
return BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
async openFilter(): Promise<void> {
|
async openFilter(): Promise<void> {
|
||||||
|
@@ -87,7 +87,7 @@ export class ProcessListCloudComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsNameColumn() {
|
async getAllRowsNameColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(this.columns.name);
|
return this.dataTable.getAllRowsColumnValues(this.columns.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkProcessListIsLoaded(): Promise<void> {
|
async checkProcessListIsLoaded(): Promise<void> {
|
||||||
|
@@ -118,39 +118,39 @@ export class TaskListCloudComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsNameColumn() {
|
async getAllRowsNameColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.name);
|
return this.dataTable.getAllRowsColumnValues(column.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsByIdColumn() {
|
async getAllRowsByIdColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.id);
|
return this.dataTable.getAllRowsColumnValues(column.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsByProcessDefIdColumn() {
|
async getAllRowsByProcessDefIdColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.processDefinitionId);
|
return this.dataTable.getAllRowsColumnValues(column.processDefinitionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsByProcessInstanceIdColumn() {
|
async getAllRowsByProcessInstanceIdColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.processInstanceId);
|
return this.dataTable.getAllRowsColumnValues(column.processInstanceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsByAssigneeColumn() {
|
async getAllRowsByAssigneeColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.assignee);
|
return this.dataTable.getAllRowsColumnValues(column.assignee);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsByParentTaskIdColumn() {
|
async getAllRowsByParentTaskIdColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.parentTaskId);
|
return this.dataTable.getAllRowsColumnValues(column.parentTaskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsByPriorityColumn() {
|
async getAllRowsByPriorityColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.priority);
|
return this.dataTable.getAllRowsColumnValues(column.priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsByStandAloneColumn() {
|
async getAllRowsByStandAloneColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.standAlone);
|
return this.dataTable.getAllRowsColumnValues(column.standAlone);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllRowsByOwnerColumn() {
|
async getAllRowsByOwnerColumn() {
|
||||||
return await this.dataTable.getAllRowsColumnValues(column.owner);
|
return this.dataTable.getAllRowsColumnValues(column.owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getIdCellValue(rowName): Promise<string> {
|
async getIdCellValue(rowName): Promise<string> {
|
||||||
|
@@ -60,13 +60,13 @@ export class FormFieldsPage {
|
|||||||
const widget: ElementFinder = await this.getWidget(fieldId);
|
const widget: ElementFinder = await this.getWidget(fieldId);
|
||||||
const value = widget.element(valueLocatorParam || this.valueLocator);
|
const value = widget.element(valueLocatorParam || this.valueLocator);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(value);
|
await BrowserVisibility.waitUntilElementIsVisible(value);
|
||||||
return await value.getAttribute('value');
|
return value.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFieldLabel(fieldId, labelLocatorParam): Promise<string> {
|
async getFieldLabel(fieldId, labelLocatorParam): Promise<string> {
|
||||||
const widget = await this.getWidget(fieldId);
|
const widget = await this.getWidget(fieldId);
|
||||||
const label = widget.all(labelLocatorParam || this.labelLocator).first();
|
const label = widget.all(labelLocatorParam || this.labelLocator).first();
|
||||||
return await BrowserActions.getText(label);
|
return BrowserActions.getText(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFieldErrorMessage(fieldId): Promise<string> {
|
async getFieldErrorMessage(fieldId): Promise<string> {
|
||||||
|
@@ -198,7 +198,7 @@
|
|||||||
"tsconfig-paths": "^3.8.0",
|
"tsconfig-paths": "^3.8.0",
|
||||||
"tsickle": "^0.34.0",
|
"tsickle": "^0.34.0",
|
||||||
"tslib": "^1.9.0",
|
"tslib": "^1.9.0",
|
||||||
"tslint": "5.9.1",
|
"tslint": "5.20.0",
|
||||||
"tslint-consistent-codestyle": "^1.15.1",
|
"tslint-consistent-codestyle": "^1.15.1",
|
||||||
"typedoc": "^0.15.0",
|
"typedoc": "^0.15.0",
|
||||||
"typescript": "3.1.6",
|
"typescript": "3.1.6",
|
||||||
|
@@ -87,6 +87,7 @@
|
|||||||
"no-var-keyword": true,
|
"no-var-keyword": true,
|
||||||
"no-var-requires": true,
|
"no-var-requires": true,
|
||||||
"object-literal-sort-keys": false,
|
"object-literal-sort-keys": false,
|
||||||
|
"no-return-await": true,
|
||||||
"one-line": [
|
"one-line": [
|
||||||
true,
|
true,
|
||||||
"check-open-brace",
|
"check-open-brace",
|
||||||
|
Reference in New Issue
Block a user