@@ -39,9 +39,11 @@ QUnit.test( "widget method", function( assert ) {
39
39
40
40
QUnit . test ( "baseStructure" , function ( assert ) {
41
41
var ready = assert . async ( ) ;
42
- assert . expect ( 58 ) ;
42
+ assert . expect ( 60 ) ;
43
43
var header , title , table , thead , week , panel , inl , child ,
44
- inp = testHelper . initNewInput ( ) ,
44
+ inp = testHelper . initNewInput ( {
45
+ defaultDate : $ . datepicker . _newDate ( 1 , 2 - 1 , 3 )
46
+ } ) ,
45
47
dp = $ ( "#ui-datepicker-div" ) ;
46
48
47
49
function step1 ( ) {
@@ -61,7 +63,7 @@ QUnit.test( "baseStructure", function( assert ) {
61
63
assert . ok ( title . is ( "div.ui-datepicker-title" ) && title . html ( ) !== "" , "Structure - title division" ) ;
62
64
assert . equal ( title . children ( ) . length , 2 , "Structure - title child count" ) ;
63
65
assert . ok ( title . children ( ) . first ( ) . is ( "span.ui-datepicker-month" ) && title . children ( ) . first ( ) . text ( ) !== "" , "Structure - month text" ) ;
64
- assert . ok ( title . children ( ) . last ( ) . is ( "span.ui-datepicker-year" ) && title . children ( ) . last ( ) . text ( ) !== " ", "Structure - year text" ) ;
66
+ assert . ok ( title . children ( ) . last ( ) . is ( "span.ui-datepicker-year" ) && title . children ( ) . last ( ) . text ( ) === "0001 ", "Structure - year text" ) ;
65
67
66
68
table = dp . children ( ) . eq ( 1 ) ;
67
69
assert . ok ( table . is ( "table.ui-datepicker-calendar" ) , "Structure - month table" ) ;
@@ -90,12 +92,15 @@ QUnit.test( "baseStructure", function( assert ) {
90
92
inp = testHelper . initNewInput ( {
91
93
changeMonth : true ,
92
94
changeYear : true ,
93
- showButtonPanel : true
95
+ showButtonPanel : true ,
96
+ defaultDate : $ . datepicker . _newDate ( 1 , 2 - 1 , 3 )
94
97
} ) ;
95
98
testHelper . onFocus ( inp , function ( ) {
96
99
title = dp . find ( "div.ui-datepicker-title" ) ;
97
100
assert . ok ( title . children ( ) . first ( ) . is ( "select.ui-datepicker-month" ) , "Structure - month selector" ) ;
98
101
assert . ok ( title . children ( ) . last ( ) . is ( "select.ui-datepicker-year" ) , "Structure - year selector" ) ;
102
+ assert . equal ( title . children ( ) . last ( ) . children ( ) . first ( ) . text ( ) , "-9" ) ;
103
+ assert . equal ( title . children ( ) . last ( ) . children ( ) . last ( ) . text ( ) , "0011" ) ;
99
104
100
105
panel = dp . children ( ) . last ( ) ;
101
106
assert . ok ( panel . is ( "div.ui-datepicker-buttonpane" ) , "Structure - button panel division" ) ;
0 commit comments