mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Added right value support for dates
This commit is contained in:
parent
7f4415428d
commit
13a56bb9fe
@ -389,6 +389,20 @@ describe('WidgetVisibilityService', () => {
|
||||
expect(rightValue).toBe('100');
|
||||
});
|
||||
|
||||
it('should return formatted date when right value is a date', () => {
|
||||
visibilityObjTest.rightValue = '9999-12-31';
|
||||
let rightValue = service.getRightValue(formTest, visibilityObjTest);
|
||||
|
||||
expect(rightValue).toBe('9999-12-31T00:00:00.000Z');
|
||||
});
|
||||
|
||||
it('should return the value when right value is not a date', () => {
|
||||
visibilityObjTest.rightValue = '9999-99-99';
|
||||
let rightValue = service.getRightValue(formTest, visibilityObjTest);
|
||||
|
||||
expect(rightValue).toBe('9999-99-99');
|
||||
});
|
||||
|
||||
it('should retrieve the value for the right field when it is a form variable', () => {
|
||||
visibilityObjTest.rightFormFieldId = 'RIGHT_FORM_FIELD_ID';
|
||||
let rightValue = service.getRightValue(fakeFormWithField, visibilityObjTest);
|
||||
|
Loading…
x
Reference in New Issue
Block a user