mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
AAE-23116 Dropdown should not display errors / call apis when it's in readOnly state [without refactor] (#9800)
* AAE-23116 Add tests for dropdown widget * AAE-23116 Update form-field.model * AAE-23116 Final * AAE-23116 Restore formatting * AAE-23116 Align with comments * AAE-23116 Update * AAE-23116 Fix process-services-cloud unit tests * AAE-23116 Fix process services unit tests * AAE-23116 Fix for core unit tests
This commit is contained in:
committed by
GitHub
parent
328d233b05
commit
4d2c489508
@@ -944,10 +944,13 @@ describe('FormComponent', () => {
|
||||
|
||||
const formValues: any = {};
|
||||
formValues.dropdownId = {
|
||||
id: 'option_2',
|
||||
name: 'test2'
|
||||
id: 'dropdown_option_2',
|
||||
name: 'Dropdown option 2'
|
||||
};
|
||||
formValues.radio = {
|
||||
id: 'radio_option_3',
|
||||
name: 'Radio option 3'
|
||||
};
|
||||
formValues.radio = { id: 'option_2', name: 'Option 2' };
|
||||
const change = new SimpleChange(null, formValues, false);
|
||||
formComponent.data = formValues;
|
||||
formComponent.ngOnChanges({ data: change });
|
||||
@@ -956,9 +959,9 @@ describe('FormComponent', () => {
|
||||
dropdownField = formFields.find((field) => field.id === 'dropdownId');
|
||||
radioField = formFields.find((field) => field.id === 'radio');
|
||||
|
||||
expect(dropdownField.value.id).toBe('option_2');
|
||||
expect(dropdownField.value.name).toBe('test2');
|
||||
expect(radioField.value).toBe('option_2');
|
||||
expect(dropdownField.value).toBe('dropdown_option_2');
|
||||
expect(radioField.value.id).toBe('radio_option_3');
|
||||
expect(radioField.value.name).toBe('Radio option 3');
|
||||
});
|
||||
|
||||
it('should refresh radio buttons value when id is given to data', () => {
|
||||
|
Reference in New Issue
Block a user