mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1041] Node picker, first iteration (#2122)
* First try * Dialog basic functionality * Search input * Hammering it together * Fist working proto for copy * Fix the tests and tslint errors for a happier world * Add more tests (and test shells for the future) * copyNode and moveNode methods * Copy and move actions for content type * Extract common parts in favor of using them in folder content type also * Small fixes * Copy and Move actions for folders as well * Style fixes, ui behaviours and tests needed to be written * Move duplicated search service from documentlist to core * Use search service from core within the search component * Fix dialog width * Update docs * Tests for node selector * Change seletionMade event's name to select
This commit is contained in:
committed by
Eugenio Romano
parent
952da3ab99
commit
4fd8bfb875
@@ -177,4 +177,24 @@ describe('DocumentListService', () => {
|
||||
contentType: 'json'
|
||||
});
|
||||
});
|
||||
|
||||
it('should copy a node', (done) => {
|
||||
service.copyNode('node-id', 'parent-id').subscribe(done);
|
||||
|
||||
expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
|
||||
expect(jasmine.Ajax.requests.mostRecent().url).toContain('/nodes/node-id/copy');
|
||||
expect(jasmine.Ajax.requests.mostRecent().params).toEqual(JSON.stringify({ targetParentId: 'parent-id' }));
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({ status: 200, contentType: 'json' });
|
||||
});
|
||||
|
||||
it('should move a node', (done) => {
|
||||
service.moveNode('node-id', 'parent-id').subscribe(done);
|
||||
|
||||
expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
|
||||
expect(jasmine.Ajax.requests.mostRecent().url).toContain('/nodes/node-id/move');
|
||||
expect(jasmine.Ajax.requests.mostRecent().params).toEqual(JSON.stringify({ targetParentId: 'parent-id' }));
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({ status: 200, contentType: 'json' });
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user