mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1103] Add custom tslint rules to avoid unwanted Class and File name prefix (#2087)
* custom tslint rules adf project name files * filename and class prefix rule * filename process service mock * fix spec filename * fix demo shell * rename mock * alias deprecated name class * core rename services * fix pacakge.json adf-rules * add exclude in whitelist
This commit is contained in:
@@ -17,71 +17,133 @@
|
||||
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import {
|
||||
MdAutocompleteModule,
|
||||
MdButtonModule,
|
||||
MdCardModule,
|
||||
MdDatepickerModule,
|
||||
MdGridListModule,
|
||||
MdIconModule,
|
||||
MdInputModule,
|
||||
MdNativeDateModule,
|
||||
MdProgressSpinnerModule,
|
||||
MdSelectModule
|
||||
} from '@angular/material';
|
||||
import { MdAutocompleteModule, MdButtonModule, MdCardModule, MdDatepickerModule, MdGridListModule,
|
||||
MdIconModule, MdInputModule, MdNativeDateModule, MdProgressSpinnerModule, MdSelectModule } from '@angular/material';
|
||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { ActivitiPeopleService } from './src/services/activiti-people.service';
|
||||
import { ActivitiTaskListService } from './src/services/activiti-tasklist.service';
|
||||
import { PeopleService } from './src/services/people.service';
|
||||
import { ProcessUploadService } from './src/services/process-upload.service';
|
||||
import { TaskListService } from './src/services/tasklist.service';
|
||||
|
||||
import {
|
||||
ActivitiAppsComponent,
|
||||
ActivitiChecklistComponent,
|
||||
ActivitiCommentsComponent,
|
||||
ActivitiCreateTaskAttachmentComponent,
|
||||
ActivitiFiltersComponent,
|
||||
ActivitiPeopleComponent,
|
||||
ActivitiPeopleSearchComponent,
|
||||
ActivitiStartTaskComponent,
|
||||
ActivitiTaskDetailsComponent,
|
||||
ActivitiTaskHeaderComponent,
|
||||
ActivitiTaskListComponent,
|
||||
AdfCommentListComponent,
|
||||
NoTaskDetailsTemplateDirective,
|
||||
PeopleListComponent,
|
||||
TaskAttachmentListComponent
|
||||
} from './src/components/index';
|
||||
import {AppsListComponent } from './src/components/apps-list.component';
|
||||
import {ChecklistComponent } from './src/components/checklist.component';
|
||||
import {CommentListComponent } from './src/components/comment-list.component';
|
||||
import {CommentsComponent } from './src/components/comments.component';
|
||||
import {AttachmentComponent } from './src/components/create-task-attachment.component';
|
||||
import {NoTaskDetailsTemplateDirective } from './src/components/no-task-detail-template.directive';
|
||||
import {PeopleListComponent } from './src/components/people-list.component';
|
||||
import {PeopleSearchComponent } from './src/components/people-search.component';
|
||||
import {PeopleComponent } from './src/components/people.component';
|
||||
import {StartTaskComponent } from './src/components/start-task.component';
|
||||
import {TaskAttachmentListComponent} from './src/components/task-attachment-list.component';
|
||||
import {TaskDetailsComponent } from './src/components/task-details.component';
|
||||
import {TaskFiltersComponent } from './src/components/task-filters.component';
|
||||
import {TaskHeaderComponent } from './src/components/task-header.component';
|
||||
import {TaskListComponent } from './src/components/tasklist.component';
|
||||
|
||||
export * from './src/components/index';
|
||||
export * from './src/services/activiti-tasklist.service';
|
||||
export * from './src/services/activiti-people.service';
|
||||
export * from './src/services/process-upload.service';
|
||||
export * from './src/models/index';
|
||||
export {AppsListComponent } from './src/components/apps-list.component';
|
||||
export {TaskListComponent } from './src/components/tasklist.component';
|
||||
export {ChecklistComponent } from './src/components/checklist.component';
|
||||
export {CommentsComponent } from './src/components/comments.component';
|
||||
export {TaskAttachmentListComponent} from './src/components/task-attachment-list.component';
|
||||
export {PeopleComponent } from './src/components/people.component';
|
||||
export {TaskHeaderComponent } from './src/components/task-header.component';
|
||||
export {NoTaskDetailsTemplateDirective } from './src/components/no-task-detail-template.directive';
|
||||
export {TaskFiltersComponent } from './src/components/task-filters.component';
|
||||
export {TaskDetailsComponent } from './src/components/task-details.component';
|
||||
export {StartTaskComponent } from './src/components/start-task.component';
|
||||
export {PeopleSearchComponent } from './src/components/people-search.component';
|
||||
export {AttachmentComponent } from './src/components/create-task-attachment.component';
|
||||
export {PeopleListComponent } from './src/components/people-list.component';
|
||||
export {CommentListComponent } from './src/components/comment-list.component';
|
||||
|
||||
export { TaskListService } from './src/services/tasklist.service';
|
||||
export { PeopleService } from './src/services/people.service';
|
||||
export { ProcessUploadService } from './src/services/process-upload.service';
|
||||
|
||||
// Old Deprecated export
|
||||
import {AppsListComponent as ActivitiApps} from './src/components/apps-list.component';
|
||||
import {ChecklistComponent as ActivitiChecklist} from './src/components/checklist.component';
|
||||
import {CommentsComponent as ActivitiComments} from './src/components/comments.component';
|
||||
import {AttachmentComponent as ActivitiCreateTaskAttachmentComponent } from './src/components/create-task-attachment.component';
|
||||
import {NoTaskDetailsTemplateDirective as NoTaskDetailsTemplateComponent } from './src/components/no-task-detail-template.directive';
|
||||
import {PeopleListComponent as PeopleList } from './src/components/people-list.component';
|
||||
import {PeopleSearchComponent as ActivitiPeopleSearch } from './src/components/people-search.component';
|
||||
import {PeopleComponent as ActivitiPeople} from './src/components/people.component';
|
||||
import {StartTaskComponent as ActivitiStartTaskButton } from './src/components/start-task.component';
|
||||
import {TaskDetailsComponent as ActivitiTaskDetails } from './src/components/task-details.component';
|
||||
import {TaskFiltersComponent as ActivitiFilters } from './src/components/task-filters.component';
|
||||
import {TaskHeaderComponent as ActivitiTaskHeader} from './src/components/task-header.component';
|
||||
import {TaskListComponent as ActivitiTaskList } from './src/components/tasklist.component';
|
||||
import {PeopleService as ActivitiPeopleService } from './src/services/people.service';
|
||||
import {TaskListService as ActivitiTaskListService } from './src/services/tasklist.service';
|
||||
export {AppsListComponent as ActivitiApps} from './src/components/apps-list.component';
|
||||
export {ChecklistComponent as ActivitiChecklist} from './src/components/checklist.component';
|
||||
export {CommentsComponent as ActivitiComments} from './src/components/comments.component';
|
||||
export {AttachmentComponent as ActivitiCreateTaskAttachmentComponent } from './src/components/create-task-attachment.component';
|
||||
export {NoTaskDetailsTemplateDirective as NoTaskDetailsTemplateComponent } from './src/components/no-task-detail-template.directive';
|
||||
export {PeopleListComponent as PeopleList } from './src/components/people-list.component';
|
||||
export {PeopleSearchComponent as ActivitiPeopleSearch } from './src/components/people-search.component';
|
||||
export {PeopleComponent as ActivitiPeople} from './src/components/people.component';
|
||||
export {StartTaskComponent as ActivitiStartTaskButton } from './src/components/start-task.component';
|
||||
export {TaskDetailsComponent as ActivitiTaskDetails } from './src/components/task-details.component';
|
||||
export {TaskFiltersComponent as ActivitiFilters } from './src/components/task-filters.component';
|
||||
export {TaskHeaderComponent as ActivitiTaskHeader} from './src/components/task-header.component';
|
||||
export {TaskListComponent as ActivitiTaskList } from './src/components/tasklist.component';
|
||||
export {PeopleService as ActivitiPeopleService } from './src/services/people.service';
|
||||
export {TaskListService as ActivitiTaskListService } from './src/services/tasklist.service';
|
||||
|
||||
export * from './src/models/comment.model';
|
||||
export * from './src/models/filter.model';
|
||||
export * from './src/models/icon.model';
|
||||
export * from './src/models/user.model';
|
||||
export * from './src/models/task-details.model';
|
||||
export * from './src/models/task-details.event';
|
||||
export * from './src/models/user-event.model';
|
||||
export * from './src/models/start-task.model';
|
||||
|
||||
export const ACTIVITI_TASKLIST_DIRECTIVES: any[] = [
|
||||
NoTaskDetailsTemplateDirective,
|
||||
ActivitiAppsComponent,
|
||||
ActivitiFiltersComponent,
|
||||
ActivitiTaskListComponent,
|
||||
ActivitiTaskDetailsComponent,
|
||||
ActivitiChecklistComponent,
|
||||
ActivitiCommentsComponent,
|
||||
ActivitiPeopleComponent,
|
||||
ActivitiTaskHeaderComponent,
|
||||
ActivitiStartTaskComponent,
|
||||
ActivitiPeopleSearchComponent,
|
||||
AppsListComponent,
|
||||
TaskFiltersComponent,
|
||||
TaskListComponent,
|
||||
TaskDetailsComponent,
|
||||
ChecklistComponent,
|
||||
CommentsComponent,
|
||||
PeopleComponent,
|
||||
TaskHeaderComponent,
|
||||
StartTaskComponent,
|
||||
PeopleSearchComponent,
|
||||
TaskAttachmentListComponent,
|
||||
ActivitiCreateTaskAttachmentComponent,
|
||||
AttachmentComponent,
|
||||
PeopleListComponent,
|
||||
AdfCommentListComponent
|
||||
CommentListComponent,
|
||||
|
||||
// Old Deprecated export
|
||||
ActivitiApps,
|
||||
ActivitiTaskList,
|
||||
ActivitiTaskDetails,
|
||||
ActivitiFilters,
|
||||
NoTaskDetailsTemplateComponent,
|
||||
ActivitiChecklist,
|
||||
ActivitiComments,
|
||||
ActivitiPeople,
|
||||
ActivitiTaskHeader,
|
||||
ActivitiStartTaskButton,
|
||||
ActivitiPeopleSearch,
|
||||
ActivitiCreateTaskAttachmentComponent,
|
||||
PeopleList
|
||||
];
|
||||
|
||||
export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [
|
||||
TaskListService,
|
||||
PeopleService,
|
||||
ProcessUploadService,
|
||||
|
||||
// Old Deprecated export
|
||||
ActivitiTaskListService,
|
||||
ActivitiPeopleService,
|
||||
ProcessUploadService
|
||||
ActivitiPeopleService
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@@ -21,17 +21,17 @@ import { By } from '@angular/platform-browser';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import { defaultApp, deployedApps, nonDeployedApps } from './../assets/activiti-apps.mock';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { ActivitiAppsComponent } from './activiti-apps.component';
|
||||
import { defaultApp, deployedApps, nonDeployedApps } from './../assets/apps-list.mock';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
import { AppsListComponent } from './apps-list.component';
|
||||
|
||||
describe('ActivitiAppsComponent', () => {
|
||||
describe('AppsListComponent', () => {
|
||||
|
||||
let componentHandler: any;
|
||||
let component: ActivitiAppsComponent;
|
||||
let fixture: ComponentFixture<ActivitiAppsComponent>;
|
||||
let component: AppsListComponent;
|
||||
let fixture: ComponentFixture<AppsListComponent>;
|
||||
let debugElement: DebugElement;
|
||||
let service: ActivitiTaskListService;
|
||||
let service: TaskListService;
|
||||
let getAppsSpy: jasmine.Spy;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -40,10 +40,10 @@ describe('ActivitiAppsComponent', () => {
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
ActivitiAppsComponent
|
||||
AppsListComponent
|
||||
],
|
||||
providers: [
|
||||
ActivitiTaskListService
|
||||
TaskListService
|
||||
]
|
||||
}).compileComponents();
|
||||
|
||||
@@ -54,11 +54,11 @@ describe('ActivitiAppsComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiAppsComponent);
|
||||
fixture = TestBed.createComponent(AppsListComponent);
|
||||
component = fixture.componentInstance;
|
||||
debugElement = fixture.debugElement;
|
||||
|
||||
service = fixture.debugElement.injector.get(ActivitiTaskListService);
|
||||
service = fixture.debugElement.injector.get(TaskListService);
|
||||
getAppsSpy = spyOn(service, 'getDeployedApplications').and.returnValue(Observable.of(deployedApps));
|
||||
|
||||
componentHandler = jasmine.createSpyObj('componentHandler', [
|
||||
@@ -148,14 +148,14 @@ describe('ActivitiAppsComponent', () => {
|
||||
});
|
||||
|
||||
it('should display a grid when configured to', () => {
|
||||
component.layoutType = ActivitiAppsComponent.LAYOUT_GRID;
|
||||
component.layoutType = AppsListComponent.LAYOUT_GRID;
|
||||
fixture.detectChanges();
|
||||
expect(component.isGrid()).toBe(true);
|
||||
expect(component.isList()).toBe(false);
|
||||
});
|
||||
|
||||
it('should display a list when configured to', () => {
|
||||
component.layoutType = ActivitiAppsComponent.LAYOUT_LIST;
|
||||
component.layoutType = AppsListComponent.LAYOUT_LIST;
|
||||
fixture.detectChanges();
|
||||
expect(component.isGrid()).toBe(false);
|
||||
expect(component.isList()).toBe(true);
|
@@ -21,17 +21,17 @@ import { Observable } from 'rxjs/Observable';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
import { AppDefinitionRepresentationModel } from '../models/filter.model';
|
||||
import { IconModel } from '../models/icon.model';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
declare let componentHandler: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-apps, activiti-apps',
|
||||
templateUrl: 'activiti-apps.component.html',
|
||||
styleUrls: ['./activiti-apps.component.css', './activiti-apps-grid.component.css'],
|
||||
providers: [ActivitiTaskListService]
|
||||
templateUrl: 'apps-list.component.html',
|
||||
styleUrls: ['./apps-list.component.css', './apps-grid.component.css'],
|
||||
providers: [TaskListService]
|
||||
})
|
||||
export class ActivitiAppsComponent implements OnInit {
|
||||
export class AppsListComponent implements OnInit {
|
||||
|
||||
public static LAYOUT_LIST: string = 'LIST';
|
||||
public static LAYOUT_GRID: string = 'GRID';
|
||||
@@ -42,7 +42,7 @@ export class ActivitiAppsComponent implements OnInit {
|
||||
public static DEFAULT_TASKS_APP_MATERIAL_ICON: string = 'favorite_border';
|
||||
|
||||
@Input()
|
||||
layoutType: string = ActivitiAppsComponent.LAYOUT_GRID;
|
||||
layoutType: string = AppsListComponent.LAYOUT_GRID;
|
||||
|
||||
@Input()
|
||||
filtersAppId: any[];
|
||||
@@ -68,7 +68,7 @@ export class ActivitiAppsComponent implements OnInit {
|
||||
* @param activitiTaskList Task service
|
||||
*/
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activitiTaskList: ActivitiTaskListService) {
|
||||
private activitiTaskList: TaskListService) {
|
||||
|
||||
if (translateService) {
|
||||
translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist');
|
||||
@@ -94,10 +94,10 @@ export class ActivitiAppsComponent implements OnInit {
|
||||
(res) => {
|
||||
res = this.filterApps(res);
|
||||
res.forEach((app: AppDefinitionRepresentationModel) => {
|
||||
if (app.defaultAppId === ActivitiAppsComponent.DEFAULT_TASKS_APP) {
|
||||
app.name = ActivitiAppsComponent.DEFAULT_TASKS_APP_NAME;
|
||||
app.theme = ActivitiAppsComponent.DEFAULT_TASKS_APP_THEME;
|
||||
app.icon = ActivitiAppsComponent.DEFAULT_TASKS_APP_ICON;
|
||||
if (app.defaultAppId === AppsListComponent.DEFAULT_TASKS_APP) {
|
||||
app.name = AppsListComponent.DEFAULT_TASKS_APP_NAME;
|
||||
app.theme = AppsListComponent.DEFAULT_TASKS_APP_THEME;
|
||||
app.icon = AppsListComponent.DEFAULT_TASKS_APP_ICON;
|
||||
this.appsObserver.next(app);
|
||||
} else if (app.deploymentId) {
|
||||
this.appsObserver.next(app);
|
||||
@@ -154,7 +154,7 @@ export class ActivitiAppsComponent implements OnInit {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isValidType(): boolean {
|
||||
if (this.layoutType && (this.layoutType === ActivitiAppsComponent.LAYOUT_LIST || this.layoutType === ActivitiAppsComponent.LAYOUT_GRID)) {
|
||||
if (this.layoutType && (this.layoutType === AppsListComponent.LAYOUT_LIST || this.layoutType === AppsListComponent.LAYOUT_GRID)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -164,7 +164,7 @@ export class ActivitiAppsComponent implements OnInit {
|
||||
* Assign the default value to LayoutType
|
||||
*/
|
||||
setDefaultLayoutType(): void {
|
||||
this.layoutType = ActivitiAppsComponent.LAYOUT_GRID;
|
||||
this.layoutType = AppsListComponent.LAYOUT_GRID;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -172,7 +172,7 @@ export class ActivitiAppsComponent implements OnInit {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isList(): boolean {
|
||||
return this.layoutType === ActivitiAppsComponent.LAYOUT_LIST;
|
||||
return this.layoutType === AppsListComponent.LAYOUT_LIST;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -180,7 +180,7 @@ export class ActivitiAppsComponent implements OnInit {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isGrid(): boolean {
|
||||
return this.layoutType === ActivitiAppsComponent.LAYOUT_GRID;
|
||||
return this.layoutType === AppsListComponent.LAYOUT_GRID;
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
@@ -20,8 +20,8 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||
import { ActivitiChecklistComponent } from './activiti-checklist.component';
|
||||
import { TaskListService } from '../services/tasklist.service';
|
||||
import { ChecklistComponent } from './checklist.component';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -30,10 +30,10 @@ const fakeTaskDetail = new TaskDetailsModel({
|
||||
name: 'fake-check-name'
|
||||
});
|
||||
|
||||
describe('ActivitiChecklistComponent', () => {
|
||||
describe('ChecklistComponent', () => {
|
||||
|
||||
let checklistComponent: ActivitiChecklistComponent;
|
||||
let fixture: ComponentFixture<ActivitiChecklistComponent>;
|
||||
let checklistComponent: ChecklistComponent;
|
||||
let fixture: ComponentFixture<ChecklistComponent>;
|
||||
let element: HTMLElement;
|
||||
let showChecklistDialog, closeCheckDialogButton;
|
||||
|
||||
@@ -43,10 +43,10 @@ describe('ActivitiChecklistComponent', () => {
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
ActivitiChecklistComponent
|
||||
ChecklistComponent
|
||||
],
|
||||
providers: [
|
||||
ActivitiTaskListService
|
||||
TaskListService
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||
@@ -55,7 +55,7 @@ describe('ActivitiChecklistComponent', () => {
|
||||
return Observable.of(key);
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiChecklistComponent);
|
||||
fixture = TestBed.createComponent(ChecklistComponent);
|
||||
checklistComponent = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
|
@@ -19,17 +19,17 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChange
|
||||
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||
import { Observable, Observer } from 'rxjs/Rx';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
declare let dialogPolyfill: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-checklist, activiti-checklist',
|
||||
templateUrl: './activiti-checklist.component.html',
|
||||
styleUrls: ['./activiti-checklist.component.css'],
|
||||
providers: [ActivitiTaskListService]
|
||||
templateUrl: './checklist.component.html',
|
||||
styleUrls: ['./checklist.component.css'],
|
||||
providers: [TaskListService]
|
||||
})
|
||||
export class ActivitiChecklistComponent implements OnInit, OnChanges {
|
||||
export class ChecklistComponent implements OnInit, OnChanges {
|
||||
|
||||
@Input()
|
||||
taskId: string;
|
||||
@@ -65,7 +65,7 @@ export class ActivitiChecklistComponent implements OnInit, OnChanges {
|
||||
* @param translate
|
||||
*/
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activitiTaskList: ActivitiTaskListService,
|
||||
private activitiTaskList: TaskListService,
|
||||
private logService: LogService) {
|
||||
|
||||
if (translateService) {
|
@@ -19,8 +19,9 @@ import { DatePipe } from '@angular/common';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataRowEvent, DataTableModule, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||
import { Comment, User } from '../models/index';
|
||||
import { AdfCommentListComponent } from './adf-comment-list.component';
|
||||
import { Comment } from '../models/comment.model';
|
||||
import { User } from '../models/user.model';
|
||||
import { CommentListComponent } from './comment-list.component';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -33,10 +34,10 @@ const testUser: User = new User({
|
||||
const testDate = new Date();
|
||||
const testComment: Comment = new Comment(1, 'Test Comment', testDate.toDateString(), testUser);
|
||||
|
||||
describe('AdfCommentListComponent', () => {
|
||||
describe('CommentListComponent', () => {
|
||||
|
||||
let commentList: AdfCommentListComponent;
|
||||
let fixture: ComponentFixture<AdfCommentListComponent>;
|
||||
let commentList: CommentListComponent;
|
||||
let fixture: ComponentFixture<CommentListComponent>;
|
||||
let element: HTMLElement;
|
||||
let componentHandler;
|
||||
|
||||
@@ -47,14 +48,14 @@ describe('AdfCommentListComponent', () => {
|
||||
DataTableModule
|
||||
],
|
||||
declarations: [
|
||||
AdfCommentListComponent
|
||||
CommentListComponent
|
||||
],
|
||||
providers: [
|
||||
DatePipe
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
|
||||
fixture = TestBed.createComponent(AdfCommentListComponent);
|
||||
fixture = TestBed.createComponent(CommentListComponent);
|
||||
commentList = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
componentHandler = jasmine.createSpyObj('componentHandler', [
|
@@ -17,15 +17,16 @@
|
||||
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { Comment, User } from '../models/index';
|
||||
import { Comment } from '../models/comment.model';
|
||||
import { User } from '../models/user.model';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-comment-list',
|
||||
templateUrl: './adf-comment-list.component.html',
|
||||
styleUrls: ['./adf-comment-list.component.css']
|
||||
templateUrl: './comment-list.component.html',
|
||||
styleUrls: ['./comment-list.component.css']
|
||||
})
|
||||
|
||||
export class AdfCommentListComponent {
|
||||
export class CommentListComponent {
|
||||
|
||||
@Input()
|
||||
comments: Comment[];
|
@@ -25,16 +25,16 @@ import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { MdInputModule } from '@angular/material';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { ActivitiCommentsComponent } from './activiti-comments.component';
|
||||
import { AdfCommentListComponent } from './adf-comment-list.component';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
import { CommentsComponent } from './comments.component';
|
||||
import { CommentListComponent } from './comment-list.component';
|
||||
|
||||
describe('ActivitiCommentsComponent', () => {
|
||||
describe('CommentsComponent', () => {
|
||||
|
||||
let componentHandler: any;
|
||||
let service: ActivitiTaskListService;
|
||||
let component: ActivitiCommentsComponent;
|
||||
let fixture: ComponentFixture<ActivitiCommentsComponent>;
|
||||
let service: TaskListService;
|
||||
let component: CommentsComponent;
|
||||
let fixture: ComponentFixture<CommentsComponent>;
|
||||
let getCommentsSpy: jasmine.Spy;
|
||||
let addCommentSpy: jasmine.Spy;
|
||||
|
||||
@@ -47,11 +47,11 @@ describe('ActivitiCommentsComponent', () => {
|
||||
MdInputModule
|
||||
],
|
||||
declarations: [
|
||||
ActivitiCommentsComponent,
|
||||
AdfCommentListComponent
|
||||
CommentsComponent,
|
||||
CommentListComponent
|
||||
],
|
||||
providers: [
|
||||
ActivitiTaskListService,
|
||||
TaskListService,
|
||||
DatePipe
|
||||
]
|
||||
}).compileComponents();
|
||||
@@ -62,9 +62,9 @@ describe('ActivitiCommentsComponent', () => {
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ActivitiCommentsComponent);
|
||||
fixture = TestBed.createComponent(CommentsComponent);
|
||||
component = fixture.componentInstance;
|
||||
service = fixture.debugElement.injector.get(ActivitiTaskListService);
|
||||
service = fixture.debugElement.injector.get(TaskListService);
|
||||
|
||||
getCommentsSpy = spyOn(service, 'getTaskComments').and.returnValue(Observable.of([
|
||||
{ message: 'Test1', created: Date.now(), createdBy: {firstName: 'Admin', lastName: 'User'} },
|
@@ -20,15 +20,15 @@ import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { Observable, Observer } from 'rxjs/Rx';
|
||||
|
||||
import { Comment } from '../models/comment.model';
|
||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||
import { TaskListService } from '../services/tasklist.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-comments, activiti-comments',
|
||||
templateUrl: './activiti-comments.component.html',
|
||||
styleUrls: ['./activiti-comments.component.css'],
|
||||
providers: [ActivitiTaskListService]
|
||||
templateUrl: './comments.component.html',
|
||||
styleUrls: ['./comments.component.css'],
|
||||
providers: [TaskListService]
|
||||
})
|
||||
export class ActivitiCommentsComponent implements OnChanges {
|
||||
export class CommentsComponent implements OnChanges {
|
||||
|
||||
@Input()
|
||||
taskId: string;
|
||||
@@ -54,7 +54,7 @@ export class ActivitiCommentsComponent implements OnChanges {
|
||||
* @param activitiTaskList Task service
|
||||
*/
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activitiTaskList: ActivitiTaskListService) {
|
||||
private activitiTaskList: TaskListService) {
|
||||
|
||||
if (translateService) {
|
||||
translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist');
|
@@ -22,14 +22,14 @@ import { Observable } from 'rxjs/Rx';
|
||||
import { ActivitiContentService } from 'ng2-activiti-form';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { ActivitiCreateTaskAttachmentComponent } from './adf-create-task-attachment.component';
|
||||
import { AttachmentComponent } from './create-task-attachment.component';
|
||||
|
||||
describe('Activiti Task Create Attachment', () => {
|
||||
|
||||
let componentHandler: any;
|
||||
let service: ActivitiContentService;
|
||||
let component: ActivitiCreateTaskAttachmentComponent;
|
||||
let fixture: ComponentFixture<ActivitiCreateTaskAttachmentComponent>;
|
||||
let component: AttachmentComponent;
|
||||
let fixture: ComponentFixture<AttachmentComponent>;
|
||||
let createTaskRelatedContentSpy: jasmine.Spy;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -38,7 +38,7 @@ describe('Activiti Task Create Attachment', () => {
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
ActivitiCreateTaskAttachmentComponent
|
||||
AttachmentComponent
|
||||
],
|
||||
providers: [
|
||||
{provide: AlfrescoTranslationService},
|
||||
@@ -49,7 +49,7 @@ describe('Activiti Task Create Attachment', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiCreateTaskAttachmentComponent);
|
||||
fixture = TestBed.createComponent(AttachmentComponent);
|
||||
component = fixture.componentInstance;
|
||||
service = fixture.debugElement.injector.get(ActivitiContentService);
|
||||
|
@@ -21,10 +21,10 @@ import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-create-task-attachment',
|
||||
styleUrls: ['./adf-create-task-attachment.component.css'],
|
||||
templateUrl: './adf-create-task-attachment.component.html'
|
||||
styleUrls: ['./create-task-attachment.component.css'],
|
||||
templateUrl: './create-task-attachment.component.html'
|
||||
})
|
||||
export class ActivitiCreateTaskAttachmentComponent implements OnChanges {
|
||||
export class AttachmentComponent implements OnChanges {
|
||||
|
||||
@Input()
|
||||
taskId: string;
|
@@ -1,32 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './activiti-apps.component';
|
||||
export * from './activiti-tasklist.component';
|
||||
export * from './activiti-checklist.component';
|
||||
export * from './activiti-comments.component';
|
||||
export * from './adf-task-attachment-list.component';
|
||||
export * from './activiti-people.component';
|
||||
export * from './activiti-task-header.component';
|
||||
export * from './no-task-detail-template.component';
|
||||
export * from './activiti-filters.component';
|
||||
export * from './activiti-task-details.component';
|
||||
export * from './activiti-start-task.component';
|
||||
export * from './activiti-people-search.component';
|
||||
export * from './adf-create-task-attachment.component';
|
||||
export * from './adf-people-list.component';
|
||||
export * from './adf-comment-list.component';
|
@@ -15,16 +15,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ActivitiTaskDetailsComponent } from './activiti-task-details.component';
|
||||
import { NoTaskDetailsTemplateDirective } from './no-task-detail-template.component';
|
||||
import { TaskDetailsComponent } from './task-details.component';
|
||||
import { NoTaskDetailsTemplateDirective } from './no-task-detail-template.directive';
|
||||
|
||||
describe('NoTaskDetailsTemplateDirective', () => {
|
||||
|
||||
let component: NoTaskDetailsTemplateDirective;
|
||||
let detailsComponent: ActivitiTaskDetailsComponent;
|
||||
let detailsComponent: TaskDetailsComponent;
|
||||
|
||||
beforeEach(() => {
|
||||
detailsComponent = new ActivitiTaskDetailsComponent(null, null, null, null, null, null);
|
||||
detailsComponent = new TaskDetailsComponent(null, null, null, null, null, null);
|
||||
component = new NoTaskDetailsTemplateDirective(detailsComponent);
|
||||
});
|
||||
|
@@ -21,7 +21,7 @@ import {
|
||||
Directive,
|
||||
TemplateRef
|
||||
} from '@angular/core';
|
||||
import { ActivitiTaskDetailsComponent } from './activiti-task-details.component';
|
||||
import { TaskDetailsComponent } from './task-details.component';
|
||||
|
||||
@Directive({
|
||||
selector: 'no-task-details-template'
|
||||
@@ -32,7 +32,7 @@ export class NoTaskDetailsTemplateDirective implements AfterContentInit {
|
||||
template: any;
|
||||
|
||||
constructor(
|
||||
private activitiTaskDetails: ActivitiTaskDetailsComponent) {
|
||||
private activitiTaskDetails: TaskDetailsComponent) {
|
||||
}
|
||||
|
||||
ngAfterContentInit() {
|
@@ -19,8 +19,9 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataRowActionEvent, DataRowEvent, DataTableModule, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { User, UserEventModel } from '../models/index';
|
||||
import { PeopleListComponent } from './adf-people-list.component';
|
||||
import { User } from '../models/user.model';
|
||||
import { UserEventModel } from '../models/user-event.model';
|
||||
import { PeopleListComponent } from './people-list.component';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -51,7 +52,9 @@ describe('PeopleListComponent', () => {
|
||||
|
||||
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||
spyOn(translateService.translate, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||
spyOn(translateService.translate, 'get').and.callFake((key) => {
|
||||
return Observable.of(key);
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(PeopleListComponent);
|
||||
peopleListComponent = fixture.componentInstance;
|
@@ -18,14 +18,15 @@
|
||||
import { AfterContentInit, AfterViewInit, Component, ContentChild, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
||||
import { DataColumnListComponent } from 'ng2-alfresco-core';
|
||||
import { DataTableComponent } from 'ng2-alfresco-datatable';
|
||||
import { User, UserEventModel } from '../models/index';
|
||||
import { UserEventModel } from '../models/user-event.model';
|
||||
import { User } from '../models/user.model';
|
||||
|
||||
declare let componentHandler: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-people-list',
|
||||
templateUrl: './adf-people-list.component.html',
|
||||
styleUrls: ['./adf-people-list.component.css']
|
||||
templateUrl: './people-list.component.html',
|
||||
styleUrls: ['./people-list.component.css']
|
||||
})
|
||||
|
||||
export class PeopleListComponent implements AfterViewInit, AfterContentInit {
|
@@ -20,8 +20,8 @@ import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { User } from '../models/user.model';
|
||||
import { ActivitiPeopleSearchComponent } from './activiti-people-search.component';
|
||||
import { PeopleListComponent } from './adf-people-list.component';
|
||||
import { PeopleSearchComponent } from './people-search.component';
|
||||
import { PeopleListComponent } from './people-list.component';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -39,10 +39,10 @@ const fakeSecondUser: User = new User({
|
||||
email: 'fake-involve@mail.com'
|
||||
});
|
||||
|
||||
describe('ActivitiPeopleSearchComponent', () => {
|
||||
describe('PeopleSearchComponent', () => {
|
||||
|
||||
let activitiPeopleSearchComponent: ActivitiPeopleSearchComponent;
|
||||
let fixture: ComponentFixture<ActivitiPeopleSearchComponent>;
|
||||
let peopleSearchComponent: PeopleSearchComponent;
|
||||
let fixture: ComponentFixture<PeopleSearchComponent>;
|
||||
let element: HTMLElement;
|
||||
let componentHandler;
|
||||
let userArray = [fakeUser, fakeSecondUser];
|
||||
@@ -55,7 +55,7 @@ describe('ActivitiPeopleSearchComponent', () => {
|
||||
DataTableModule
|
||||
],
|
||||
declarations: [
|
||||
ActivitiPeopleSearchComponent,
|
||||
PeopleSearchComponent,
|
||||
PeopleListComponent
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
@@ -64,15 +64,15 @@ describe('ActivitiPeopleSearchComponent', () => {
|
||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||
spyOn(translateService.translate, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiPeopleSearchComponent);
|
||||
activitiPeopleSearchComponent = fixture.componentInstance;
|
||||
fixture = TestBed.createComponent(PeopleSearchComponent);
|
||||
peopleSearchComponent = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
componentHandler = jasmine.createSpyObj('componentHandler', [
|
||||
'upgradeAllRegistered'
|
||||
]);
|
||||
|
||||
window['componentHandler'] = componentHandler;
|
||||
activitiPeopleSearchComponent.results = Observable.of([]);
|
||||
peopleSearchComponent.results = Observable.of([]);
|
||||
fixture.detectChanges();
|
||||
});
|
||||
}));
|
||||
@@ -92,9 +92,9 @@ describe('ActivitiPeopleSearchComponent', () => {
|
||||
});
|
||||
|
||||
it('should show user which can be involved ', (done) => {
|
||||
activitiPeopleSearchComponent.searchPeople.subscribe(() => {
|
||||
activitiPeopleSearchComponent.results = Observable.of(userArray);
|
||||
activitiPeopleSearchComponent.ngOnInit();
|
||||
peopleSearchComponent.searchPeople.subscribe(() => {
|
||||
peopleSearchComponent.results = Observable.of(userArray);
|
||||
peopleSearchComponent.ngOnInit();
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable()
|
||||
.then(() => {
|
||||
@@ -106,32 +106,32 @@ describe('ActivitiPeopleSearchComponent', () => {
|
||||
});
|
||||
searchInput = element.querySelector('#userSearchText');
|
||||
searchInput.value = 'fake-search';
|
||||
activitiPeopleSearchComponent.searchUser.markAsDirty();
|
||||
peopleSearchComponent.searchUser.markAsDirty();
|
||||
searchInput.dispatchEvent(new Event('input'));
|
||||
});
|
||||
|
||||
it('should send an event when an user is clicked', (done) => {
|
||||
activitiPeopleSearchComponent.success.subscribe((user) => {
|
||||
peopleSearchComponent.success.subscribe((user) => {
|
||||
expect(user).toBeDefined();
|
||||
expect(user.firstName).toBe('fake-name');
|
||||
done();
|
||||
});
|
||||
activitiPeopleSearchComponent.results = Observable.of(userArray);
|
||||
activitiPeopleSearchComponent.ngOnInit();
|
||||
peopleSearchComponent.results = Observable.of(userArray);
|
||||
peopleSearchComponent.ngOnInit();
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable()
|
||||
.then(() => {
|
||||
activitiPeopleSearchComponent.onRowClick(fakeUser);
|
||||
peopleSearchComponent.onRowClick(fakeUser);
|
||||
let addUserButton = <HTMLElement> element.querySelector('#add-people');
|
||||
addUserButton.click();
|
||||
});
|
||||
});
|
||||
|
||||
it('should remove clicked user', (done) => {
|
||||
activitiPeopleSearchComponent.results = Observable.of(userArray);
|
||||
activitiPeopleSearchComponent.ngOnInit();
|
||||
peopleSearchComponent.results = Observable.of(userArray);
|
||||
peopleSearchComponent.ngOnInit();
|
||||
fixture.detectChanges();
|
||||
activitiPeopleSearchComponent.onRowClick(fakeUser);
|
||||
peopleSearchComponent.onRowClick(fakeUser);
|
||||
let addUserButton = <HTMLElement> element.querySelector('#add-people');
|
||||
addUserButton.click();
|
||||
|
@@ -26,11 +26,11 @@ declare var require: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-people-search, activiti-people-search',
|
||||
templateUrl: './activiti-people-search.component.html',
|
||||
styleUrls: ['./activiti-people-search.component.css']
|
||||
templateUrl: './people-search.component.html',
|
||||
styleUrls: ['./people-search.component.css']
|
||||
})
|
||||
|
||||
export class ActivitiPeopleSearchComponent implements OnInit, AfterViewInit {
|
||||
export class PeopleSearchComponent implements OnInit, AfterViewInit {
|
||||
|
||||
@Input()
|
||||
results: Observable<User[]>;
|
@@ -20,10 +20,10 @@ import { AlfrescoTranslationService, CoreModule, LogService } from 'ng2-alfresco
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { User } from '../models/user.model';
|
||||
import { ActivitiPeopleService } from '../services/activiti-people.service';
|
||||
import { ActivitiPeopleSearchComponent } from './activiti-people-search.component';
|
||||
import { ActivitiPeopleComponent } from './activiti-people.component';
|
||||
import { PeopleListComponent } from './adf-people-list.component';
|
||||
import { PeopleService } from '../services/people.service';
|
||||
import { PeopleSearchComponent } from './people-search.component';
|
||||
import { PeopleComponent } from './people.component';
|
||||
import { PeopleListComponent } from './people-list.component';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -41,10 +41,10 @@ const fakeSecondUser: User = new User({
|
||||
email: 'fake-involve@mail.com'
|
||||
});
|
||||
|
||||
describe('ActivitiPeopleComponent', () => {
|
||||
describe('PeopleComponent', () => {
|
||||
|
||||
let activitiPeopleComponent: ActivitiPeopleComponent;
|
||||
let fixture: ComponentFixture<ActivitiPeopleComponent>;
|
||||
let activitiPeopleComponent: PeopleComponent;
|
||||
let fixture: ComponentFixture<PeopleComponent>;
|
||||
let element: HTMLElement;
|
||||
let componentHandler;
|
||||
let userArray = [fakeUser, fakeSecondUser];
|
||||
@@ -57,12 +57,12 @@ describe('ActivitiPeopleComponent', () => {
|
||||
DataTableModule
|
||||
],
|
||||
declarations: [
|
||||
ActivitiPeopleSearchComponent,
|
||||
PeopleSearchComponent,
|
||||
PeopleListComponent,
|
||||
ActivitiPeopleComponent
|
||||
PeopleComponent
|
||||
],
|
||||
providers: [
|
||||
ActivitiPeopleService
|
||||
PeopleService
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('ActivitiPeopleComponent', () => {
|
||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||
spyOn(translateService.translate, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiPeopleComponent);
|
||||
fixture = TestBed.createComponent(PeopleComponent);
|
||||
activitiPeopleComponent = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
componentHandler = jasmine.createSpyObj('componentHandler', [
|
@@ -18,18 +18,20 @@
|
||||
import { AfterViewInit, Component, Input } from '@angular/core';
|
||||
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||
import { Observable, Observer } from 'rxjs/Rx';
|
||||
import { User, UserEventModel } from '../models/index';
|
||||
import { ActivitiPeopleService } from '../services/activiti-people.service';
|
||||
import { UserEventModel } from '../models/user-event.model';
|
||||
import { User } from '../models/user.model';
|
||||
|
||||
import { PeopleService } from '../services/people.service';
|
||||
|
||||
declare let componentHandler: any;
|
||||
declare var require: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-people, activiti-people',
|
||||
templateUrl: './activiti-people.component.html',
|
||||
styleUrls: ['./activiti-people.component.css']
|
||||
templateUrl: './people.component.html',
|
||||
styleUrls: ['./people.component.css']
|
||||
})
|
||||
export class ActivitiPeopleComponent implements AfterViewInit {
|
||||
export class PeopleComponent implements AfterViewInit {
|
||||
|
||||
@Input()
|
||||
iconImageUrl: string = require('../assets/images/user.jpg');
|
||||
@@ -54,7 +56,7 @@ export class ActivitiPeopleComponent implements AfterViewInit {
|
||||
* @param people service
|
||||
*/
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private peopleService: ActivitiPeopleService,
|
||||
private peopleService: PeopleService,
|
||||
private logService: LogService) {
|
||||
if (translateService) {
|
||||
translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist');
|
@@ -19,20 +19,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MdButtonModule, MdDatepickerModule, MdGridListModule, MdIconModule, MdInputModule, MdNativeDateModule, MdSelectModule } from '@angular/material';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { StartTaskModel } from '../models/index';
|
||||
import { ActivitiPeopleService } from '../services/activiti-people.service';
|
||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||
import { StartTaskModel } from '../models/start-task.model';
|
||||
import { PeopleService } from '../services/people.service';
|
||||
import { TaskListService } from '../services/tasklist.service';
|
||||
import { startTaskMock } from './../assets/start-task.mock';
|
||||
import { ActivitiStartTaskComponent } from './activiti-start-task.component';
|
||||
import { StartTaskComponent } from './start-task.component';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
describe('ActivitiStartTaskComponent', () => {
|
||||
describe('StartTaskComponent', () => {
|
||||
|
||||
let activitiStartTaskComponent: ActivitiStartTaskComponent;
|
||||
let fixture: ComponentFixture<ActivitiStartTaskComponent>;
|
||||
let service: ActivitiTaskListService;
|
||||
let peopleService: ActivitiPeopleService;
|
||||
let activitiStartTaskComponent: StartTaskComponent;
|
||||
let fixture: ComponentFixture<StartTaskComponent>;
|
||||
let service: TaskListService;
|
||||
let peopleService: PeopleService;
|
||||
let element: HTMLElement;
|
||||
let getformlistSpy: jasmine.Spy;
|
||||
let getWorkflowUsersSpy: jasmine.Spy;
|
||||
@@ -60,18 +60,18 @@ describe('ActivitiStartTaskComponent', () => {
|
||||
MdSelectModule
|
||||
],
|
||||
declarations: [
|
||||
ActivitiStartTaskComponent
|
||||
StartTaskComponent
|
||||
],
|
||||
providers: [
|
||||
ActivitiTaskListService,
|
||||
ActivitiPeopleService
|
||||
TaskListService,
|
||||
PeopleService
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||
spyOn(translateService.translate, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiStartTaskComponent);
|
||||
fixture = TestBed.createComponent(StartTaskComponent);
|
||||
activitiStartTaskComponent = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
fixture.detectChanges();
|
||||
@@ -79,8 +79,8 @@ describe('ActivitiStartTaskComponent', () => {
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
service = fixture.debugElement.injector.get(ActivitiTaskListService);
|
||||
peopleService = fixture.debugElement.injector.get(ActivitiPeopleService);
|
||||
service = fixture.debugElement.injector.get(TaskListService);
|
||||
peopleService = fixture.debugElement.injector.get(PeopleService);
|
||||
getformlistSpy = spyOn(service, 'getFormList').and.returnValue(Observable.of(fakeForms));
|
||||
getWorkflowUsersSpy = spyOn(peopleService, 'getWorkflowUsers').and.returnValue(Observable.of([
|
||||
{
|
||||
@@ -101,8 +101,8 @@ describe('ActivitiStartTaskComponent', () => {
|
||||
]));
|
||||
});
|
||||
|
||||
it('should create instance of ActivitiStartTaskComponent', () => {
|
||||
expect(fixture.componentInstance instanceof ActivitiStartTaskComponent).toBe(true, 'should create ActivitiStartTaskComponent');
|
||||
it('should create instance of StartTaskComponent', () => {
|
||||
expect(fixture.componentInstance instanceof StartTaskComponent).toBe(true, 'should create StartTaskComponent');
|
||||
});
|
||||
|
||||
it('should fetch fakeform on ngonint', () => {
|
@@ -18,17 +18,18 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||
import { Form } from '../models/form.model';
|
||||
import { StartTaskModel, User } from '../models/index';
|
||||
import { StartTaskModel } from '../models/start-task.model';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { ActivitiPeopleService } from '../services/activiti-people.service';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { User } from '../models/user.model';
|
||||
import { PeopleService } from '../services/people.service';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-start-task, activiti-start-task',
|
||||
templateUrl: './activiti-start-task.component.html',
|
||||
styleUrls: ['./activiti-start-task.component.css']
|
||||
templateUrl: './start-task.component.html',
|
||||
styleUrls: ['./start-task.component.css']
|
||||
})
|
||||
export class ActivitiStartTaskComponent implements OnInit {
|
||||
export class StartTaskComponent implements OnInit {
|
||||
|
||||
@Input()
|
||||
appId: string;
|
||||
@@ -55,8 +56,8 @@ export class ActivitiStartTaskComponent implements OnInit {
|
||||
* @param taskService
|
||||
*/
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private taskService: ActivitiTaskListService,
|
||||
private peopleService: ActivitiPeopleService,
|
||||
private taskService: TaskListService,
|
||||
private peopleService: PeopleService,
|
||||
private logService: LogService) {
|
||||
|
||||
if (translateService) {
|
@@ -24,7 +24,7 @@ import { ActivitiContentService } from 'ng2-activiti-form';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { TaskAttachmentListComponent } from './adf-task-attachment-list.component';
|
||||
import { TaskAttachmentListComponent } from './task-attachment-list.component';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
@@ -21,8 +21,8 @@ import { AlfrescoTranslationService, ContentService, ThumbnailService } from 'ng
|
||||
|
||||
@Component({
|
||||
selector: 'adf-task-attachment-list',
|
||||
styleUrls: ['./adf-task-attachment-list.component.css'],
|
||||
templateUrl: './adf-task-attachment-list.component.html'
|
||||
styleUrls: ['./task-attachment-list.component.css'],
|
||||
templateUrl: './task-attachment-list.component.html'
|
||||
})
|
||||
export class TaskAttachmentListComponent implements OnChanges {
|
||||
|
@@ -25,17 +25,17 @@ import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { noDataMock, taskDetailsMock, taskFormMock, tasksMock } from './../assets/task-details.mock';
|
||||
import { ActivitiPeopleService } from './../services/activiti-people.service';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { ActivitiTaskDetailsComponent } from './activiti-task-details.component';
|
||||
import { PeopleService } from './../services/people.service';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
import { TaskDetailsComponent } from './task-details.component';
|
||||
|
||||
describe('ActivitiTaskDetailsComponent', () => {
|
||||
describe('TaskDetailsComponent', () => {
|
||||
|
||||
let componentHandler: any;
|
||||
let service: ActivitiTaskListService;
|
||||
let service: TaskListService;
|
||||
let formService: FormService;
|
||||
let component: ActivitiTaskDetailsComponent;
|
||||
let fixture: ComponentFixture<ActivitiTaskDetailsComponent>;
|
||||
let component: TaskDetailsComponent;
|
||||
let fixture: ComponentFixture<TaskDetailsComponent>;
|
||||
let getTaskDetailsSpy: jasmine.Spy;
|
||||
let getFormSpy: jasmine.Spy;
|
||||
let getTasksSpy: jasmine.Spy;
|
||||
@@ -48,11 +48,11 @@ describe('ActivitiTaskDetailsComponent', () => {
|
||||
ActivitiFormModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
ActivitiTaskDetailsComponent
|
||||
TaskDetailsComponent
|
||||
],
|
||||
providers: [
|
||||
ActivitiTaskListService,
|
||||
ActivitiPeopleService
|
||||
TaskListService,
|
||||
PeopleService
|
||||
],
|
||||
schemas: [ NO_ERRORS_SCHEMA ]
|
||||
}).compileComponents();
|
||||
@@ -64,9 +64,9 @@ describe('ActivitiTaskDetailsComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiTaskDetailsComponent);
|
||||
fixture = TestBed.createComponent(TaskDetailsComponent);
|
||||
component = fixture.componentInstance;
|
||||
service = fixture.debugElement.injector.get(ActivitiTaskListService);
|
||||
service = fixture.debugElement.injector.get(TaskListService);
|
||||
formService = fixture.debugElement.injector.get(FormService);
|
||||
|
||||
getTaskDetailsSpy = spyOn(service, 'getTaskDetails').and.returnValue(Observable.of(taskDetailsMock));
|
@@ -31,20 +31,20 @@ import { AlfrescoAuthenticationService, AlfrescoTranslationService, CardViewUpda
|
||||
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { User } from '../models/user.model';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
declare var require: any;
|
||||
declare let dialogPolyfill: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-task-details, activiti-task-details',
|
||||
templateUrl: './activiti-task-details.component.html',
|
||||
styleUrls: ['./activiti-task-details.component.css'],
|
||||
templateUrl: './task-details.component.html',
|
||||
styleUrls: ['./task-details.component.css'],
|
||||
providers: [
|
||||
CardViewUpdateService
|
||||
]
|
||||
})
|
||||
export class ActivitiTaskDetailsComponent implements OnInit, OnChanges {
|
||||
export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
|
||||
@ViewChild('activiticomments')
|
||||
activiticomments: any;
|
||||
@@ -144,7 +144,7 @@ export class ActivitiTaskDetailsComponent implements OnInit, OnChanges {
|
||||
*/
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activitiForm: FormService,
|
||||
private activitiTaskList: ActivitiTaskListService,
|
||||
private activitiTaskList: TaskListService,
|
||||
private logService: LogService,
|
||||
private authService: AlfrescoAuthenticationService,
|
||||
private cardViewUpdateService: CardViewUpdateService
|
@@ -20,13 +20,13 @@ import { async } from '@angular/core/testing';
|
||||
import { LogServiceMock } from 'ng2-alfresco-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { FilterParamsModel, FilterRepresentationModel } from '../models/filter.model';
|
||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||
import { ActivitiFiltersComponent } from './activiti-filters.component';
|
||||
import { TaskListService } from '../services/tasklist.service';
|
||||
import { TaskFiltersComponent } from './task-filters.component';
|
||||
|
||||
describe('ActivitiFiltersComponent', () => {
|
||||
describe('TaskFiltersComponent', () => {
|
||||
|
||||
let filterList: ActivitiFiltersComponent;
|
||||
let activitiService: ActivitiTaskListService;
|
||||
let filterList: TaskFiltersComponent;
|
||||
let activitiService: TaskListService;
|
||||
let logService: LogServiceMock;
|
||||
|
||||
let fakeGlobalFilter = [];
|
||||
@@ -65,8 +65,8 @@ describe('ActivitiFiltersComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
logService = new LogServiceMock();
|
||||
activitiService = new ActivitiTaskListService(null, logService);
|
||||
filterList = new ActivitiFiltersComponent(null, activitiService, logService);
|
||||
activitiService = new TaskListService(null, logService);
|
||||
filterList = new TaskFiltersComponent(null, activitiService, logService);
|
||||
});
|
||||
|
||||
it('should return the filter task list', (done) => {
|
@@ -19,17 +19,17 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChange
|
||||
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||
import { Observable, Observer } from 'rxjs/Rx';
|
||||
import { FilterParamsModel, FilterRepresentationModel } from '../models/filter.model';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
declare let componentHandler: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-filters, activiti-filters',
|
||||
templateUrl: './activiti-filters.component.html',
|
||||
styleUrls: ['activiti-filters.component.css'],
|
||||
providers: [ActivitiTaskListService]
|
||||
templateUrl: './task-filters.component.html',
|
||||
styleUrls: ['task-filters.component.css'],
|
||||
providers: [TaskListService]
|
||||
})
|
||||
export class ActivitiFiltersComponent implements OnInit, OnChanges {
|
||||
export class TaskFiltersComponent implements OnInit, OnChanges {
|
||||
|
||||
@Input()
|
||||
filterParam: FilterParamsModel;
|
||||
@@ -60,7 +60,7 @@ export class ActivitiFiltersComponent implements OnInit, OnChanges {
|
||||
filters: FilterRepresentationModel [] = [];
|
||||
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activiti: ActivitiTaskListService,
|
||||
private activiti: TaskListService,
|
||||
private logService: LogService) {
|
||||
this.filter$ = new Observable<FilterRepresentationModel>(observer => this.filterObserver = observer).share();
|
||||
|
@@ -23,15 +23,15 @@ import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { taskDetailsMock } from './../assets/task-details.mock';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { ActivitiTaskHeaderComponent } from './activiti-task-header.component';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
import { TaskHeaderComponent } from './task-header.component';
|
||||
|
||||
describe('ActivitiTaskHeaderComponent', () => {
|
||||
describe('TaskHeaderComponent', () => {
|
||||
|
||||
let service: ActivitiTaskListService;
|
||||
let service: TaskListService;
|
||||
let componentHandler: any;
|
||||
let component: ActivitiTaskHeaderComponent;
|
||||
let fixture: ComponentFixture<ActivitiTaskHeaderComponent>;
|
||||
let component: TaskHeaderComponent;
|
||||
let fixture: ComponentFixture<TaskHeaderComponent>;
|
||||
let debugElement: DebugElement;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -40,10 +40,10 @@ describe('ActivitiTaskHeaderComponent', () => {
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
ActivitiTaskHeaderComponent
|
||||
TaskHeaderComponent
|
||||
],
|
||||
providers: [
|
||||
ActivitiTaskListService,
|
||||
TaskListService,
|
||||
CardViewUpdateService
|
||||
]
|
||||
}).compileComponents();
|
||||
@@ -54,9 +54,9 @@ describe('ActivitiTaskHeaderComponent', () => {
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ActivitiTaskHeaderComponent);
|
||||
fixture = TestBed.createComponent(TaskHeaderComponent);
|
||||
component = fixture.componentInstance;
|
||||
service = TestBed.get(ActivitiTaskListService);
|
||||
service = TestBed.get(TaskListService);
|
||||
debugElement = fixture.debugElement;
|
||||
|
||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
@@ -17,15 +17,15 @@
|
||||
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
|
||||
import { AlfrescoTranslationService, CardViewDateItemModel, CardViewItem, CardViewTextItemModel, LogService } from 'ng2-alfresco-core';
|
||||
import { TaskDetailsModel } from '../models/index';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-task-header, activiti-task-header',
|
||||
templateUrl: './activiti-task-header.component.html',
|
||||
styleUrls: ['./activiti-task-header.component.scss']
|
||||
templateUrl: './task-header.component.html',
|
||||
styleUrls: ['./task-header.component.scss']
|
||||
})
|
||||
export class ActivitiTaskHeaderComponent implements OnChanges {
|
||||
export class TaskHeaderComponent implements OnChanges {
|
||||
|
||||
@Input()
|
||||
formName: string = null;
|
||||
@@ -40,7 +40,7 @@ export class ActivitiTaskHeaderComponent implements OnChanges {
|
||||
inEdit: boolean = false;
|
||||
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activitiTaskService: ActivitiTaskListService,
|
||||
private activitiTaskService: TaskListService,
|
||||
private logService: LogService) {
|
||||
if (translateService) {
|
||||
translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist');
|
@@ -22,10 +22,10 @@ import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { DataRowEvent, ObjectDataRow, ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||
import { ActivitiTaskListComponent } from './activiti-tasklist.component';
|
||||
import { TaskListService } from '../services/tasklist.service';
|
||||
import { TaskListComponent } from './tasklist.component';
|
||||
|
||||
describe('ActivitiTaskListComponent', () => {
|
||||
describe('TaskListComponent', () => {
|
||||
|
||||
let fakeGlobalTask = [
|
||||
{
|
||||
@@ -80,9 +80,9 @@ describe('ActivitiTaskListComponent', () => {
|
||||
};
|
||||
|
||||
let componentHandler: any;
|
||||
let component: ActivitiTaskListComponent;
|
||||
let fixture: ComponentFixture<ActivitiTaskListComponent>;
|
||||
let taskListService: ActivitiTaskListService;
|
||||
let component: TaskListComponent;
|
||||
let fixture: ComponentFixture<TaskListComponent>;
|
||||
let taskListService: TaskListService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -92,10 +92,10 @@ describe('ActivitiTaskListComponent', () => {
|
||||
MdProgressSpinnerModule
|
||||
],
|
||||
declarations: [
|
||||
ActivitiTaskListComponent
|
||||
TaskListComponent
|
||||
],
|
||||
providers: [
|
||||
ActivitiTaskListService
|
||||
TaskListService
|
||||
]
|
||||
}).compileComponents();
|
||||
|
||||
@@ -106,10 +106,10 @@ describe('ActivitiTaskListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiTaskListComponent);
|
||||
fixture = TestBed.createComponent(TaskListComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
||||
taskListService = TestBed.get(ActivitiTaskListService);
|
||||
taskListService = TestBed.get(TaskListService);
|
||||
|
||||
componentHandler = jasmine.createSpyObj('componentHandler', [
|
||||
'upgradeAllRegistered',
|
@@ -34,14 +34,14 @@ import {
|
||||
ObjectDataTableAdapter
|
||||
} from 'ng2-alfresco-datatable';
|
||||
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-tasklist, activiti-tasklist',
|
||||
templateUrl: './activiti-tasklist.component.html',
|
||||
styleUrls: ['./activiti-tasklist.component.css']
|
||||
templateUrl: './tasklist.component.html',
|
||||
styleUrls: ['./tasklist.component.css']
|
||||
})
|
||||
export class ActivitiTaskListComponent implements OnChanges, AfterContentInit {
|
||||
export class TaskListComponent implements OnChanges, AfterContentInit {
|
||||
|
||||
requestNode: TaskQueryRequestRepresentationModel;
|
||||
|
||||
@@ -90,7 +90,7 @@ export class ActivitiTaskListComponent implements OnChanges, AfterContentInit {
|
||||
* This allows generating and displaying custom data sets (i.e. filtered out content).
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberOf ActivitiTaskListComponent
|
||||
* @memberOf TaskListComponent
|
||||
*/
|
||||
hasCustomDataSource: boolean = false;
|
||||
|
||||
@@ -100,7 +100,7 @@ export class ActivitiTaskListComponent implements OnChanges, AfterContentInit {
|
||||
];
|
||||
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private taskListService: ActivitiTaskListService,
|
||||
private taskListService: TaskListService,
|
||||
private logService: LogService) {
|
||||
if (translateService) {
|
||||
translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist');
|
@@ -1,25 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './comment.model';
|
||||
export * from './filter.model';
|
||||
export * from './icon.model';
|
||||
export * from './user.model';
|
||||
export * from './task-details.model';
|
||||
export * from './task-details.event';
|
||||
export * from './user-event.model';
|
||||
export * from './start-task.model';
|
@@ -18,7 +18,7 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { User } from '../models/user.model';
|
||||
import { ActivitiPeopleService } from './activiti-people.service';
|
||||
import { PeopleService } from './people.service';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -38,9 +38,9 @@ const secondInvolvedUser: User = new User({
|
||||
|
||||
const fakeInvolveUserList: User[] = [firstInvolvedUser, secondInvolvedUser];
|
||||
|
||||
describe('ActivitiPeopleService', () => {
|
||||
describe('PeopleService', () => {
|
||||
|
||||
let service: ActivitiPeopleService;
|
||||
let service: PeopleService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -48,10 +48,10 @@ describe('ActivitiPeopleService', () => {
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
providers: [
|
||||
ActivitiPeopleService
|
||||
PeopleService
|
||||
]
|
||||
});
|
||||
service = TestBed.get(ActivitiPeopleService);
|
||||
service = TestBed.get(PeopleService);
|
||||
});
|
||||
|
||||
describe('when user is logged in', () => {
|
@@ -22,7 +22,7 @@ import { Observable } from 'rxjs/Rx';
|
||||
import { User } from '../models/user.model';
|
||||
|
||||
@Injectable()
|
||||
export class ActivitiPeopleService {
|
||||
export class PeopleService {
|
||||
|
||||
constructor(private alfrescoJsApi: AlfrescoApiService,
|
||||
private logService: LogService) {
|
@@ -39,13 +39,13 @@ import {
|
||||
import { Comment } from '../models/comment.model';
|
||||
import { FilterRepresentationModel, TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { ActivitiTaskListService } from './activiti-tasklist.service';
|
||||
import { TaskListService } from './tasklist.service';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
describe('Activiti TaskList Service', () => {
|
||||
|
||||
let service: ActivitiTaskListService;
|
||||
let service: TaskListService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -53,13 +53,13 @@ describe('Activiti TaskList Service', () => {
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
providers: [
|
||||
ActivitiTaskListService
|
||||
TaskListService
|
||||
]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
service = TestBed.get(ActivitiTaskListService);
|
||||
service = TestBed.get(TaskListService);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
@@ -28,7 +28,7 @@ import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { User } from '../models/user.model';
|
||||
|
||||
@Injectable()
|
||||
export class ActivitiTaskListService {
|
||||
export class TaskListService {
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
Reference in New Issue
Block a user