[ACA-903] Working copy is incorrectly displayed for a file locked for… (#110)

* [ACA-903] Working copy is incorrectly displayed for a file locked for offline editing

-use locked icon for locked nodes
-do not allow locked nodes to be selected

* [ACA-903] fix failing tests
This commit is contained in:
suzanadirla
2017-12-05 19:17:26 +02:00
committed by Cilibiu Bogdan
parent e1c027ba67
commit 38b4a83673
4 changed files with 85 additions and 13 deletions

View File

@@ -262,7 +262,7 @@ describe('FilesComponent', () => {
it('calls getNode api with node id', () => {
component.fetchNodes('nodeId');
expect(nodesApi.getNodeChildren).toHaveBeenCalledWith('nodeId', {});
expect(nodesApi.getNodeChildren).toHaveBeenCalledWith('nodeId', jasmine.any(Object));
});
});
@@ -303,7 +303,14 @@ describe('FilesComponent', () => {
spyOn(router, 'navigate').and.stub();
node.isFile = true;
component.onNodeDoubleClick(<any> node);
const event: any = {
detail: {
node: {
entry: node
}
}
};
component.onNodeDoubleClick(event);
expect(router.navigate).toHaveBeenCalledWith(['/preview', node.id]);
});
@@ -312,9 +319,17 @@ describe('FilesComponent', () => {
spyOn(component, 'navigate').and.stub();
node.isFolder = true;
component.onNodeDoubleClick(<any> node);
expect(component.navigate).toHaveBeenCalled();
const event: any = {
detail: {
node: {
entry: node
}
}
};
component.onNodeDoubleClick(event);
expect(component.navigate).toHaveBeenCalledWith(node.id);
});
});