mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[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:
committed by
Denys Vuika
parent
36629adf99
commit
af4089ae74
@@ -163,35 +163,23 @@ describe('LibrariesComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('onNodeDoubleClick', () => {
|
||||
it('navigates to document', () => {
|
||||
describe('navigateTo', () => {
|
||||
it('navigates into library folder', () => {
|
||||
spyOn(component, 'navigate');
|
||||
|
||||
const event: any = {
|
||||
detail: {
|
||||
node: {
|
||||
entry: { guid: 'node-guid' }
|
||||
}
|
||||
}
|
||||
const site: any = {
|
||||
entry: { guid: 'node-guid' }
|
||||
};
|
||||
|
||||
component.onNodeDoubleClick(event);
|
||||
component.navigateTo(site);
|
||||
|
||||
expect(component.navigate).toHaveBeenCalledWith('node-guid');
|
||||
});
|
||||
|
||||
it(' does not navigate when document is not provided', () => {
|
||||
it(' does not navigate when library is not provided', () => {
|
||||
spyOn(component, 'navigate');
|
||||
|
||||
const event: any = {
|
||||
detail: {
|
||||
node: {
|
||||
entry: null
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
component.onNodeDoubleClick(event);
|
||||
component.navigateTo(null);
|
||||
|
||||
expect(component.navigate).not.toHaveBeenCalled();
|
||||
});
|
||||
|
Reference in New Issue
Block a user