diff --git a/lib/core/directives/node-favorite.directive.spec.ts b/lib/core/directives/node-favorite.directive.spec.ts index 0585b02b80..8859ae7437 100644 --- a/lib/core/directives/node-favorite.directive.spec.ts +++ b/lib/core/directives/node-favorite.directive.spec.ts @@ -15,7 +15,6 @@ * limitations under the License. */ -import { SimpleChange } from '@angular/core'; import { fakeAsync, tick } from '@angular/core/testing'; import { NodeFavoriteDirective } from './node-favorite.directive'; import { AlfrescoApiServiceMock } from '../mock/alfresco-api.service.mock'; diff --git a/lib/core/form/components/form.component.spec.ts b/lib/core/form/components/form.component.spec.ts index 981632a55c..c67f040832 100644 --- a/lib/core/form/components/form.component.spec.ts +++ b/lib/core/form/components/form.component.spec.ts @@ -711,7 +711,7 @@ describe('FormComponent', () => { const nodeId = ''; let change = new SimpleChange(null, nodeId, false); - formComponent.ngOnChanges({'nodeId' : change}); + formComponent.ngOnChanges({ 'nodeId': change }); expect(nodeService.getNodeMetadata).toHaveBeenCalledWith(nodeId); expect(formComponent.loadFormFromActiviti).toHaveBeenCalled(); @@ -820,7 +820,7 @@ describe('FormComponent', () => { let formFields = formComponent.form.getFormFields(); let labelField = formFields.find(field => field.id === 'label'); - let radioField = formFields.find(field => field.id === 'raduio'); + let radioField = formFields.find(field => field.id === 'radio'); expect(labelField.value).toBe('empty'); expect(radioField.value).toBe('option_1'); @@ -829,14 +829,14 @@ describe('FormComponent', () => { id: 'option_2', name: 'test2' }; - formValues.raduio = { id: 'option_2', name: 'Option 2' }; + formValues.radio = { id: 'option_2', name: 'Option 2' }; let change = new SimpleChange(null, formValues, false); formComponent.data = formValues; formComponent.ngOnChanges({ 'data': change }); formFields = formComponent.form.getFormFields(); labelField = formFields.find(field => field.id === 'label'); - radioField = formFields.find(field => field.id === 'raduio'); + radioField = formFields.find(field => field.id === 'radio'); expect(labelField.value).toBe('option_2'); expect(radioField.value).toBe('option_2'); }); @@ -844,18 +844,16 @@ describe('FormComponent', () => { it('should refresh radio buttons value when id is given to data', () => { formComponent.form = new FormModel(fakeForm); let formFields = formComponent.form.getFormFields(); - let radioFieldById = formFields.find(field => field.id === 'raduio'); - - expect(radioFieldById.value).toBe('option_2'); + let radioFieldById = formFields.find(field => field.id === 'radio'); let formValues: any = {}; - formValues.raduio = 'option_3'; + formValues.radio = 'option_3'; let change = new SimpleChange(null, formValues, false); formComponent.data = formValues; formComponent.ngOnChanges({ 'data': change }); formFields = formComponent.form.getFormFields(); - radioFieldById = formFields.find(field => field.id === 'raduio'); + radioFieldById = formFields.find(field => field.id === 'radio'); expect(radioFieldById.value).toBe('option_3'); }); }); diff --git a/lib/core/mock/form/form.component.mock.ts b/lib/core/mock/form/form.component.mock.ts index 64080265a7..5f89098296 100644 --- a/lib/core/mock/form/form.component.mock.ts +++ b/lib/core/mock/form/form.component.mock.ts @@ -124,8 +124,8 @@ export let fakeForm = { 2: [ { fieldType: 'RestFieldRepresentation', - id: 'raduio', - name: 'raduio', + id: 'radio', + name: 'radio', type: 'radio-buttons', value: null, required: false,