add alfresco core in viewer

This commit is contained in:
Eugenio Romano
2016-08-04 00:17:21 +01:00
parent e17604e47d
commit 0050a2cc13
9 changed files with 93 additions and 7 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { describe, expect, it, inject } from '@angular/core/testing';
import { describe, expect, it, inject, beforeEachProviders } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing';
import { PdfViewerComponent } from './pdfViewer.component';
@@ -23,8 +23,20 @@ import { PDFJSmock } from './assets/PDFJS.mock';
import { PDFViewermock } from './assets/PDFViewer.mock';
import { EventMock } from './assets/event.mock';
import { HTTP_PROVIDERS } from '@angular/http';
import { AlfrescoSettingsServiceMock } from '../src/assets/AlfrescoSettingsService.service.mock';
import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
describe('PdfViewer', () => {
beforeEachProviders(() => {
return [
HTTP_PROVIDERS,
{provide: AlfrescoSettingsService, useClass: AlfrescoSettingsServiceMock},
{provide: AlfrescoAuthenticationService, useClass: AlfrescoAuthenticationService}
];
});
describe('View', () => {
it('Canvas should be present', inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb