mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3212] Fixed permission issues when updating version (#3503)
* [ADF-3213] Fixed permission issues when updating version * [ADF-3212] fixed test for PR * allowableOperations include viewer get node
This commit is contained in:
committed by
Eugenio Romano
parent
cc73484a76
commit
0fae46b50b
@@ -175,14 +175,14 @@ describe('ViewerComponent', () => {
|
||||
component.ngOnChanges({});
|
||||
tick();
|
||||
|
||||
expect(alfrescoApiService.nodesApi.getNodeInfo).toHaveBeenCalledWith('id1');
|
||||
expect(alfrescoApiService.nodesApi.getNodeInfo).toHaveBeenCalledWith('id1', {include: [ 'allowableOperations' ]});
|
||||
expect(component.displayName).toBe('file1');
|
||||
|
||||
component.fileNodeId = 'id2';
|
||||
component.ngOnChanges({});
|
||||
tick();
|
||||
|
||||
expect(alfrescoApiService.nodesApi.getNodeInfo).toHaveBeenCalledWith('id2');
|
||||
expect(alfrescoApiService.nodesApi.getNodeInfo).toHaveBeenCalledWith('id2', {include: [ 'allowableOperations' ]});
|
||||
expect(component.displayName).toBe('file2');
|
||||
}));
|
||||
|
||||
|
@@ -285,7 +285,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
this.setUpUrlFile();
|
||||
this.isLoading = false;
|
||||
} else if (this.nodeId) {
|
||||
this.apiService.nodesApi.getNodeInfo(this.nodeId).then(
|
||||
this.apiService.nodesApi.getNodeInfo(this.nodeId, { include: ['allowableOperations'] }).then(
|
||||
(data: MinimalNodeEntryEntity) => {
|
||||
this.setUpNodeFile(data).then(() => {
|
||||
this.isLoading = false;
|
||||
|
Reference in New Issue
Block a user