clean all the events that start wit on prefix (#2536)

This commit is contained in:
Eugenio Romano
2017-10-25 09:35:38 +01:00
committed by Maurizio Vitale
parent b2414781d4
commit ded3847762
169 changed files with 705 additions and 749 deletions

View File

@@ -67,7 +67,7 @@
"@types/hammerjs": "2.0.35",
"@types/jasmine": "2.5.35",
"@types/node": "6.0.45",
"adf-tslint-rules": "0.0.3",
"adf-tslint-rules": "0.0.4",
"angular2-template-loader": "0.6.2",
"autoprefixer": "6.5.4",
"codelyzer": "3.1.2",

View File

@@ -33,7 +33,7 @@
<mat-datepicker-toggle matSuffix [for]="taskDatePicker"></mat-datepicker-toggle>
</mat-form-field>
<mat-datepicker #taskDatePicker [touchUi]="true"
(onDateChanged)="onDateChanged($event)"></mat-datepicker>
(dateChanged)="onDateChanged($event)"></mat-datepicker>
<div class="adf-error-text-container">
<div *ngIf="dateError">
<div class="adf-error-text">{{'START_TASK.FORM.DATE.ERROR'|translate}}</div>

View File

@@ -40,7 +40,7 @@
(formCompleted)='onFormCompleted($event)'
(formContentClicked)='onFormContentClick($event)'
(formLoaded)='onFormLoaded($event)'
(onError)='onFormError($event)'
(error)='onFormError($event)'
(executeOutcome)='onFormExecuteOutcome($event)'>
<div empty-form><h3 class="adf-task-title">Please select a Task</h3></div>
</adf-form>

View File

@@ -221,7 +221,7 @@ describe('TaskDetailsComponent', () => {
});
it('should emit an error event if an error occurs fetching the next task', () => {
let emitSpy: jasmine.Spy = spyOn(component.onError, 'emit');
let emitSpy: jasmine.Spy = spyOn(component.error, 'emit');
getTasksSpy.and.returnValue(Observable.throw({}));
component.onComplete();
expect(emitSpy).toHaveBeenCalled();
@@ -256,7 +256,7 @@ describe('TaskDetailsComponent', () => {
});
it('should emit an error event when form error occurs', () => {
let emitSpy: jasmine.Spy = spyOn(component.onError, 'emit');
let emitSpy: jasmine.Spy = spyOn(component.error, 'emit');
component.onFormError({});
expect(emitSpy).toHaveBeenCalled();
});

View File

@@ -120,7 +120,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
taskDeleted: EventEmitter<string> = new EventEmitter<string>();
@Output()
onError: EventEmitter<any> = new EventEmitter<any>();
error: EventEmitter<any> = new EventEmitter<any>();
@Output()
executeOutcome: EventEmitter<FormOutcomeEvent> = new EventEmitter<FormOutcomeEvent>();
@@ -269,7 +269,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
this.reset();
}
}, (error) => {
this.onError.emit(error);
this.error.emit(error);
});
}
@@ -312,7 +312,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
onFormError(error: any): void {
this.errorDialogRef = this.dialog.open(this.errorDialog, {width: '500px'});
this.onError.emit(error);
this.error.emit(error);
}
onFormExecuteOutcome(event: FormOutcomeEvent): void {

View File

@@ -95,7 +95,7 @@ describe('TaskFiltersComponent', () => {
let change = new SimpleChange(null, appId, true);
component.ngOnChanges({ 'appId': change });
component.onError.subscribe((err) => {
component.error.subscribe((err) => {
expect(err).toBeDefined();
done();
});
@@ -108,7 +108,7 @@ describe('TaskFiltersComponent', () => {
let change = new SimpleChange(null, appId, true);
component.ngOnChanges({ 'appId': change });
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.filters).toBeDefined();
expect(component.filters.length).toEqual(3);
@@ -133,7 +133,7 @@ describe('TaskFiltersComponent', () => {
let change = new SimpleChange(null, 'test', true);
component.ngOnChanges({ 'appName': change });
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
let deployApp: any = appsProcessService.getDeployedApplicationsByName;
expect(deployApp.calls.count()).toEqual(1);
expect(res).toBeDefined();
@@ -152,7 +152,7 @@ describe('TaskFiltersComponent', () => {
fixture.detectChanges();
component.ngOnChanges({ 'appId': change });
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.currentFilter).toBeDefined();
expect(component.currentFilter.name).toEqual('FakeInvolvedTasks');
@@ -171,7 +171,7 @@ describe('TaskFiltersComponent', () => {
fixture.detectChanges();
component.ngOnChanges({ 'appId': change });
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.currentFilter).toBeDefined();
expect(component.currentFilter.name).toEqual('FakeMyTasks1');
@@ -191,7 +191,7 @@ describe('TaskFiltersComponent', () => {
fixture.detectChanges();
component.ngOnChanges({ 'appId': change });
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.currentFilter).toBeDefined();
expect(component.currentFilter.name).toEqual('FakeInvolvedTasks');
@@ -211,7 +211,7 @@ describe('TaskFiltersComponent', () => {
fixture.detectChanges();
component.ngOnChanges({ 'appId': change });
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.currentFilter).toBeDefined();
expect(component.currentFilter.name).toEqual('FakeMyTasks2');
@@ -231,7 +231,7 @@ describe('TaskFiltersComponent', () => {
fixture.detectChanges();
component.ngOnChanges({ 'appId': change });
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.currentFilter).toBeDefined();
expect(component.currentFilter.name).toEqual('FakeInvolvedTasks');

View File

@@ -35,10 +35,10 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
filterClick: EventEmitter<FilterRepresentationModel> = new EventEmitter<FilterRepresentationModel>();
@Output()
onSuccess: EventEmitter<any> = new EventEmitter<any>();
success: EventEmitter<any> = new EventEmitter<any>();
@Output()
onError: EventEmitter<any> = new EventEmitter<any>();
error: EventEmitter<any> = new EventEmitter<any>();
@Input()
appId: number;
@@ -110,10 +110,10 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
});
this.selectTaskFilter(this.filterParam, this.filters);
this.onSuccess.emit(resDefault);
this.success.emit(resDefault);
},
(errDefault: any) => {
this.onError.emit(errDefault);
this.error.emit(errDefault);
}
);
} else {
@@ -123,11 +123,11 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
});
this.selectTaskFilter(this.filterParam, this.filters);
this.onSuccess.emit(res);
this.success.emit(res);
}
},
(err: any) => {
this.onError.emit(err);
this.error.emit(err);
}
);
}
@@ -143,7 +143,7 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
this.selectTaskFilter(this.filterParam, this.filters);
},
(err) => {
this.onError.emit(err);
this.error.emit(err);
});
}
@@ -163,7 +163,7 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
filteredFilterList.push(filter);
},
(err) => {
this.onError.emit(err);
this.error.emit(err);
},
() => {
if (filteredFilterList.length > 0) {

View File

@@ -155,7 +155,7 @@ describe('TaskListComponent', () => {
let processDefinitionKey = new SimpleChange(null, null, true);
let assignment = new SimpleChange(null, 'fake-assignee', true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -199,7 +199,7 @@ describe('TaskListComponent', () => {
let processDefinitionKey = new SimpleChange(null, 'fakeprocess', true);
let assignment = new SimpleChange(null, 'fake-assignee', true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -224,7 +224,7 @@ describe('TaskListComponent', () => {
let processInstanceId = new SimpleChange(null, 'fakeprocessId', true);
let assignment = new SimpleChange(null, 'fake-assignee', true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -249,7 +249,7 @@ describe('TaskListComponent', () => {
let state = new SimpleChange(null, 'all', true);
let processInstanceId = new SimpleChange(null, 'fakeprocessId', true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -282,7 +282,7 @@ describe('TaskListComponent', () => {
let state = new SimpleChange(null, 'open', true);
let assignment = new SimpleChange(null, 'fake-assignee', true);
component.onError.subscribe((err) => {
component.error.subscribe((err) => {
expect(err).toBeDefined();
expect(err.error).toBe('wrong request');
done();
@@ -303,7 +303,7 @@ describe('TaskListComponent', () => {
component.state = 'open';
component.assignment = 'fake-assignee';
component.ngAfterContentInit();
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -386,7 +386,7 @@ describe('TaskListComponent', () => {
const landingTaskId = '888';
let change = new SimpleChange(null, landingTaskId, true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.data.getRows().length).toEqual(2);
@@ -412,7 +412,7 @@ describe('TaskListComponent', () => {
const appId = '1';
let change = new SimpleChange(null, appId, true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -433,7 +433,7 @@ describe('TaskListComponent', () => {
const processDefinitionKey = 'fakeprocess';
let change = new SimpleChange(null, processDefinitionKey, true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -455,7 +455,7 @@ describe('TaskListComponent', () => {
const state = 'open';
let change = new SimpleChange(null, state, true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -477,7 +477,7 @@ describe('TaskListComponent', () => {
const sort = 'desc';
let change = new SimpleChange(null, sort, true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -499,7 +499,7 @@ describe('TaskListComponent', () => {
const name = 'FakeTaskName';
let change = new SimpleChange(null, name, true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();
@@ -521,7 +521,7 @@ describe('TaskListComponent', () => {
const assignment = 'assignee';
let change = new SimpleChange(null, assignment, true);
component.onSuccess.subscribe((res) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(component.data).toBeDefined();
expect(component.isListEmpty()).not.toBeTruthy();

View File

@@ -75,10 +75,10 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
rowsSelected: EventEmitter<any[]> = new EventEmitter<any[]>();
@Output()
onSuccess: EventEmitter<any> = new EventEmitter<any>();
success: EventEmitter<any> = new EventEmitter<any>();
@Output()
onError: EventEmitter<any> = new EventEmitter<any>();
error: EventEmitter<any> = new EventEmitter<any>();
currentInstanceId: string;
selectedInstances: any[];
@@ -118,10 +118,10 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
let instancesRow = this.createDataRow(tasks.data);
this.renderInstances(instancesRow);
this.selectTask(this.landingTaskId);
this.onSuccess.emit(tasks);
this.success.emit(tasks);
this.isLoading = false;
}, (error) => {
this.onError.emit(error);
this.error.emit(error);
this.isLoading = false;
});
}

View File

@@ -152,6 +152,7 @@
"templates-use-public": true,
"invoke-injectable": true,
"adf-file-name": true,
"adf-class-name": true
}
"adf-class-name": true,
"adf-prefix-name": true
}
}