[AAE-726] Add new return await rule (#5203)

* add new return await rule

* update tslint

* add lint exception
This commit is contained in:
Eugenio Romano
2019-10-30 19:29:43 +00:00
committed by Denys Vuika
parent a4730cd9cf
commit 2e046945c7
48 changed files with 308 additions and 305 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ export class AppsActions {
const pathFile = path.join(browser.params.testConfig.main.rootPath + appFileLocation);
const file = fs.createReadStream(pathFile);
return await alfrescoJsApi.activiti.appsApi.importAppDefinition(file);
return alfrescoJsApi.activiti.appsApi.importAppDefinition(file);
}
async publishDeployApp(alfrescoJsApi, appId) {
@@ -116,7 +116,7 @@ export class AppsActions {
startProcessOptions.name = processName;
}
return await alfrescoJsApi.activiti.processApi.startNewProcessInstance(startProcessOptions);
return alfrescoJsApi.activiti.processApi.startNewProcessInstance(startProcessOptions);
}
+1 -1
View File
@@ -33,7 +33,7 @@ export class AppsRuntimeActions {
async getRuntimeAppDefinitions(alfrescoJsApi) {
return await alfrescoJsApi.activiti.appsRuntimeApi.getAppDefinitions();
return alfrescoJsApi.activiti.appsRuntimeApi.getAppDefinitions();
}
}
+2 -2
View File
@@ -19,12 +19,12 @@ export class ModelsActions {
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) {
return await alfrescoJsApi.activiti.modelsApi.deleteModel(modelId, { cascade: true, deleteRuntimeApp : true });
return alfrescoJsApi.activiti.modelsApi.deleteModel(modelId, { cascade: true, deleteRuntimeApp : true });
}
}
+2 -2
View File
@@ -84,7 +84,7 @@ export class DropActions {
fs.accessSync(absolutePath, fs.constants.F_OK);
const elem = await dropArea.getWebElement();
const input: any = await browser.executeScript(JS_BIND_INPUT, elem);
return await input.sendKeys(absolutePath);
return input.sendKeys(absolutePath);
}
async dropFolder(dropArea, folderPath) {
@@ -95,6 +95,6 @@ export class DropActions {
const elem = await dropArea.getWebElement();
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> {
await BrowserVisibility.waitUntilElementIsVisible(this.nodeIdInput);
return await this.nodeIdInput.getAttribute('value');
return this.nodeIdInput.getAttribute('value');
}
async clickNode(nodeName): Promise<void> {
@@ -81,6 +81,6 @@ export class TreeViewPage {
}
async getTotalNodes() {
return await this.nodesOnPage.count();
return this.nodesOnPage.count();
}
}
+25 -25
View File
@@ -112,11 +112,11 @@ export class ContentServicesPage {
}
async checkLockedIcon(content): Promise<void> {
return await this.contentList.checkLockedIcon(content);
return this.contentList.checkLockedIcon(content);
}
async checkUnlockedIcon(content): Promise<void> {
return await this.contentList.checkUnlockedIcon(content);
return this.contentList.checkUnlockedIcon(content);
}
async checkDeleteIsDisabled(content): Promise<void> {
@@ -186,7 +186,7 @@ export class ContentServicesPage {
}
async getElementsDisplayedId() {
return await this.contentList.dataTablePage().getAllRowsColumnValues(this.columns.nodeId);
return this.contentList.dataTablePage().getAllRowsColumnValues(this.columns.nodeId);
}
checkElementsDateSortedAsc(elements) {
@@ -248,7 +248,7 @@ export class ContentServicesPage {
}
async getRecentFileIcon(): Promise<string> {
return await BrowserActions.getText(this.recentFileIcon);
return BrowserActions.getText(this.recentFileIcon);
}
async checkAcsContainer(): Promise<void> {
@@ -269,15 +269,15 @@ export class ContentServicesPage {
}
async numberOfResultsDisplayed(): Promise<number> {
return await this.contentList.dataTablePage().numberOfRows();
return this.contentList.dataTablePage().numberOfRows();
}
async currentFolderName(): Promise<string> {
return await BrowserActions.getText(this.currentFolder);
return BrowserActions.getText(this.currentFolder);
}
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> {
@@ -294,33 +294,33 @@ export class ContentServicesPage {
async sortAndCheckListIsOrderedByName(sortOrder: string): Promise<any> {
await this.sortByName(sortOrder);
return await this.checkListIsSortedByNameColumn(sortOrder);
return this.checkListIsSortedByNameColumn(sortOrder);
}
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> {
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> {
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> {
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> {
await this.sortByAuthor(sortOrder);
return await this.checkListIsSortedByAuthorColumn(sortOrder);
return this.checkListIsSortedByAuthorColumn(sortOrder);
}
async sortAndCheckListIsOrderedByCreated(sortOrder: string): Promise<any> {
await this.sortByCreated(sortOrder);
return await this.checkListIsSortedByCreatedColumn(sortOrder);
return this.checkListIsSortedByCreatedColumn(sortOrder);
}
async doubleClickRow(nodeName): Promise<void> {
@@ -378,7 +378,7 @@ export class ContentServicesPage {
async getActiveBreadcrumb(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.activeBreadcrumb);
return await this.activeBreadcrumb.getAttribute('title');
return this.activeBreadcrumb.getAttribute('title');
}
async uploadFile(fileLocation): Promise<void> {
@@ -405,17 +405,17 @@ export class ContentServicesPage {
async getSingleFileButtonTooltip(): Promise<string> {
await BrowserVisibility.waitUntilElementIsPresent(this.uploadFileButton);
return await this.uploadFileButtonInput.getAttribute('title');
return this.uploadFileButtonInput.getAttribute('title');
}
async getMultipleFileButtonTooltip(): Promise<string> {
await BrowserVisibility.waitUntilElementIsPresent(this.uploadMultipleFileButton);
return await this.uploadMultipleFileButton.getAttribute('title');
return this.uploadMultipleFileButton.getAttribute('title');
}
async getFolderButtonTooltip(): Promise<string> {
await BrowserVisibility.waitUntilElementIsPresent(this.uploadFolderButton);
return await this.uploadFolderButton.getAttribute('title');
return this.uploadFolderButton.getAttribute('title');
}
async checkUploadButton(): Promise<void> {
@@ -423,7 +423,7 @@ export class ContentServicesPage {
}
async uploadButtonIsEnabled(): Promise<boolean> {
return await this.uploadFileButton.isEnabled();
return this.uploadFileButton.isEnabled();
}
async getErrorMessage(): Promise<string> {
@@ -457,7 +457,7 @@ export class ContentServicesPage {
async getDocumentListRowNumber(): Promise<number> {
const documentList: ElementFinder = element(by.css('adf-upload-drag-area adf-document-list'));
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> {
@@ -496,13 +496,13 @@ export class ContentServicesPage {
}
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> {
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);
return await row.getCssValue(styleName);
return row.getCssValue(styleName);
}
async checkEmptyFolderTextToBe(text): Promise<void> {
@@ -522,7 +522,7 @@ export class ContentServicesPage {
async getRowIconImageUrl(fileName): Promise<string> {
const iconRow: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`));
await BrowserVisibility.waitUntilElementIsVisible(iconRow);
return await iconRow.getAttribute('src');
return iconRow.getAttribute('src');
}
async checkGridViewButtonIsVisible(): Promise<void> {
@@ -545,7 +545,7 @@ export class ContentServicesPage {
async getDocumentCardIconForElement(elementName): Promise<string> {
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> {
@@ -555,7 +555,7 @@ export class ContentServicesPage {
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`));
return await BrowserActions.getText(elementSize);
return BrowserActions.getText(elementSize);
}
async checkMenuIsShowedForElementIndex(elementIndex): Promise<void> {
+2 -2
View File
@@ -138,7 +138,7 @@ export class DataTablePage {
}
async getCopyContentTooltip(): Promise<string> {
return await this.dataTable.getCopyContentTooltip();
return this.dataTable.getCopyContentTooltip();
}
async mouseOverNameColumn(name: string): Promise<void> {
@@ -191,6 +191,6 @@ export class DataTablePage {
async getClipboardInputText(): Promise<string> {
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> {
return await BrowserActions.getText(this.activeFilter);
return BrowserActions.getText(this.activeFilter);
}
customTaskFilter(filterName): TaskFiltersCloudComponentPage {
@@ -146,13 +146,13 @@ export class TasksCloudDemoPage {
async getNoOfSelectedRows(): Promise<number> {
await this.checkSelectedRowsIsDisplayed();
return await this.noOfSelectedRows.count();
return this.noOfSelectedRows.count();
}
async getSelectedTaskRowText(rowNo: string): Promise<string> {
await this.checkSelectedRowsIsDisplayed();
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> {
+16 -16
View File
@@ -35,7 +35,7 @@ export class CreateLibraryDialog {
async getSelectedRadio(): Promise<string> {
const radio: ElementFinder = element(by.css('.mat-radio-button[class*="checked"]'));
return await BrowserActions.getText(radio);
return BrowserActions.getText(radio);
}
async waitForDialogToOpen(): Promise<void> {
@@ -47,27 +47,27 @@ export class CreateLibraryDialog {
}
async isDialogOpen(): Promise<any> {
return await browser.isElementPresent(this.libraryDialog);
return browser.isElementPresent(this.libraryDialog);
}
async getTitle(): Promise<string> {
return await BrowserActions.getText(this.libraryTitle);
return BrowserActions.getText(this.libraryTitle);
}
async getLibraryIdText(): Promise<string> {
return await this.libraryIdField.getAttribute('value');
return this.libraryIdField.getAttribute('value');
}
async isErrorMessageDisplayed(): Promise<boolean> {
return await this.errorMessage.isDisplayed();
return this.errorMessage.isDisplayed();
}
async getErrorMessage(): Promise<string> {
return await BrowserActions.getText(this.errorMessage);
return BrowserActions.getText(this.errorMessage);
}
async getErrorMessages(position): Promise<string> {
return await BrowserActions.getText(this.errorMessages.get(position));
return BrowserActions.getText(this.errorMessages.get(position));
}
async waitForLibraryNameHint(): Promise<void> {
@@ -75,39 +75,39 @@ export class CreateLibraryDialog {
}
async getLibraryNameHint(): Promise<string> {
return await BrowserActions.getText(this.libraryNameHint);
return BrowserActions.getText(this.libraryNameHint);
}
async isNameDisplayed(): Promise<boolean> {
return await this.libraryNameField.isDisplayed();
return this.libraryNameField.isDisplayed();
}
async isLibraryIdDisplayed(): Promise<boolean> {
return await this.libraryIdField.isDisplayed();
return this.libraryIdField.isDisplayed();
}
async isDescriptionDisplayed(): Promise<boolean> {
return await this.libraryDescriptionField.isDisplayed();
return this.libraryDescriptionField.isDisplayed();
}
async isPublicDisplayed(): Promise<boolean> {
return await this.publicRadioButton.isDisplayed();
return this.publicRadioButton.isDisplayed();
}
async isModeratedDisplayed(): Promise<boolean> {
return await this.moderatedRadioButton.isDisplayed();
return this.moderatedRadioButton.isDisplayed();
}
async isPrivateDisplayed(): Promise<boolean> {
return await this.privateRadioButton.isDisplayed();
return this.privateRadioButton.isDisplayed();
}
async isCreateEnabled(): Promise<boolean> {
return await this.createButton.isEnabled();
return this.createButton.isEnabled();
}
async isCancelEnabled(): Promise<boolean> {
return await this.cancelButton.isEnabled();
return this.cancelButton.isEnabled();
}
async clickCreate(): Promise<void> {
+3 -3
View File
@@ -28,7 +28,7 @@ export class FolderDialog {
validationMessage: ElementFinder = this.folderDialog.element(by.css('div.mat-form-field-subscript-wrapper mat-hint span'));
async getDialogTitle(): Promise<string> {
return await BrowserActions.getText(this.folderTitle);
return BrowserActions.getText(this.folderTitle);
}
async checkFolderDialogIsDisplayed(): Promise<void> {
@@ -62,11 +62,11 @@ export class FolderDialog {
}
async getFolderName(): Promise<string> {
return await this.folderNameField.getAttribute('value');
return this.folderNameField.getAttribute('value');
}
async getValidationMessage(): Promise<string> {
return await BrowserActions.getText(this.validationMessage);
return BrowserActions.getText(this.validationMessage);
}
async checkValidationMessageIsNotDisplayed(): Promise<void> {
+3 -3
View File
@@ -84,15 +84,15 @@ export class SearchDialog {
}
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> {
return await BrowserActions.getText(this.getRowByRowName(name).element(this.completeName));
return BrowserActions.getText(this.getRowByRowName(name).element(this.completeName));
}
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> {
+2 -2
View File
@@ -61,7 +61,7 @@ export class ShareDialog {
async getShareLink(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.shareLink);
return await this.shareLink.getAttribute('value');
return this.shareLink.getAttribute('value');
}
async clickCloseButton(): Promise<void> {
@@ -120,7 +120,7 @@ export class ShareDialog {
}
async getExpirationDate(): Promise<string> {
return await this.expirationDateInput.getAttribute('value');
return this.expirationDateInput.getAttribute('value');
}
async expirationDateInputHasValue(value): Promise<void> {
+2 -2
View File
@@ -107,7 +107,7 @@ export class UploadDialog {
async getTitleText(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.title);
return await this.title.getText();
return this.title.getText();
}
async getConfirmationDialogTitleText(): Promise<string> {
@@ -152,7 +152,7 @@ export class UploadDialog {
}
async getTooltip(): Promise<string> {
return await BrowserActions.getText(this.errorTooltip);
return BrowserActions.getText(this.errorTooltip);
}
}
+2 -2
View File
@@ -30,7 +30,7 @@ export class IconsPage {
async isCustomIconDisplayed(name) {
const present = await browser.isElementPresent(this.locateCustomIcon(name));
if (present) {
return await this.locateCustomIcon(name).isDisplayed();
return this.locateCustomIcon(name).isDisplayed();
} else {
return false;
}
@@ -39,7 +39,7 @@ export class IconsPage {
async isLigatureIconDisplayed(name) {
const present = await browser.isElementPresent(this.locateLigatureIcon(name));
if (present) {
return await this.locateLigatureIcon(name).isDisplayed();
return this.locateLigatureIcon(name).isDisplayed();
} else {
return false;
}
+18 -18
View File
@@ -47,51 +47,51 @@ export class MetadataViewPage {
applyAspect: ElementFinder = element(by.cssContainingText(`button span.mat-button-wrapper`, 'Apply Aspect'));
async getTitle(): Promise<string> {
return await BrowserActions.getText(this.title);
return BrowserActions.getText(this.title);
}
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> {
return await BrowserActions.getText(this.name);
return BrowserActions.getText(this.name);
}
async getCreator(): Promise<string> {
return await BrowserActions.getText(this.creator);
return BrowserActions.getText(this.creator);
}
async getCreatedDate(): Promise<string> {
return await BrowserActions.getText(this.createdDate);
return BrowserActions.getText(this.createdDate);
}
async getModifier(): Promise<string> {
return await BrowserActions.getText(this.modifier);
return BrowserActions.getText(this.modifier);
}
async getModifiedDate(): Promise<string> {
return await BrowserActions.getText(this.modifiedDate);
return BrowserActions.getText(this.modifiedDate);
}
async getMimetypeName(): Promise<string> {
return await BrowserActions.getText(this.mimetypeName);
return BrowserActions.getText(this.mimetypeName);
}
async getSize(): Promise<string> {
return await BrowserActions.getText(this.size);
return BrowserActions.getText(this.size);
}
async getDescription(): Promise<string> {
return await BrowserActions.getText(this.description);
return BrowserActions.getText(this.description);
}
async getAuthor(): Promise<string> {
return await BrowserActions.getText(this.author);
return BrowserActions.getText(this.author);
}
async getTitleProperty(): Promise<string> {
return await BrowserActions.getText(this.titleProperty);
return BrowserActions.getText(this.titleProperty);
}
async editIconIsDisplayed(): Promise<void> {
@@ -119,11 +119,11 @@ export class MetadataViewPage {
}
async getInformationButtonText(): Promise<string> {
return await BrowserActions.getText(this.informationSpan);
return BrowserActions.getText(this.informationSpan);
}
async getInformationIconText(): Promise<string> {
return await BrowserActions.getText(this.informationIcon);
return BrowserActions.getText(this.informationIcon);
}
async clickOnPropertiesTab(): Promise<void> {
@@ -132,7 +132,7 @@ export class MetadataViewPage {
}
async getEditIconTooltip(): Promise<string> {
return await this.editIcon.getAttribute('title');
return this.editIcon.getAttribute('title');
}
async editPropertyIconIsDisplayed(propertyName: string) {
@@ -179,7 +179,7 @@ export class MetadataViewPage {
const propertyType = type || 'textitem';
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> {
@@ -194,7 +194,7 @@ export class MetadataViewPage {
async getPropertyIconTooltip(propertyName: string): Promise<string> {
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> {
@@ -226,7 +226,7 @@ export class MetadataViewPage {
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'));
return await BrowserActions.getText(group);
return BrowserActions.getText(group);
}
async checkPropertyIsVisible(propertyName: string, type: string): Promise<void> {
+2 -2
View File
@@ -100,7 +100,7 @@ export class PermissionsPage {
}
async getPermissionInheritedButtonText(): Promise<string> {
return await BrowserActions.getText(this.permissionInheritedButton);
return BrowserActions.getText(this.permissionInheritedButton);
}
async checkPermissionsDatatableIsDisplayed(): Promise<void> {
@@ -109,7 +109,7 @@ export class PermissionsPage {
async getRoleCellValue(rowName): Promise<string> {
const locator = this.dataTableComponentPage.getCellByRowContentAndColumn('Authority ID', rowName, column.role);
return await BrowserActions.getText(locator);
return BrowserActions.getText(locator);
}
async clickRoleDropdownByUserOrGroupName(name): Promise<void> {
@@ -38,7 +38,7 @@ export class FiltersPage {
}
async getAllRowsNameColumn() {
return await this.dataTable.getAllRowsColumnValues('Name');
return this.dataTable.getAllRowsColumnValues('Name');
}
}
@@ -85,7 +85,7 @@ export class ProcessFiltersPage {
}
async numberOfProcessRows(): Promise<number> {
return await element.all(this.rows).count();
return element.all(this.rows).count();
}
async waitForTableBody(): Promise<void> {
@@ -102,7 +102,7 @@ export class ProcessFiltersPage {
}
async getAllRowsNameColumn() {
return await this.dataTable.getAllRowsColumnValues('Name');
return this.dataTable.getAllRowsColumnValues('Name');
}
async checkFilterIsDisplayed(name): Promise<void> {
@@ -120,7 +120,7 @@ export class ProcessFiltersPage {
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
await BrowserVisibility.waitUntilElementIsVisible(filterName);
const icon = filterName.element(this.processIcon);
return await BrowserActions.getText(icon);
return BrowserActions.getText(icon);
}
async checkFilterIsNotDisplayed(name): Promise<void> {
@@ -372,7 +372,7 @@ export class TaskDetailsPage {
}
async isCompleteButtonWithFormEnabled(): Promise<boolean> {
return await this.completeFormTask.isEnabled();
return this.completeFormTask.isEnabled();
}
}
+2 -2
View File
@@ -141,11 +141,11 @@ export class TasksPage {
}
async clickSortByNameAsc(): Promise<any> {
return await this.tasksListPage().getDataTable().sortByColumn('ASC', 'name');
return this.tasksListPage().getDataTable().sortByColumn('ASC', 'name');
}
async clickSortByNameDesc(): Promise<any> {
return await this.tasksListPage().getDataTable().sortByColumn('DESC', 'name');
return this.tasksListPage().getDataTable().sortByColumn('DESC', 'name');
}
}
+2 -2
View File
@@ -120,11 +120,11 @@ export class SearchFiltersPage {
}
async isTypeFacetQueryGroupPresent(): Promise<boolean> {
return await this.facetQueriesTypeGroup.isPresent();
return this.facetQueriesTypeGroup.isPresent();
}
async isSizeFacetQueryGroupPresent(): Promise<boolean> {
return await this.facetQueriesSizeGroup.isPresent();
return this.facetQueriesSizeGroup.isPresent();
}
async clickCheckListFilter(): Promise<void> {
+1 -1
View File
@@ -40,7 +40,7 @@ export class SearchResultsPage {
}
async numberOfResultsDisplayed(): Promise<number> {
return await this.dataTable.numberOfRows();
return this.dataTable.numberOfRows();
}
async checkContentIsNotDisplayed(content): Promise<void> {
+6 -6
View File
@@ -37,7 +37,7 @@ export class TagPage {
async getNodeId(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.insertNodeIdElement);
return await this.insertNodeIdElement.getAttribute('value');
return this.insertNodeIdElement.getAttribute('value');
}
async insertNodeId(nodeId) {
@@ -72,17 +72,17 @@ export class TagPage {
async getNewTagInput(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.newTagInput);
return await this.newTagInput.getAttribute('value');
return this.newTagInput.getAttribute('value');
}
async getNewTagPlaceholder(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.newTagInput);
return await this.newTagInput.getAttribute('placeholder');
return this.newTagInput.getAttribute('placeholder');
}
async addTagButtonIsEnabled(): Promise<boolean> {
await BrowserVisibility.waitUntilElementIsVisible(this.addTagButton);
return await this.addTagButton.isEnabled();
return this.addTagButton.isEnabled();
}
async checkTagIsDisplayedInTagList(tagName): Promise<void> {
@@ -119,7 +119,7 @@ export class TagPage {
}
async getErrorMessage(): Promise<string> {
return await BrowserActions.getText(this.errorMessage);
return BrowserActions.getText(this.errorMessage);
}
async checkTagListIsOrderedAscending(): Promise<any> {
@@ -181,7 +181,7 @@ export class TagPage {
}
async checkTagsOnList(): Promise<number> {
return await this.tagsOnPage.count();
return this.tagsOnPage.count();
}
async checkShowLessButtonIsDisplayed(): Promise<void> {
+1 -1
View File
@@ -29,7 +29,7 @@ export class TrashcanPage {
restoreButton: ElementFinder = element(by.css(`button[title='Restore']`));
async numberOfResultsDisplayed(): Promise<number> {
return await element.all(this.rows).count();
return element.all(this.rows).count();
}
async waitForTableBody(): Promise<void> {
+3 -3
View File
@@ -52,7 +52,7 @@ export class VersionManagePage {
async getFileVersionName(version): Promise<string> {
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> {
@@ -67,12 +67,12 @@ export class VersionManagePage {
async getFileVersionComment(version): Promise<string> {
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> {
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> {