mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-2569] fix reload app.config.json (#3124)
* fix reload app.config.json * improve style mobile fix test * test karma setup update * fix core providers test * remove unused providers * use mock api in service test * skip test in the wrong place * remove comma * remove fdescribe
This commit is contained in:
committed by
Denys Vuika
parent
21b8cd30ce
commit
9e2969b955
@@ -40,8 +40,6 @@ describe('AppsListComponent', () => {
|
||||
],
|
||||
declarations: [
|
||||
AppsListComponent
|
||||
],
|
||||
providers: [
|
||||
]
|
||||
}).compileComponents();
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ describe('CommentListComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
|
||||
declarations: [
|
||||
CommentListComponent
|
||||
],
|
||||
|
||||
@@ -25,8 +25,6 @@ import {
|
||||
FormService,
|
||||
ProcessContentService,
|
||||
ActivitiContentService,
|
||||
AlfrescoApiService,
|
||||
LogService,
|
||||
ThumbnailService,
|
||||
SitesService,
|
||||
FormFieldMetadata,
|
||||
@@ -110,8 +108,6 @@ describe('AttachFileWidgetComponent', () => {
|
||||
ProcessContentService,
|
||||
ThumbnailService,
|
||||
ActivitiContentService,
|
||||
AlfrescoApiService,
|
||||
LogService,
|
||||
SitesService,
|
||||
DocumentListService,
|
||||
ContentNodeDialogService,
|
||||
|
||||
@@ -22,8 +22,6 @@ import {
|
||||
FormFieldModel,
|
||||
FormModel,
|
||||
FormService,
|
||||
AlfrescoApiService,
|
||||
LogService,
|
||||
ThumbnailService,
|
||||
SitesService,
|
||||
NodesApiService
|
||||
@@ -62,8 +60,6 @@ describe('AttachFolderWidgetComponent', () => {
|
||||
providers: [
|
||||
FormService,
|
||||
ThumbnailService,
|
||||
AlfrescoApiService,
|
||||
LogService,
|
||||
SitesService,
|
||||
DocumentListService,
|
||||
ContentNodeDialogService,
|
||||
|
||||
@@ -29,6 +29,11 @@ const CommonModule = require('@angular/common').CommonModule;
|
||||
const FormsModule = require('@angular/forms').FormsModule;
|
||||
const ReactiveFormsModule = require('@angular/forms').ReactiveFormsModule;
|
||||
|
||||
const AlfrescoApiServiceMock = require('@alfresco/adf-core').AlfrescoApiServiceMock;
|
||||
const AlfrescoApiService = require('@alfresco/adf-core').AlfrescoApiService;
|
||||
|
||||
console.log('AlfrescoApiServiceMock' + AlfrescoApiServiceMock);
|
||||
|
||||
TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -42,6 +47,7 @@ beforeEach(() => {
|
||||
ReactiveFormsModule
|
||||
],
|
||||
providers: [
|
||||
{provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock},
|
||||
{provide: AppConfigService, useClass: AppConfigServiceMock},
|
||||
{provide: TranslationService, useClass: TranslationMock}
|
||||
]
|
||||
|
||||
@@ -35,11 +35,8 @@ describe('PeopleListComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
|
||||
declarations: [
|
||||
PeopleListComponent
|
||||
],
|
||||
providers: [
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ describe('ProcessInstanceTasksComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [],
|
||||
declarations: [
|
||||
ProcessInstanceTasksComponent
|
||||
],
|
||||
|
||||
@@ -538,8 +538,7 @@ describe('CustomProcessListComponent', () => {
|
||||
],
|
||||
providers: [
|
||||
ProcessService
|
||||
],
|
||||
imports: []
|
||||
]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { AlfrescoApi } from 'alfresco-js-api';
|
||||
import { mockError, fakeProcessFilters } from '../../mock';
|
||||
import { FilterProcessRepresentationModel } from '../models/filter-process.model';
|
||||
import { ProcessFilterService } from './process-filter.service';
|
||||
import { AlfrescoApiService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiServiceMock, AlfrescoApiService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +31,7 @@ describe('Process filter', () => {
|
||||
let alfrescoApi: AlfrescoApi;
|
||||
|
||||
beforeEach(() => {
|
||||
apiService = new AlfrescoApiService(new AppConfigService(null), new StorageService() );
|
||||
apiService = new AlfrescoApiServiceMock(new AppConfigService(null), new StorageService() );
|
||||
service = new ProcessFilterService(apiService);
|
||||
alfrescoApi = apiService.getInstance();
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ import { mockError, fakeProcessDef, fakeTasksList } from '../../mock';
|
||||
import { ProcessFilterParamRepresentationModel } from '../models/filter-process.model';
|
||||
import { ProcessInstanceVariable } from '../models/process-instance-variable.model';
|
||||
import { ProcessService } from './process.service';
|
||||
import { AlfrescoApiService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
declare let moment: any;
|
||||
|
||||
@@ -33,7 +33,7 @@ describe('ProcessService', () => {
|
||||
let alfrescoApi: AlfrescoApi;
|
||||
|
||||
beforeEach(() => {
|
||||
apiService = new AlfrescoApiService(new AppConfigService(null), new StorageService() );
|
||||
apiService = new AlfrescoApiServiceMock(new AppConfigService(null), new StorageService() );
|
||||
service = new ProcessService(apiService);
|
||||
alfrescoApi = apiService.getInstance();
|
||||
});
|
||||
|
||||
@@ -127,7 +127,6 @@ describe('TaskListComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
|
||||
declarations: [
|
||||
TaskListComponent
|
||||
],
|
||||
@@ -659,8 +658,7 @@ describe('CustomTaskListComponent', () => {
|
||||
],
|
||||
providers: [
|
||||
TaskListService
|
||||
],
|
||||
imports: []
|
||||
]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ describe('TaskStandaloneComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
|
||||
declarations: [
|
||||
TaskStandaloneComponent
|
||||
],
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
} from '../../mock';
|
||||
import { FilterRepresentationModel } from '../models/filter.model';
|
||||
import { TaskFilterService } from './task-filter.service';
|
||||
import { AlfrescoApiService, LogService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiServiceMock, LogService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +31,7 @@ describe('Activiti Task filter Service', () => {
|
||||
|
||||
let service: TaskFilterService;
|
||||
beforeEach(async(() => {
|
||||
service = new TaskFilterService(new AlfrescoApiService(new AppConfigService(null), new StorageService()), new LogService(new AppConfigService(null)));
|
||||
service = new TaskFilterService(new AlfrescoApiServiceMock(new AppConfigService(null), new StorageService()), new LogService(new AppConfigService(null)));
|
||||
jasmine.Ajax.install();
|
||||
}));
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import {
|
||||
import { FilterRepresentationModel, TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { TaskListService } from './tasklist.service';
|
||||
import { AlfrescoApiService, LogService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiServiceMock, LogService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('Activiti TaskList Service', () => {
|
||||
let service: TaskListService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
service = new TaskListService(new AlfrescoApiService(new AppConfigService(null), new StorageService() ), new LogService(new AppConfigService(null)));
|
||||
service = new TaskListService(new AlfrescoApiServiceMock(new AppConfigService(null), new StorageService() ), new LogService(new AppConfigService(null)));
|
||||
jasmine.Ajax.install();
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user