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:
Denys Vuika
2019-01-22 14:10:48 +00:00
committed by GitHub
parent afa6de5687
commit f0a3f6f630
82 changed files with 360 additions and 1214 deletions

View File

@@ -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);
});