mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix AlfrescoTranslateService usage
This commit is contained in:
@@ -16,10 +16,7 @@
|
||||
*/
|
||||
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import {
|
||||
CoreModule,
|
||||
AlfrescoTranslationService
|
||||
} from 'ng2-alfresco-core';
|
||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
||||
|
||||
import { DIAGRAM_DIRECTIVES, DIAGRAM_PROVIDERS } from './index';
|
||||
import { RAPHAEL_DIRECTIVES, RAPHAEL_PROVIDERS } from './raphael/index';
|
||||
@@ -50,7 +47,7 @@ describe('Test ng2-activiti-diagrams ', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
...DIAGRAM_DIRECTIVES,
|
||||
@@ -59,7 +56,7 @@ describe('Test ng2-activiti-diagrams ', () => {
|
||||
providers: [
|
||||
...DIAGRAM_PROVIDERS,
|
||||
...RAPHAEL_PROVIDERS,
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||
{provide: AlfrescoTranslateService, useClass: TranslationMock}
|
||||
]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
@@ -25,7 +25,7 @@ import { WIDGET_DIRECTIVES } from './widgets/index';
|
||||
import { FormService } from './../services/form.service';
|
||||
import { EcmModelService } from './../services/ecm-model.service';
|
||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { TranslationMock } from './../assets/translation.service.mock';
|
||||
|
||||
describe('ActivitiStartForm', () => {
|
||||
@@ -41,14 +41,14 @@ describe('ActivitiStartForm', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreModule],
|
||||
imports: [CoreModule.forRoot()],
|
||||
declarations: [
|
||||
ActivitiStartForm,
|
||||
FormFieldComponent,
|
||||
...WIDGET_DIRECTIVES
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
||||
EcmModelService,
|
||||
FormService,
|
||||
WidgetVisibilityService
|
||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||
|
||||
import { ActivitiProcessComments } from './activiti-process-comments.component';
|
||||
@@ -46,7 +46,7 @@ describe('ActivitiProcessInstanceComments', () => {
|
||||
ActivitiProcessComments
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
||||
ActivitiProcessService
|
||||
]
|
||||
}).compileComponents();
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, EventEmitter, Input, Output, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||
import { Comment } from 'ng2-activiti-tasklist';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
@@ -56,7 +56,7 @@ export class ActivitiProcessComments implements OnChanges {
|
||||
* @param translate Translation service
|
||||
* @param activitiProcess Process service
|
||||
*/
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
constructor(private translate: AlfrescoTranslateService,
|
||||
private activitiProcess: ActivitiProcessService) {
|
||||
|
||||
if (translate) {
|
||||
|
@@ -17,14 +17,7 @@
|
||||
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
|
||||
import {
|
||||
AlfrescoTranslationService,
|
||||
CoreModule,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService } from 'ng2-alfresco-core';
|
||||
|
||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { ActivitiProcessInstanceHeader } from './activiti-process-instance-header.component';
|
||||
import { TranslationMock } from './../assets/translation.service.mock';
|
||||
import { exampleProcess } from './../assets/activiti-process.model.mock';
|
||||
@@ -41,18 +34,15 @@ describe('ActivitiProcessInstanceHeader', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
ActivitiProcessInstanceHeader,
|
||||
ActivitiProcessComments
|
||||
],
|
||||
providers: [
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoApiService,
|
||||
ActivitiProcessService,
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||
{provide: AlfrescoTranslateService, useClass: TranslationMock}
|
||||
]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { TaskDetailsModel } from 'ng2-activiti-tasklist';
|
||||
|
||||
import { ActivitiProcessInstanceTasks } from './activiti-process-instance-tasks.component';
|
||||
@@ -43,13 +43,13 @@ describe('ActivitiProcessInstanceTasks', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
ActivitiProcessInstanceTasks
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
||||
ActivitiProcessService
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule, ObjectDataTableAdapter, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||
|
||||
import { ActivitiProcessInstanceVariables } from './activiti-process-instance-variables.component';
|
||||
@@ -40,14 +40,14 @@ describe('ActivitiProcessInstanceVariables', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule,
|
||||
DataTableModule
|
||||
CoreModule.forRoot(),
|
||||
DataTableModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
ActivitiProcessInstanceVariables
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
||||
ActivitiProcessService
|
||||
]
|
||||
}).compileComponents();
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, DebugElement, EventEmitter, Input, Output, OnInit, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
||||
|
||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
||||
import { ObjectDataTableAdapter, DataTableAdapter, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||
import { ProcessInstanceVariable } from './../models/process-instance-variable.model';
|
||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||
@@ -67,7 +67,7 @@ export class ActivitiProcessInstanceVariables implements OnInit, OnChanges {
|
||||
* @param translate Translation service
|
||||
* @param activitiProcess Process service
|
||||
*/
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
constructor(private translate: AlfrescoTranslateService,
|
||||
private activitiProcess: ActivitiProcessService) {
|
||||
|
||||
if (translate) {
|
||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { ActivitiProcessInstanceListComponent } from './activiti-processlist.component';
|
||||
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule, ObjectDataRow, DataRowEvent, ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
|
||||
import { TranslationMock } from './../assets/translation.service.mock';
|
||||
@@ -59,13 +59,13 @@ describe('ActivitiProcessInstanceListComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule,
|
||||
DataTableModule
|
||||
CoreModule.forRoot(),
|
||||
DataTableModule.forRoot()
|
||||
],
|
||||
declarations: [ ActivitiProcessInstanceListComponent ],
|
||||
providers: [
|
||||
ActivitiProcessService,
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||
{provide: AlfrescoTranslateService, useClass: TranslationMock}
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
fixture = TestBed.createComponent(ActivitiProcessInstanceListComponent);
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
||||
import { ObjectDataTableAdapter, DataTableAdapter, DataRowEvent, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||
import { TaskQueryRequestRepresentationModel } from 'ng2-activiti-tasklist';
|
||||
|
||||
@@ -70,7 +70,7 @@ export class ActivitiProcessInstanceListComponent implements OnInit, OnChanges {
|
||||
];
|
||||
|
||||
constructor(private processService: ActivitiProcessService,
|
||||
private translate: AlfrescoTranslationService) {
|
||||
private translate: AlfrescoTranslateService) {
|
||||
if (translate !== null) {
|
||||
translate.addTranslationFolder('ng2-activiti-processlist', 'node_modules/ng2-activiti-processlist/src');
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { DebugElement, SimpleChange } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { ActivitiFormModule, FormService } from 'ng2-activiti-form';
|
||||
|
||||
import { TranslationMock } from './../assets/translation.service.mock';
|
||||
@@ -41,12 +41,15 @@ describe('ActivitiStartProcessInstance', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ CoreModule, ActivitiFormModule ],
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
ActivitiFormModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
ActivitiStartProcessInstance
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
||||
ActivitiProcessService,
|
||||
FormService
|
||||
]
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, EventEmitter, Input, Output, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
||||
import { ActivitiStartForm } from 'ng2-activiti-form';
|
||||
import { ProcessInstance } from './../models/process-instance.model';
|
||||
import { ProcessDefinitionRepresentation } from './../models/process-definition.model';
|
||||
@@ -53,7 +53,7 @@ export class ActivitiStartProcessInstance implements OnChanges {
|
||||
|
||||
errorMessageId: string = '';
|
||||
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
constructor(private translate: AlfrescoTranslateService,
|
||||
private activitiProcess: ActivitiProcessService) {
|
||||
|
||||
if (translate) {
|
||||
|
@@ -25,7 +25,7 @@ import { SearchModule } from 'ng2-alfresco-search';
|
||||
import {
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoTranslationService
|
||||
AlfrescoTranslateService
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
@@ -56,7 +56,7 @@ class SearchDemo implements OnInit {
|
||||
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
translation: AlfrescoTranslationService,
|
||||
translation: AlfrescoTranslateService,
|
||||
private logService: LogService) {
|
||||
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
|
@@ -20,7 +20,8 @@ import {
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
StorageService
|
||||
StorageService,
|
||||
LogService
|
||||
} from 'ng2-alfresco-core';
|
||||
import { TagService } from '../services/tag.service';
|
||||
|
||||
@@ -36,7 +37,8 @@ describe('Tag service', () => {
|
||||
AlfrescoApiService,
|
||||
AuthService,
|
||||
TagService,
|
||||
StorageService
|
||||
StorageService,
|
||||
LogService
|
||||
]);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user