[ADF-325] added attach folder widget (#2831)

[ADF-325] added new attach folder widget
This commit is contained in:
Vito
2018-01-16 15:28:39 +01:00
committed by Eugenio Romano
parent 3671c12f35
commit 66262c4822
12 changed files with 393 additions and 12 deletions

View File

@@ -106,7 +106,7 @@ describe('ContentNodeDialogService', () => {
expect(materialDialog.open).toHaveBeenCalled();
}));
it('should be able to open the dialog using the first user site', fakeAsync(() => {
it('should be able to open the dialog for files using the first user site', fakeAsync(() => {
spyOn(sitesService, 'getSites').and.returnValue(Observable.of(fakeSiteList));
spyOn(documentListService, 'getFolderNode').and.returnValue(Promise.resolve(fakeNode));
service.openFileBrowseDialogBySite().subscribe();
@@ -114,6 +114,14 @@ describe('ContentNodeDialogService', () => {
expect(materialDialog.open).toHaveBeenCalled();
}));
it('should be able to open the dialog for folder using the first user site', fakeAsync(() => {
spyOn(sitesService, 'getSites').and.returnValue(Observable.of(fakeSiteList));
spyOn(documentListService, 'getFolderNode').and.returnValue(Promise.resolve(fakeNode));
service.openFolderBrowseDialogBySite().subscribe();
tick();
expect(materialDialog.open).toHaveBeenCalled();
}));
it('should be able to close the material dialog', () => {
service.close();
expect(materialDialog.closeAll).toHaveBeenCalled();