From 3b2bdd6f6babb1bef198b398c28bed9ad7919b8d Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Tue, 6 Sep 2016 14:59:12 +0200 Subject: [PATCH] Fix build tags add AlfrescoApiService --- .../src/components/tag-actions.component.spec.ts | 3 ++- .../src/components/tag-list.component.spec.ts | 3 ++- .../src/components/tag-node-list.component.spec.ts | 3 ++- .../ng2-alfresco-tag/src/services/tag.service.spec.ts | 3 ++- .../ng2-alfresco-tag/src/services/tag.service.ts | 2 +- .../src/webscript.component.spec.ts | 11 +++-------- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/ng2-components/ng2-alfresco-tag/src/components/tag-actions.component.spec.ts b/ng2-components/ng2-alfresco-tag/src/components/tag-actions.component.spec.ts index 2995f12f01..82b8969849 100644 --- a/ng2-components/ng2-alfresco-tag/src/components/tag-actions.component.spec.ts +++ b/ng2-components/ng2-alfresco-tag/src/components/tag-actions.component.spec.ts @@ -18,7 +18,7 @@ import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing'; import { TestComponentBuilder } from '@angular/compiler/testing'; -import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; +import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; import { TagService } from '../services/tag.service'; import { TagActionsComponent } from './tag-actions.component'; @@ -49,6 +49,7 @@ describe('Tag actions list', () => { return [ AlfrescoSettingsService, AlfrescoAuthenticationService, + AlfrescoApiService, TagService ]; }); diff --git a/ng2-components/ng2-alfresco-tag/src/components/tag-list.component.spec.ts b/ng2-components/ng2-alfresco-tag/src/components/tag-list.component.spec.ts index 766ea60f2a..34988f85bb 100644 --- a/ng2-components/ng2-alfresco-tag/src/components/tag-list.component.spec.ts +++ b/ng2-components/ng2-alfresco-tag/src/components/tag-list.component.spec.ts @@ -18,7 +18,7 @@ import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing'; import { TestComponentBuilder } from '@angular/compiler/testing'; -import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; +import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; import { TagService } from '../services/tag.service'; import { TagList } from './tag-list.component'; @@ -48,6 +48,7 @@ describe('Tag list All ECM', () => { return [ AlfrescoSettingsService, AlfrescoAuthenticationService, + AlfrescoApiService, TagService ]; }); diff --git a/ng2-components/ng2-alfresco-tag/src/components/tag-node-list.component.spec.ts b/ng2-components/ng2-alfresco-tag/src/components/tag-node-list.component.spec.ts index bd41dd4cf7..42a2fb2ac5 100644 --- a/ng2-components/ng2-alfresco-tag/src/components/tag-node-list.component.spec.ts +++ b/ng2-components/ng2-alfresco-tag/src/components/tag-node-list.component.spec.ts @@ -18,7 +18,7 @@ import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing'; import { TestComponentBuilder } from '@angular/compiler/testing'; -import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; +import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; import { TagService } from '../services/tag.service'; import { TagNodeList } from './tag-node-list.component'; @@ -48,6 +48,7 @@ describe('Tag relative node list', () => { return [ AlfrescoSettingsService, AlfrescoAuthenticationService, + AlfrescoApiService, TagService ]; }); diff --git a/ng2-components/ng2-alfresco-tag/src/services/tag.service.spec.ts b/ng2-components/ng2-alfresco-tag/src/services/tag.service.spec.ts index 61e0621be7..af8163114d 100644 --- a/ng2-components/ng2-alfresco-tag/src/services/tag.service.spec.ts +++ b/ng2-components/ng2-alfresco-tag/src/services/tag.service.spec.ts @@ -16,7 +16,7 @@ */ import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing'; -import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; +import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; import { TagService } from './tag.service'; declare let jasmine: any; @@ -30,6 +30,7 @@ describe('Tag service', () => { return [ AlfrescoSettingsService, AlfrescoAuthenticationService, + AlfrescoApiService, TagService ]; }); diff --git a/ng2-components/ng2-alfresco-tag/src/services/tag.service.ts b/ng2-components/ng2-alfresco-tag/src/services/tag.service.ts index 528f1c18e0..32efc0fdec 100644 --- a/ng2-components/ng2-alfresco-tag/src/services/tag.service.ts +++ b/ng2-components/ng2-alfresco-tag/src/services/tag.service.ts @@ -45,7 +45,7 @@ export class TagService { } addTag(nodeId: string, tagName: string): any { - let alfrescoApi = this.authService.getAlfrescoApi(); + let alfrescoApi: any = this.authService.getAlfrescoApi(); let tagBody = new alfrescoApi.core.TagBody(); tagBody.tag = tagName; diff --git a/ng2-components/ng2-alfresco-webscript/src/webscript.component.spec.ts b/ng2-components/ng2-alfresco-webscript/src/webscript.component.spec.ts index 99740a2e76..cc1f075140 100644 --- a/ng2-components/ng2-alfresco-webscript/src/webscript.component.spec.ts +++ b/ng2-components/ng2-alfresco-webscript/src/webscript.component.spec.ts @@ -18,7 +18,7 @@ import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach, xit } from '@angular/core/testing'; import { TestComponentBuilder } from '@angular/compiler/testing'; import { WebscriptComponent } from '../src/webscript.component'; -import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; +import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; declare let jasmine: any; @@ -29,8 +29,8 @@ describe('Test ng2-alfresco-webscript', () => { beforeEachProviders(() => { return [ AlfrescoSettingsService, - AlfrescoApiService, - AlfrescoAuthenticationService + AlfrescoAuthenticationService, + AlfrescoApiService ]; }); @@ -96,7 +96,6 @@ describe('Test ng2-alfresco-webscript', () => { }); it('webscript TEXT response should be displayed', (done) => { - component.scriptPath = 'sample/folder/Company%20Home'; component.contentType = 'TEXT'; @@ -115,7 +114,6 @@ describe('Test ng2-alfresco-webscript', () => { }); it('webscript JSON response should be displayed', (done) => { - component.scriptPath = 'sample/folder/Company%20Home'; component.contentType = 'JSON'; @@ -135,7 +133,6 @@ describe('Test ng2-alfresco-webscript', () => { }); xit('webscript HTML response should be displayed', (done) => { - component.scriptPath = 'sample/folder/Company%20Home'; component.contentType = 'HTML'; @@ -154,7 +151,6 @@ describe('Test ng2-alfresco-webscript', () => { }); it('webscript Datatable response should be displayed', (done) => { - component.scriptPath = 'sample/folder/Company%20Home'; component.contentType = 'DATATABLE'; @@ -190,7 +186,6 @@ describe('Test ng2-alfresco-webscript', () => { }); it('webscript Datatable response should be displayed also if no schema is provided', (done) => { - component.scriptPath = 'sample/folder/Company%20Home'; component.contentType = 'DATATABLE';