@@ -13,7 +13,7 @@ function createField(schema = {}, model = null, disabled = false, options) {
13
13
[ el , vm , field ] = createVueField ( "fieldPikaday" , schema , model , disabled , options ) ;
14
14
}
15
15
16
- describe ( "fieldPikaday.vue" , ( ) => {
16
+ describe . only ( "fieldPikaday.vue" , ( ) => {
17
17
18
18
describe ( "check template" , ( ) => {
19
19
let schema = {
@@ -41,7 +41,7 @@ describe("fieldPikaday.vue", () => {
41
41
42
42
it ( "should contain the value" , ( done ) => {
43
43
vm . $nextTick ( ( ) => {
44
- expect ( input . value ) . to . be . equal ( moment ( 1462799081231 ) . format ( "YYYY-MM-DD HH:mm:ss " ) ) ;
44
+ expect ( input . value ) . to . be . equal ( moment ( 1462799081231 ) . format ( "YYYY-MM-DD" ) ) ;
45
45
done ( ) ;
46
46
} ) ;
47
47
} ) ;
@@ -57,18 +57,18 @@ describe("fieldPikaday.vue", () => {
57
57
it ( "input value should be the model value after changed" , ( done ) => {
58
58
model . event = 1234567890123 ;
59
59
vm . $nextTick ( ( ) => {
60
- expect ( input . value ) . to . be . equal ( moment ( 1234567890123 ) . format ( "YYYY-MM-DD HH:mm:ss " ) ) ;
60
+ expect ( input . value ) . to . be . equal ( moment ( 1234567890123 ) . format ( "YYYY-MM-DD" ) ) ;
61
61
done ( ) ;
62
62
} ) ;
63
63
64
64
} ) ;
65
65
66
66
it ( "model value should be the input value if changed" , ( done ) => {
67
- input . value = moment ( 1420194153000 ) . format ( "YYYY-MM-DD HH:mm:ss " ) ;
67
+ input . value = moment ( 1420153200000 ) . format ( "YYYY-MM-DD" ) ;
68
68
trigger ( input , "input" ) ;
69
69
70
70
vm . $nextTick ( ( ) => {
71
- expect ( model . event ) . to . be . equal ( 1420194153000 ) ;
71
+ expect ( model . event ) . to . be . equal ( 1420153200000 ) ;
72
72
done ( ) ;
73
73
} ) ;
74
74
0 commit comments