[ADF-] update library to use new js-api 3.0.0 (#4097)

This commit is contained in:
Eugenio Romano
2019-01-06 23:57:01 +01:00
committed by Eugenio Romano
parent 2acd1b4e26
commit 3ef7d3b7ea
430 changed files with 1966 additions and 2149 deletions

View File

@@ -102,7 +102,7 @@ describe('DownloadZipDialogComponent', () => {
it('should call cancelDownload when CANCEL button is clicked', () => {
fixture.detectChanges();
spyOn(component, 'cancelDownload').and.callThrough();
spyOn(component, 'cancelDownload').and.returnValue('');
const cancelButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#cancel-button');
cancelButton.click();
@@ -118,7 +118,7 @@ describe('DownloadZipDialogComponent', () => {
it('should close dialog when download is completed', () => {
component.download('fakeUrl', 'fileName');
spyOn(downloadZipService, 'cancelDownload');
spyOn(component, 'cancelDownload').and.returnValue('');
fixture.detectChanges();
expect(dialogRef.close).toHaveBeenCalled();
});
@@ -134,7 +134,7 @@ describe('DownloadZipDialogComponent', () => {
it('should interrupt download when cancel button is clicked', () => {
spyOn(component, 'downloadZip');
spyOn(component, 'download');
spyOn(component, 'cancelDownload').and.callThrough();
spyOn(component, 'cancelDownload').and.returnValue('');
fixture.detectChanges();

View File

@@ -17,7 +17,7 @@
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
import { DownloadEntry, MinimalNodeEntity } from 'alfresco-js-api';
import { DownloadEntry, NodeEntry } from '@alfresco/js-api';
import { LogService } from '../services/log.service';
import { DownloadZipService } from '../services/download-zip.service';
@@ -64,7 +64,7 @@ export class DownloadZipDialogComponent implements OnInit {
if (data && data.entry && data.entry.id) {
const url = this.downloadZipService.getContentUrl(data.entry.id, true);
this.downloadZipService.getNode(data.entry.id).subscribe((downloadNode: MinimalNodeEntity) => {
this.downloadZipService.getNode(data.entry.id).subscribe((downloadNode: NodeEntry) => {
this.logService.log(downloadNode);
const fileName = downloadNode.entry.name;
this.downloadId = data.entry.id;