mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-01 14:41:14 +00:00
upgrade to latest JS-API and ADF (#896)
* improved update script and latest ADF libs * upgrade to latest js-api and ADF * upgrade tests * update viewer code * use @alfresco/js-api * update to latest adf * fix deprecation issues * update viewer * fix copy/move dialog * change expect * fix remove site from favorites * fix unit test * update adf version * use ADF upload dialog
This commit is contained in:
@@ -154,11 +154,11 @@ describe('FilesComponent', () => {
|
||||
|
||||
it('should call refresh onContentCopied event if parent is the same', () => {
|
||||
const nodes = [
|
||||
{ entry: { parentId: '1' } },
|
||||
{ entry: { parentId: '2' } }
|
||||
<any>{ entry: { parentId: '1' } },
|
||||
<any>{ entry: { parentId: '2' } }
|
||||
];
|
||||
|
||||
component.node = { id: '1' };
|
||||
component.node = <any>{ id: '1' };
|
||||
|
||||
nodeActionsService.contentCopied.next(nodes);
|
||||
|
||||
@@ -167,11 +167,11 @@ describe('FilesComponent', () => {
|
||||
|
||||
it('should not call refresh onContentCopied event when parent mismatch', () => {
|
||||
const nodes = [
|
||||
{ entry: { parentId: '1' } },
|
||||
{ entry: { parentId: '2' } }
|
||||
<any>{ entry: { parentId: '1' } },
|
||||
<any>{ entry: { parentId: '2' } }
|
||||
];
|
||||
|
||||
component.node = { id: '3' };
|
||||
component.node = <any>{ id: '3' };
|
||||
|
||||
nodeActionsService.contentCopied.next(nodes);
|
||||
|
||||
@@ -210,7 +210,7 @@ describe('FilesComponent', () => {
|
||||
|
||||
it('should call refresh on fileUploadComplete event if parent node match', fakeAsync(() => {
|
||||
const file = { file: { options: { parentId: 'parentId' } } };
|
||||
component.node = { id: 'parentId' };
|
||||
component.node = <any>{ id: 'parentId' };
|
||||
|
||||
uploadService.fileUploadComplete.next(<any>file);
|
||||
|
||||
@@ -221,7 +221,7 @@ describe('FilesComponent', () => {
|
||||
|
||||
it('should not call refresh on fileUploadComplete event if parent mismatch', fakeAsync(() => {
|
||||
const file = { file: { options: { parentId: 'otherId' } } };
|
||||
component.node = { id: 'parentId' };
|
||||
component.node = <any>{ id: 'parentId' };
|
||||
|
||||
uploadService.fileUploadComplete.next(<any>file);
|
||||
|
||||
@@ -232,7 +232,7 @@ describe('FilesComponent', () => {
|
||||
|
||||
it('should call refresh on fileUploadDeleted event if parent node match', fakeAsync(() => {
|
||||
const file = { file: { options: { parentId: 'parentId' } } };
|
||||
component.node = { id: 'parentId' };
|
||||
component.node = <any>{ id: 'parentId' };
|
||||
|
||||
uploadService.fileUploadDeleted.next(<any>file);
|
||||
|
||||
@@ -243,7 +243,7 @@ describe('FilesComponent', () => {
|
||||
|
||||
it('should not call refresh on fileUploadDeleted event if parent mismatch', fakeAsync(() => {
|
||||
const file: any = { file: { options: { parentId: 'otherId' } } };
|
||||
component.node = { id: 'parentId' };
|
||||
component.node = <any>{ id: 'parentId' };
|
||||
|
||||
uploadService.fileUploadDeleted.next(file);
|
||||
|
||||
@@ -293,7 +293,7 @@ describe('FilesComponent', () => {
|
||||
});
|
||||
|
||||
it('should navigate home if node is root', () => {
|
||||
component.node = {
|
||||
component.node = <any>{
|
||||
path: {
|
||||
elements: [{ id: 'node-id' }]
|
||||
}
|
||||
@@ -307,19 +307,19 @@ describe('FilesComponent', () => {
|
||||
|
||||
describe('isSiteContainer', () => {
|
||||
it('should return false if node has no aspectNames', () => {
|
||||
const mock = { aspectNames: [] };
|
||||
const mock = <any>{ aspectNames: [] };
|
||||
|
||||
expect(component.isSiteContainer(mock)).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false if node is not site container', () => {
|
||||
const mock = { aspectNames: ['something-else'] };
|
||||
const mock = <any>{ aspectNames: ['something-else'] };
|
||||
|
||||
expect(component.isSiteContainer(mock)).toBe(false);
|
||||
});
|
||||
|
||||
it('should return true if node is a site container', () => {
|
||||
const mock = { aspectNames: ['st:siteContainer'] };
|
||||
const mock = <any>{ aspectNames: ['st:siteContainer'] };
|
||||
|
||||
expect(component.isSiteContainer(mock)).toBe(true);
|
||||
});
|
||||
|
Reference in New Issue
Block a user