mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +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
@@ -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();
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user