mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-4436] - added option for select item to display None (#7113)
* [ACA-4436] - added option for select item to display None * [ACA-4436] - added unit test and fixed wrong default behaviour * [ACA-4436] - fixed property check * [ACA-4436] - fixed unit test * [ACA-4436] - fixed unit test
This commit is contained in:
@@ -40,7 +40,22 @@ describe('CardViewSelectItemModel', () => {
|
||||
|
||||
itemModel.displayValue.subscribe((value) => {
|
||||
expect(value).toBe(mockData[1].label);
|
||||
expect(itemModel.displayNoneOption).toBe(true);
|
||||
});
|
||||
}));
|
||||
|
||||
it('should set true for none option when passed through the properties', fakeAsync(() => {
|
||||
properties.displayNoneOption = true;
|
||||
const itemModel = new CardViewSelectItemModel(properties);
|
||||
|
||||
expect(itemModel.displayNoneOption).toBe(true);
|
||||
}));
|
||||
|
||||
it('should set false for none option when passed through the properties', fakeAsync(() => {
|
||||
properties.displayNoneOption = false;
|
||||
const itemModel = new CardViewSelectItemModel(properties);
|
||||
|
||||
expect(itemModel.displayNoneOption).toBe(false);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user