mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix build tags add AlfrescoApiService
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/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 { TagService } from '../services/tag.service';
|
||||||
import { TagActionsComponent } from './tag-actions.component';
|
import { TagActionsComponent } from './tag-actions.component';
|
||||||
|
|
||||||
@@ -49,6 +49,7 @@ describe('Tag actions list', () => {
|
|||||||
return [
|
return [
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
|
AlfrescoApiService,
|
||||||
TagService
|
TagService
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/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 { TagService } from '../services/tag.service';
|
||||||
import { TagList } from './tag-list.component';
|
import { TagList } from './tag-list.component';
|
||||||
|
|
||||||
@@ -48,6 +48,7 @@ describe('Tag list All ECM', () => {
|
|||||||
return [
|
return [
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
|
AlfrescoApiService,
|
||||||
TagService
|
TagService
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/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 { TagService } from '../services/tag.service';
|
||||||
import { TagNodeList } from './tag-node-list.component';
|
import { TagNodeList } from './tag-node-list.component';
|
||||||
|
|
||||||
@@ -48,6 +48,7 @@ describe('Tag relative node list', () => {
|
|||||||
return [
|
return [
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
|
AlfrescoApiService,
|
||||||
TagService
|
TagService
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
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';
|
import { TagService } from './tag.service';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
@@ -30,6 +30,7 @@ describe('Tag service', () => {
|
|||||||
return [
|
return [
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
|
AlfrescoApiService,
|
||||||
TagService
|
TagService
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
@@ -45,7 +45,7 @@ export class TagService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addTag(nodeId: string, tagName: string): any {
|
addTag(nodeId: string, tagName: string): any {
|
||||||
let alfrescoApi = this.authService.getAlfrescoApi();
|
let alfrescoApi: any = this.authService.getAlfrescoApi();
|
||||||
let tagBody = new alfrescoApi.core.TagBody();
|
let tagBody = new alfrescoApi.core.TagBody();
|
||||||
tagBody.tag = tagName;
|
tagBody.tag = tagName;
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach, xit } from '@angular/core/testing';
|
import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach, xit } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { WebscriptComponent } from '../src/webscript.component';
|
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;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@@ -29,8 +29,8 @@ describe('Test ng2-alfresco-webscript', () => {
|
|||||||
beforeEachProviders(() => {
|
beforeEachProviders(() => {
|
||||||
return [
|
return [
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoAuthenticationService
|
AlfrescoApiService
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -96,7 +96,6 @@ describe('Test ng2-alfresco-webscript', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('webscript TEXT response should be displayed', (done) => {
|
it('webscript TEXT response should be displayed', (done) => {
|
||||||
|
|
||||||
component.scriptPath = 'sample/folder/Company%20Home';
|
component.scriptPath = 'sample/folder/Company%20Home';
|
||||||
component.contentType = 'TEXT';
|
component.contentType = 'TEXT';
|
||||||
|
|
||||||
@@ -115,7 +114,6 @@ describe('Test ng2-alfresco-webscript', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('webscript JSON response should be displayed', (done) => {
|
it('webscript JSON response should be displayed', (done) => {
|
||||||
|
|
||||||
component.scriptPath = 'sample/folder/Company%20Home';
|
component.scriptPath = 'sample/folder/Company%20Home';
|
||||||
component.contentType = 'JSON';
|
component.contentType = 'JSON';
|
||||||
|
|
||||||
@@ -135,7 +133,6 @@ describe('Test ng2-alfresco-webscript', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
xit('webscript HTML response should be displayed', (done) => {
|
xit('webscript HTML response should be displayed', (done) => {
|
||||||
|
|
||||||
component.scriptPath = 'sample/folder/Company%20Home';
|
component.scriptPath = 'sample/folder/Company%20Home';
|
||||||
component.contentType = 'HTML';
|
component.contentType = 'HTML';
|
||||||
|
|
||||||
@@ -154,7 +151,6 @@ describe('Test ng2-alfresco-webscript', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('webscript Datatable response should be displayed', (done) => {
|
it('webscript Datatable response should be displayed', (done) => {
|
||||||
|
|
||||||
component.scriptPath = 'sample/folder/Company%20Home';
|
component.scriptPath = 'sample/folder/Company%20Home';
|
||||||
component.contentType = 'DATATABLE';
|
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) => {
|
it('webscript Datatable response should be displayed also if no schema is provided', (done) => {
|
||||||
|
|
||||||
component.scriptPath = 'sample/folder/Company%20Home';
|
component.scriptPath = 'sample/folder/Company%20Home';
|
||||||
component.contentType = 'DATATABLE';
|
component.contentType = 'DATATABLE';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user