[ACA-1574] DocumentList - single click navigation (#513)

* single click navigation

* fix tests

* allow action on row

* use adf link class

* update tests
This commit is contained in:
Cilibiu Bogdan
2018-07-18 18:25:30 +03:00
committed by Denys Vuika
parent 36629adf99
commit af4089ae74
7 changed files with 36 additions and 34 deletions

View File

@@ -44,6 +44,7 @@ export class DataTable extends Component {
selectedRow: '.adf-datatable-row.is-selected',
cell: '.adf-data-table-cell',
locationLink: 'aca-location-link',
linkCell: '.adf-location-cell',
selectedIcon: '.mat-icon',
@@ -59,6 +60,7 @@ export class DataTable extends Component {
body: ElementFinder = this.component.element(by.css(DataTable.selectors.body));
cell = by.css(DataTable.selectors.cell);
locationLink = by.css(DataTable.selectors.locationLink);
linkCell: ElementFinder = this.component.element(by.css(DataTable.selectors.linkCell));
emptyList: ElementFinder = this.component.element(by.css(DataTable.selectors.emptyListContainer));
emptyFolderDragAndDrop: ElementFinder = this.component.element(by.css(DataTable.selectors.emptyFolderDragAndDrop));
emptyListTitle: ElementFinder = this.component.element(by.css(DataTable.selectors.emptyListTitle));
@@ -139,10 +141,18 @@ export class DataTable extends Component {
return this.body.element(by.cssContainingText(`.adf-data-table-cell span`, name));
}
getRowLink(name: string): ElementFinder {
return this.body.element(by.cssContainingText(`.adf-data-table-cell a`, name));
}
getItemNameTooltip(name: string): promise.Promise<string> {
return this.getRowName(name).getAttribute('title');
}
getLinkCellTooltip(name: string): promise.Promise<string> {
return this.getRowLink(name).getAttribute('title');
}
countRows(): promise.Promise<number> {
return this.getRows().count();
}