[ADF-3591] spellcheck support for code (#3827)

* setup spellcheck
This commit is contained in:
Denys Vuika
2018-10-23 15:05:38 +01:00
committed by Eugenio Romano
parent 53d96679ea
commit e39a2b149b
262 changed files with 1561 additions and 1005 deletions

View File

@@ -28,7 +28,7 @@
<mat-card>
<mat-card-content>
<adf-process-instance-comments #activiticomments
<adf-process-instance-comments #activitiComments
[readOnly]="false"
[processInstanceId]="processInstanceDetails.id">
</adf-process-instance-comments>

View File

@@ -79,7 +79,7 @@
</adf-start-form>
</div>
<div mat-dialog-actions class="adf-start-process-dialog-actions">
<button mat-button type="button" (click)="closeSartDialog()">{{ 'ADF_PROCESS_LIST.DETAILS.TASKS.TASK_CLOSE' | translate }}</button>
<button mat-button type="button" (click)="closeStartDialog()">{{ 'ADF_PROCESS_LIST.DETAILS.TASKS.TASK_CLOSE' | translate }}</button>
</div>
</div>
</ng-template>

View File

@@ -61,8 +61,8 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges {
@ViewChild('startDialog')
startDialog: any;
@ViewChild('taskdetails')
taskdetails: any;
@ViewChild('taskDetails')
taskDetails: any;
/** Emitted when a task is clicked. */
@Output()
@@ -170,7 +170,7 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges {
this.dialog.open(this.startDialog, { height: '500px', width: '700px' });
}
closeSartDialog() {
closeStartDialog() {
this.dialog.closeAll();
}
@@ -179,6 +179,6 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges {
}
onFormContentClick() {
this.closeSartDialog();
this.closeStartDialog();
}
}

View File

@@ -28,7 +28,7 @@ import { DataRowEvent, ObjectDataRow, ObjectDataTableAdapter } from '@alfresco/a
import { fakeProcessInstance, fakeProcessInstancesWithNoName } from '../../mock';
import { ProcessService } from '../services/process.service';
import { ProcessTestingModule } from '../../testing/process.testing.module';
import { fakeProcessCutomSchema } from '../../mock';
import { fakeProcessCustomSchema } from '../../mock';
describe('ProcessInstanceListComponent', () => {
@@ -53,7 +53,7 @@ describe('ProcessInstanceListComponent', () => {
getProcessInstancesSpy = spyOn(service, 'getProcessInstances').and.returnValue(of(fakeProcessInstance));
appConfig.config['adf-process-list'] = {
'presets': {
'fakeProcessCutomSchema': [
'fakeProcessCustomSchema': [
{
'key': 'fakeName',
'type': 'text',
@@ -91,14 +91,14 @@ describe('ProcessInstanceListComponent', () => {
});
it('should fetch the custom schemaColumn from app.config.json', () => {
component.presetColumn = 'fakeProcessCutomSchema';
component.presetColumn = 'fakeProcessCustomSchema';
component.ngAfterContentInit();
fixture.detectChanges();
expect(component.columns).toEqual(fakeProcessCutomSchema);
expect(component.columns).toEqual(fakeProcessCustomSchema);
});
it('should fetch custom schemaColumn when the input presetColumn is defined', () => {
component.presetColumn = 'fakeProcessCutomSchema';
component.presetColumn = 'fakeProcessCustomSchema';
component.ngAfterContentInit();
fixture.detectChanges();
expect(component.columns).toBeDefined();

View File

@@ -25,7 +25,7 @@ import { ProcessService } from '../services/process.service';
import {
newProcess,
taskFormMock,
testProcessDefRepr,
testProcessDef,
testMultipleProcessDefs,
testProcessDefWithForm,
testProcessDefinitions
@@ -89,7 +89,7 @@ describe('StartFormComponent', () => {
it('should enable start button when name and process filled out', async(() => {
spyOn(component, 'loadStartProcess').and.callThrough();
component.processNameInput.setValue('My Process');
component.processDefinitionInput.setValue(testProcessDefRepr.name);
component.processDefinitionInput.setValue(testProcessDef.name);
fixture.detectChanges();
@@ -102,7 +102,7 @@ describe('StartFormComponent', () => {
it('should have start button disabled when name not filled out', async(() => {
spyOn(component, 'loadStartProcess').and.callThrough();
component.processNameInput.setValue('');
component.processDefinitionInput.setValue(testProcessDefRepr.name);
component.processDefinitionInput.setValue(testProcessDef.name);
fixture.detectChanges();
fixture.whenStable().then(() => {
let startBtn = fixture.nativeElement.querySelector('#button-start');
@@ -257,9 +257,9 @@ describe('StartFormComponent', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
let noprocessElement = fixture.nativeElement.querySelector('#no-process-message');
expect(noprocessElement).not.toBeNull('Expected no available process message to be present');
expect(noprocessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS');
const noProcessElement = fixture.nativeElement.querySelector('#no-process-message');
expect(noProcessElement).not.toBeNull('Expected no available process message to be present');
expect(noProcessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS');
});
}));
@@ -298,7 +298,7 @@ describe('StartFormComponent', () => {
it('should hide the process dropdown button if showSelectProcessDropdown is false', async(() => {
fixture.detectChanges();
getDefinitionsSpy = getDefinitionsSpy.and.returnValue(of([testProcessDefRepr]));
getDefinitionsSpy = getDefinitionsSpy.and.returnValue(of([testProcessDef]));
component.appId = 123;
component.showSelectProcessDropdown = false;
component.ngOnChanges({});
@@ -379,7 +379,7 @@ describe('StartFormComponent', () => {
});
it('should call service to start process if required fields provided', async(() => {
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
component.startProcess();
fixture.whenStable().then(() => {
expect(startProcessSpy).toHaveBeenCalled();
@@ -395,7 +395,7 @@ describe('StartFormComponent', () => {
}));
it('should call service to start process with the correct parameters', async(() => {
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
component.startProcess();
fixture.whenStable().then(() => {
expect(startProcessSpy).toHaveBeenCalledWith('my:process1', 'My new process', undefined, undefined, undefined);
@@ -412,7 +412,7 @@ describe('StartFormComponent', () => {
inputProcessVariable.push(variable);
component.variables = inputProcessVariable;
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
component.startProcess();
fixture.whenStable().then(() => {
expect(startProcessSpy).toHaveBeenCalledWith('my:process1', 'My new process', undefined, undefined, inputProcessVariable);
@@ -421,7 +421,7 @@ describe('StartFormComponent', () => {
it('should output start event when process started successfully', async(() => {
let emitSpy = spyOn(component.start, 'emit');
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
component.startProcess();
fixture.whenStable().then(() => {
expect(emitSpy).toHaveBeenCalledWith(newProcess);
@@ -432,7 +432,7 @@ describe('StartFormComponent', () => {
let errorSpy = spyOn(component.error, 'error');
let error = { message: 'My error' };
startProcessSpy = startProcessSpy.and.returnValue(throwError(error));
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
component.startProcess();
fixture.whenStable().then(() => {
expect(errorSpy).toHaveBeenCalledWith(error);
@@ -442,7 +442,7 @@ describe('StartFormComponent', () => {
it('should indicate an error to the user if process cannot be started', async(() => {
fixture.detectChanges();
startProcessSpy = startProcessSpy.and.returnValue(throwError({}));
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
component.startProcess();
fixture.detectChanges();
fixture.whenStable().then(() => {
@@ -458,7 +458,7 @@ describe('StartFormComponent', () => {
done();
});
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
component.name = 'my:Process';
component.startProcess();
fixture.detectChanges();
@@ -491,7 +491,7 @@ describe('StartFormComponent', () => {
it('should able to start the process when the required fields are filled up', (done) => {
component.name = 'my:process1';
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
let disposableStart = component.start.subscribe(() => {
disposableStart.unsubscribe();
@@ -502,7 +502,7 @@ describe('StartFormComponent', () => {
});
it('should return true if startFrom defined', async(() => {
component.selectedProcessDef = testProcessDefRepr;
component.selectedProcessDef = testProcessDef;
component.name = 'my:process1';
component.selectedProcessDef.hasStartForm = true;
component.hasStartForm();

View File

@@ -83,6 +83,7 @@ describe('ProcessService', () => {
expect(instances.data.length).toBe(1);
let instance = instances.data[0];
expect(instance.id).toBe('340124');
/* cspell:disable-next-line */
expect(instance.name).toBe('James Franklin EMEA Onboarding');
expect(instance.started).toEqual(new Date('2017-10-09T12:19:44.560+0000'));
});