mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-] update library to use new js-api 3.0.0 (#4097)
This commit is contained in:
committed by
Eugenio Romano
parent
2acd1b4e26
commit
3ef7d3b7ea
@@ -22,6 +22,7 @@ import { of, throwError } from 'rxjs';
|
||||
import { UploadButtonComponent } from './upload-button.component';
|
||||
import { TranslationMock } from '@alfresco/adf-core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
|
||||
describe('UploadButtonComponent', () => {
|
||||
|
||||
@@ -33,7 +34,7 @@ describe('UploadButtonComponent', () => {
|
||||
target: { value: 'fake-name-1' }
|
||||
};
|
||||
|
||||
let fakeFolderNodeWithPermission = {
|
||||
let fakeFolderNodeWithPermission = new NodeEntry({
|
||||
entry: {
|
||||
allowableOperations: [
|
||||
'create',
|
||||
@@ -43,7 +44,7 @@ describe('UploadButtonComponent', () => {
|
||||
name: 'Folder Fake Name',
|
||||
nodeType: 'cm:folder'
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
let component: UploadButtonComponent;
|
||||
let fixture: ComponentFixture<UploadButtonComponent>;
|
||||
@@ -161,7 +162,7 @@ describe('UploadButtonComponent', () => {
|
||||
it('should create a folder and emit an File uploaded event', (done) => {
|
||||
component.rootFolderId = '-my-';
|
||||
|
||||
spyOn(contentService, 'createFolder').and.returnValue(of(true));
|
||||
// spyOn(contentService, 'createFolder').and.returnValue(of(true));
|
||||
spyOn(contentService, 'getNode').and.returnValue(of(fakeFolderNodeWithPermission));
|
||||
|
||||
component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId, true) });
|
||||
|
Reference in New Issue
Block a user