@@ -9,7 +9,11 @@ function getSnapshot(formsManager) {
9
9
}
10
10
11
11
describe ( 'FormsManager' , ( ) => {
12
- let formsManager : NgFormsManager , control : FormControl , arr : FormArray , group : FormGroup ;
12
+ let formsManager : NgFormsManager ,
13
+ control : FormControl ,
14
+ arr : FormArray ,
15
+ group : FormGroup ,
16
+ date : Date ;
13
17
14
18
beforeEach ( ( ) => {
15
19
formsManager = new NgFormsManager ( new NgFormsManagerConfig ( ) ) ;
@@ -18,12 +22,14 @@ describe('FormsManager', () => {
18
22
group = new FormGroup ( {
19
23
name : new FormControl ( ) ,
20
24
email : new FormControl ( ) ,
25
+ date : new FormControl ( ) ,
21
26
phone : new FormGroup ( {
22
27
number : new FormControl ( ) ,
23
28
prefix : new FormControl ( ) ,
24
29
} ) ,
25
30
arr : new FormArray ( [ ] ) ,
26
31
} ) ;
32
+ date = new Date ( ) ;
27
33
28
34
formsManager
29
35
. upsert ( 'config' , control )
@@ -67,6 +73,7 @@ describe('FormsManager', () => {
67
73
value : {
68
74
name : null ,
69
75
email : null ,
76
+ date : null ,
70
77
phone : {
71
78
number : null ,
72
79
prefix : null ,
@@ -76,6 +83,7 @@ describe('FormsManager', () => {
76
83
rawValue : {
77
84
name : null ,
78
85
email : null ,
86
+ date : null ,
79
87
phone : {
80
88
number : null ,
81
89
prefix : null ,
@@ -115,6 +123,18 @@ describe('FormsManager', () => {
115
123
pristine : true ,
116
124
pending : false ,
117
125
} ,
126
+ date : {
127
+ value : null ,
128
+ rawValue : null ,
129
+ valid : true ,
130
+ dirty : false ,
131
+ invalid : false ,
132
+ disabled : false ,
133
+ errors : null ,
134
+ touched : false ,
135
+ pristine : true ,
136
+ pending : false ,
137
+ } ,
118
138
phone : {
119
139
value : {
120
140
number : null ,
@@ -207,6 +227,7 @@ describe('FormsManager', () => {
207
227
value : {
208
228
name : null ,
209
229
email : null ,
230
+ date : null ,
210
231
phone : {
211
232
number : null ,
212
233
prefix : null ,
@@ -216,6 +237,7 @@ describe('FormsManager', () => {
216
237
rawValue : {
217
238
name : null ,
218
239
email : null ,
240
+ date : null ,
219
241
phone : {
220
242
number : null ,
221
243
prefix : null ,
@@ -255,6 +277,18 @@ describe('FormsManager', () => {
255
277
pristine : true ,
256
278
pending : false ,
257
279
} ,
280
+ date : {
281
+ value : null ,
282
+ rawValue : null ,
283
+ valid : true ,
284
+ dirty : false ,
285
+ invalid : false ,
286
+ disabled : false ,
287
+ errors : null ,
288
+ touched : false ,
289
+ pristine : true ,
290
+ pending : false ,
291
+ } ,
258
292
phone : {
259
293
value : {
260
294
number : null ,
@@ -373,6 +407,7 @@ describe('FormsManager', () => {
373
407
value : {
374
408
name : null ,
375
409
email : null ,
410
+ date : null ,
376
411
phone : {
377
412
number : null ,
378
413
prefix : null ,
@@ -382,6 +417,7 @@ describe('FormsManager', () => {
382
417
rawValue : {
383
418
name : null ,
384
419
email : null ,
420
+ date : null ,
385
421
phone : {
386
422
number : null ,
387
423
prefix : null ,
@@ -421,6 +457,18 @@ describe('FormsManager', () => {
421
457
pristine : true ,
422
458
pending : false ,
423
459
} ,
460
+ date : {
461
+ value : null ,
462
+ rawValue : null ,
463
+ valid : true ,
464
+ dirty : false ,
465
+ invalid : false ,
466
+ disabled : false ,
467
+ errors : null ,
468
+ touched : false ,
469
+ pristine : true ,
470
+ pending : false ,
471
+ } ,
424
472
phone : {
425
473
value : {
426
474
number : null ,
@@ -484,6 +532,7 @@ describe('FormsManager', () => {
484
532
group . patchValue ( {
485
533
name : 'Netanel' ,
486
534
535
+ date : date ,
487
536
phone : {
488
537
number : 1 ,
489
538
prefix : 2 ,
@@ -547,6 +596,7 @@ describe('FormsManager', () => {
547
596
value : {
548
597
name : 'Netanel' ,
549
598
599
+ date : date ,
550
600
phone : {
551
601
number : 1 ,
552
602
prefix : 2 ,
@@ -556,6 +606,7 @@ describe('FormsManager', () => {
556
606
rawValue : {
557
607
name : 'Netanel' ,
558
608
609
+ date : date ,
559
610
phone : {
560
611
number : 1 ,
561
612
prefix : 2 ,
@@ -595,6 +646,18 @@ describe('FormsManager', () => {
595
646
pristine : true ,
596
647
pending : false ,
597
648
} ,
649
+ date : {
650
+ value : date ,
651
+ rawValue : null ,
652
+ valid : true ,
653
+ dirty : false ,
654
+ invalid : false ,
655
+ disabled : false ,
656
+ errors : null ,
657
+ touched : false ,
658
+ pristine : true ,
659
+ pending : false ,
660
+ } ,
598
661
phone : {
599
662
value : {
600
663
number : 1 ,
@@ -756,6 +819,7 @@ describe('FormsManager', () => {
756
819
value : {
757
820
name : null ,
758
821
email : null ,
822
+ date : null ,
759
823
phone : {
760
824
number : null ,
761
825
prefix : null ,
@@ -765,6 +829,7 @@ describe('FormsManager', () => {
765
829
rawValue : {
766
830
name : null ,
767
831
email : null ,
832
+ date : null ,
768
833
phone : {
769
834
number : null ,
770
835
prefix : null ,
@@ -804,6 +869,18 @@ describe('FormsManager', () => {
804
869
pristine : true ,
805
870
pending : false ,
806
871
} ,
872
+ date : {
873
+ value : null ,
874
+ rawValue : null ,
875
+ valid : true ,
876
+ dirty : false ,
877
+ invalid : false ,
878
+ disabled : false ,
879
+ errors : null ,
880
+ touched : false ,
881
+ pristine : true ,
882
+ pending : false ,
883
+ } ,
807
884
phone : {
808
885
value : {
809
886
number : null ,
@@ -875,6 +952,7 @@ describe('FormsManager', () => {
875
952
value : {
876
953
name : null ,
877
954
email : null ,
955
+ date : null ,
878
956
phone : {
879
957
number : 3 ,
880
958
prefix : 4 ,
@@ -884,6 +962,7 @@ describe('FormsManager', () => {
884
962
rawValue : {
885
963
name : null ,
886
964
email : null ,
965
+ date : null ,
887
966
phone : {
888
967
number : 3 ,
889
968
prefix : 4 ,
@@ -923,6 +1002,18 @@ describe('FormsManager', () => {
923
1002
pristine : true ,
924
1003
pending : false ,
925
1004
} ,
1005
+ date : {
1006
+ value : null ,
1007
+ rawValue : null ,
1008
+ valid : true ,
1009
+ dirty : false ,
1010
+ invalid : false ,
1011
+ disabled : false ,
1012
+ errors : null ,
1013
+ touched : false ,
1014
+ pristine : true ,
1015
+ pending : false ,
1016
+ } ,
926
1017
phone : {
927
1018
value : {
928
1019
number : 3 ,
0 commit comments