mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-5857] resolved unit tests
This commit is contained in:
@@ -113,7 +113,7 @@ describe('Form Renderer Component', () => {
|
|||||||
fixture.destroy();
|
fixture.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Display Date Widget ', async () => {
|
describe('Display Date Widget ', () => {
|
||||||
it('Should be able to see a widget when the visibility condition refers to another fields with specific date', async () => {
|
it('Should be able to see a widget when the visibility condition refers to another fields with specific date', async () => {
|
||||||
formRendererComponent.formDefinition = formService.parseForm(formDateVisibility.formRepresentation.formDefinition);
|
formRendererComponent.formDefinition = formService.parseForm(formDateVisibility.formRepresentation.formDefinition);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|||||||
+4
-4
@@ -293,8 +293,8 @@ describe('DateWidgetComponent', () => {
|
|||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
|
|
||||||
const todayDate = new Date();
|
const todayDate = new Date();
|
||||||
const expected = subDays(todayDate, widget.field.minDateRangeValue);
|
const expected = format(subDays(todayDate, widget.field.minDateRangeValue), widget.DATE_FORMAT);
|
||||||
expect(widget.minDate).toEqual(format(expected, widget.DATE_FORMAT));
|
expect(widget.minDate).toEqual(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should min date and max date be undefined if dynamic min and max date are not set', async () => {
|
it('should min date and max date be undefined if dynamic min and max date are not set', async () => {
|
||||||
@@ -343,8 +343,8 @@ describe('DateWidgetComponent', () => {
|
|||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
|
|
||||||
const todayDate = new Date();
|
const todayDate = new Date();
|
||||||
const expected = addDays(todayDate, widget.field.maxDateRangeValue);
|
const expected = format(addDays(todayDate, widget.field.maxDateRangeValue), widget.DATE_FORMAT);
|
||||||
expect(widget.maxDate).toEqual(format(expected, widget.DATE_FORMAT));
|
expect(widget.maxDate).toEqual(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should maxDate and minDate be undefined if minDateRangeValue and maxDateRangeValue are null', async () => {
|
it('should maxDate and minDate be undefined if minDateRangeValue and maxDateRangeValue are null', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user