[ADF-1968] [IE11] The login page is not loading and import fix (#2679)

* fix viewer script
export insights and diagram
remove requires svg
fix new data adapter path
dist working with diagrams commented out
change use of minimatch
fix unused import
remove unused component
fix test
new import moment es6 and throw rxjs
fix import analytics test
fix imports rxjs
new pacakging

* fix after rebase

* fix test upload services

* exclude temporarily button event test

* restore commented demo shell files

* fix process spy
This commit is contained in:
Eugenio Romano
2017-11-22 10:33:56 +00:00
committed by GitHub
parent 39737b3df6
commit f629f48d16
316 changed files with 1548 additions and 1678 deletions

View File

@@ -19,7 +19,7 @@ import { SimpleChange } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { MaterialModule } from '../material.module';
import { Observable } from 'rxjs/Rx';
import { Observable } from 'rxjs/Observable';
import { TaskAttachmentListComponent } from './task-attachment-list.component';
import { ProcessContentService } from '@alfresco/adf-core';
@@ -29,9 +29,9 @@ describe('TaskAttachmentList', () => {
let fixture: ComponentFixture<TaskAttachmentListComponent>;
let service: ProcessContentService;
let getTaskRelatedContentSpy: jasmine.Spy;
let mockAttachment: any;
let deleteContentSpy: jasmine.Spy;
let getFileRawContentSpy: jasmine.Spy;
let mockAttachment: any;
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -64,7 +64,7 @@ describe('TaskAttachmentList', () => {
id: 8,
name: 'fake.zip',
created: 1494595697381,
createdBy: {id: 2, firstName: 'user', lastName: 'user', email: 'user@user.com'},
createdBy: { id: 2, firstName: 'user', lastName: 'user', email: 'user@user.com' },
relatedContent: true,
contentAvailable: true,
link: false,
@@ -77,7 +77,7 @@ describe('TaskAttachmentList', () => {
id: 9,
name: 'fake.jpg',
created: 1494595655381,
createdBy: {id: 2, firstName: 'user', lastName: 'user', email: 'user@user.com'},
createdBy: { id: 2, firstName: 'user', lastName: 'user', email: 'user@user.com' },
relatedContent: true,
contentAvailable: true,
link: false,
@@ -97,14 +97,13 @@ describe('TaskAttachmentList', () => {
let blobObj = new Blob();
getFileRawContentSpy = spyOn(service, 'getFileRawContent').and.returnValue(Observable.of(
blobObj
));
blobObj;
});
it('should load attachments when taskId specified', () => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
expect(getTaskRelatedContentSpy).toHaveBeenCalled();
});
@@ -112,7 +111,7 @@ describe('TaskAttachmentList', () => {
let emitSpy = spyOn(component.error, 'emit');
getTaskRelatedContentSpy.and.returnValue(Observable.throw({}));
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
expect(emitSpy).toHaveBeenCalled();
});
@@ -123,7 +122,7 @@ describe('TaskAttachmentList', () => {
expect(attachments[0].id).toEqual(mockAttachment.data[0].id);
});
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
});
it('should not attach when no taskId is specified', () => {
@@ -133,7 +132,7 @@ describe('TaskAttachmentList', () => {
it('should display attachments when the task has attachments', async(() => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
fixture.whenStable().then(() => {
fixture.detectChanges();
@@ -159,38 +158,38 @@ describe('TaskAttachmentList', () => {
'total': 0,
'start': 0,
'data': []
}));
}));
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
component.disabled = false;
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(fixture.nativeElement.querySelector('.adf-custom-empty-template')).not.toBeNull();
});
});
}));
it('should not show the empty list drag and drop component when is disabled', async(() => {
getTaskRelatedContentSpy.and.returnValue(Observable.of({
'size': 0,
'total': 0,
'start': 0,
'data': []
'size': 0,
'total': 0,
'start': 0,
'data': []
}));
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
component.disabled = true;
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(fixture.nativeElement.querySelector('.adf-custom-empty-template')).toBeNull();
expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim()).toEqual('ADF_TASK_LIST.ATTACHMENT.EMPTY.HEADER');
});
});
}));
it('should display all actions if attachments are not read only', () => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
fixture.detectChanges();
let actionButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="action_menu_0"]');
@@ -206,7 +205,7 @@ describe('TaskAttachmentList', () => {
it('should not display remove action if attachments are read only', () => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
component.disabled = true;
fixture.detectChanges();
@@ -229,7 +228,7 @@ describe('TaskAttachmentList', () => {
'data': []
}));
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
fixture.whenStable().then(() => {
fixture.detectChanges();
@@ -245,7 +244,7 @@ describe('TaskAttachmentList', () => {
'data': []
}));
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
component.disabled = true;
fixture.whenStable().then(() => {
@@ -257,7 +256,7 @@ describe('TaskAttachmentList', () => {
it('should not show the empty list component when the attachments list is not empty for completed task', async(() => {
getTaskRelatedContentSpy.and.returnValue(Observable.of(mockAttachment));
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
component.disabled = true;
fixture.whenStable().then(() => {
@@ -279,7 +278,7 @@ describe('TaskAttachmentList', () => {
}));
it('should fetch new attachments when taskId changed', () => {
component.ngOnChanges({'taskId': change});
component.ngOnChanges({ 'taskId': change });
expect(getTaskRelatedContentSpy).toHaveBeenCalledWith('456');
});
@@ -289,7 +288,7 @@ describe('TaskAttachmentList', () => {
});
it('should NOT fetch new attachments when taskId changed to null', () => {
component.ngOnChanges({'taskId': nullChange});
component.ngOnChanges({ 'taskId': nullChange });
expect(getTaskRelatedContentSpy).not.toHaveBeenCalled();
});
});