[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 16:25:30 +01:00
committed by Denys Vuika
parent 36629adf99
commit af4089ae74
7 changed files with 36 additions and 34 deletions
+10
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();
}
+2 -2
View File
@@ -150,12 +150,12 @@ describe('File Libraries', () => {
});
it('Tooltip for sites without description [C217096]', () => {
const tooltip = dataTable.getItemNameTooltip(sitePrivate);
const tooltip = dataTable.getLinkCellTooltip(sitePrivate);
expect(tooltip).toBe(`${sitePrivate}`);
});
it('Tooltip for sites with description [C217097]', () => {
const tooltip = dataTable.getItemNameTooltip(siteModerated);
const tooltip = dataTable.getLinkCellTooltip(siteModerated);
expect(tooltip).toBe(`${siteDescription}`);
});
});