mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-990] add tests for Recent Files, Shared Files and location redirect (#105)
* add tests for Recent Files and Shared Files list views add tests for location redirect * small fix
This commit is contained in:
committed by
Cilibiu Bogdan
parent
39458aa97a
commit
43b020ca51
@@ -34,6 +34,7 @@ export class DataTable extends Component {
|
||||
row: 'tr',
|
||||
selectedRow: 'tr.is-selected',
|
||||
cell: 'td',
|
||||
locationLink: 'app-location-link',
|
||||
|
||||
emptyListContainer: 'td.adf-no-content-container',
|
||||
emptyFolderDragAndDrop: '.adf-empty-list_template .adf-empty-folder',
|
||||
@@ -45,6 +46,7 @@ export class DataTable extends Component {
|
||||
head: ElementFinder = this.component.element(by.css(DataTable.selectors.head));
|
||||
body: ElementFinder = this.component.element(by.css(DataTable.selectors.body));
|
||||
cell = by.css(DataTable.selectors.cell);
|
||||
locationLink = by.css(DataTable.selectors.locationLink);
|
||||
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));
|
||||
@@ -142,6 +144,15 @@ export class DataTable extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
getItemLocation(name: string) {
|
||||
const rowLocator = by.cssContainingText(DataTable.selectors.row, name);
|
||||
return this.body.element(rowLocator).element(this.locationLink);
|
||||
}
|
||||
|
||||
clickItemLocation(name: string) {
|
||||
return this.getItemLocation(name).click();
|
||||
}
|
||||
|
||||
// empty state methods
|
||||
isEmptyList(): promise.Promise<boolean> {
|
||||
return this.emptyList.isPresent();
|
||||
|
Reference in New Issue
Block a user