Bert Leunis pushed to branch feature/CHANNELMGR-1391 at cms-community / 
hippo-addon-channel-manager


Commits:
8b9e2d27 by Bert Leunis at 2018-03-13T10:46:30+01:00
CHANNELMGR-1391 make all unit test work correctly

- - - - -


1 changed file:

- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/fields/dateField/dateField.spec.js


Changes:

=====================================
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/fields/dateField/dateField.spec.js
=====================================
--- 
a/frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/fields/dateField/dateField.spec.js
+++ 
b/frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/fields/dateField/dateField.spec.js
@@ -22,6 +22,7 @@ describe('DateField', () => {
   let FieldService;
   let onFieldFocus;
   let onFieldBlur;
+  let form;
 
   const fieldType = {id: 'field:type'};
   const fieldValues = [
@@ -136,7 +137,7 @@ describe('DateField', () => {
     spyOn(FieldService, 'draftField');
 
     $ctrl.focusDateField();
-    fieldValues[1].value = 'Changed';
+    fieldValues[1].value = '2018-01-01T12:11:50.041+01:00';
     $ctrl.blurDateField();
 
     
expect(FieldService.draftField).toHaveBeenCalledWith('test-name/field:type', 
fieldValues);
@@ -160,15 +161,12 @@ describe('DateField', () => {
     expect($ctrl.valueChanged).toHaveBeenCalled();
     const newValue = $ctrl.dateValues[0].date;
     expect(oldValue).toBeLessThan(newValue);
-    /*
-        expect(form.$setDirty()).toHaveBeenCalled();
-    */
-
+    expect(form.$setDirty).toHaveBeenCalled();
   });
 
 });
 
-fdescribe('DateValue', () => {
+describe('DateValue', () => {
   let dateValue;
 
   describe('when populated', () => {
@@ -233,7 +231,6 @@ fdescribe('DateValue', () => {
       dateValue.minutes = 1;
       expect(dateValue.date).not.toBe(null);
     });
-
   });
 
 });
\ No newline at end of file



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/8b9e2d27a68453d8393250b6dd26d3fe7bf7542f

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/8b9e2d27a68453d8393250b6dd26d3fe7bf7542f
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to