amend implicit returns

This commit is contained in:
pionnegru
2019-10-16 13:11:24 +03:00
parent af67703371
commit 2c5fe7d3f4
9 changed files with 45 additions and 25 deletions

View File

@@ -125,16 +125,13 @@ export class DataTable extends Component {
return await this.getSortedColumnHeader().getText();
}
async getSortingOrder() {
async getSortingOrder(): Promise<string> {
const str = await this.getSortedColumnHeader().getAttribute('class');
if (str.includes('asc')) {
return 'asc';
}
else {
if (str.includes('desc')) {
return 'desc';
}
}
return 'desc';
}
async sortByColumn(columnName: string) {
@@ -328,32 +325,40 @@ export class DataTable extends Component {
return await this.emptyFolderDragAndDrop.isDisplayed();
}
async getEmptyDragAndDropText() {
async getEmptyDragAndDropText(): Promise<string> {
const isEmpty = await this.isEmptyWithDragAndDrop();
if (isEmpty) {
return await this.emptyFolderDragAndDrop.getText();
}
return '';
}
async getEmptyStateTitle() {
async getEmptyStateTitle(): Promise<string> {
const isEmpty = await this.isEmptyList();
if (isEmpty) {
return await this.emptyListTitle.getText();
}
return '';
}
async getEmptyStateSubtitle() {
async getEmptyStateSubtitle(): Promise<string> {
const isEmpty = await this.isEmptyList();
if (isEmpty) {
return await this.emptyListSubtitle.getText();
}
return '';
}
async getEmptyStateText() {
async getEmptyStateText(): Promise<string> {
const isEmpty = await this.isEmptyList();
if (isEmpty) {
return await this.emptyListText.getText();
}
return '';
}
async getEmptySearchResultsText() {