@@ -51,32 +51,32 @@ QUnit.test( "baseStructure", function( assert ) {
51
51
assert . ok ( ! dp . is ( ".ui-datepicker-multi" ) , "Structure - not multi-month" ) ;
52
52
assert . equal ( dp . children ( ) . length , 2 , "Structure - child count" ) ;
53
53
54
- header = dp . children ( ": first" ) ;
54
+ header = dp . children ( ) . first ( ) ;
55
55
assert . ok ( header . is ( "div.ui-datepicker-header" ) , "Structure - header division" ) ;
56
56
assert . equal ( header . children ( ) . length , 3 , "Structure - header child count" ) ;
57
- assert . ok ( header . children ( ": first" ) . is ( "a.ui-datepicker-prev" ) && header . children ( ": first" ) . html ( ) !== "" , "Structure - prev link" ) ;
57
+ assert . ok ( header . children ( ) . first ( ) . is ( "a.ui-datepicker-prev" ) && header . children ( ) . first ( ) . html ( ) !== "" , "Structure - prev link" ) ;
58
58
assert . ok ( header . children ( ":eq(1)" ) . is ( "a.ui-datepicker-next" ) && header . children ( ":eq(1)" ) . html ( ) !== "" , "Structure - next link" ) ;
59
59
60
60
title = header . children ( ":last" ) ;
61
61
assert . ok ( title . is ( "div.ui-datepicker-title" ) && title . html ( ) !== "" , "Structure - title division" ) ;
62
62
assert . equal ( title . children ( ) . length , 2 , "Structure - title child count" ) ;
63
- assert . ok ( title . children ( ": first" ) . is ( "span.ui-datepicker-month" ) && title . children ( ": first" ) . text ( ) !== "" , "Structure - month text" ) ;
63
+ assert . ok ( title . children ( ) . first ( ) . is ( "span.ui-datepicker-month" ) && title . children ( ) . first ( ) . text ( ) !== "" , "Structure - month text" ) ;
64
64
assert . ok ( title . children ( ":last" ) . is ( "span.ui-datepicker-year" ) && title . children ( ":last" ) . text ( ) !== "" , "Structure - year text" ) ;
65
65
66
66
table = dp . children ( ":eq(1)" ) ;
67
67
assert . ok ( table . is ( "table.ui-datepicker-calendar" ) , "Structure - month table" ) ;
68
- assert . ok ( table . children ( ": first" ) . is ( "thead" ) , "Structure - month table thead" ) ;
68
+ assert . ok ( table . children ( ) . first ( ) . is ( "thead" ) , "Structure - month table thead" ) ;
69
69
70
- thead = table . children ( ": first" ) . children ( ": first" ) ;
70
+ thead = table . children ( ) . first ( ) . children ( ) . first ( ) ;
71
71
assert . ok ( thead . is ( "tr" ) , "Structure - month table title row" ) ;
72
72
assert . equal ( thead . find ( "th" ) . length , 7 , "Structure - month table title cells" ) ;
73
73
assert . ok ( table . children ( ":eq(1)" ) . is ( "tbody" ) , "Structure - month table body" ) ;
74
74
assert . ok ( table . children ( ":eq(1)" ) . children ( "tr" ) . length >= 4 , "Structure - month table week count" ) ;
75
75
76
- week = table . children ( ":eq(1)" ) . children ( ": first" ) ;
76
+ week = table . children ( ":eq(1)" ) . children ( ) . first ( ) ;
77
77
assert . ok ( week . is ( "tr" ) , "Structure - month table week row" ) ;
78
78
assert . equal ( week . children ( ) . length , 7 , "Structure - week child count" ) ;
79
- assert . ok ( week . children ( ": first" ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table first day cell" ) ;
79
+ assert . ok ( week . children ( ) . first ( ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table first day cell" ) ;
80
80
assert . ok ( week . children ( ":last" ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table second day cell" ) ;
81
81
82
82
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
@@ -94,13 +94,13 @@ QUnit.test( "baseStructure", function( assert ) {
94
94
} ) ;
95
95
testHelper . onFocus ( inp , function ( ) {
96
96
title = dp . find ( "div.ui-datepicker-title" ) ;
97
- assert . ok ( title . children ( ": first" ) . is ( "select.ui-datepicker-month" ) , "Structure - month selector" ) ;
97
+ assert . ok ( title . children ( ) . first ( ) . is ( "select.ui-datepicker-month" ) , "Structure - month selector" ) ;
98
98
assert . ok ( title . children ( ":last" ) . is ( "select.ui-datepicker-year" ) , "Structure - year selector" ) ;
99
99
100
100
panel = dp . children ( ":last" ) ;
101
101
assert . ok ( panel . is ( "div.ui-datepicker-buttonpane" ) , "Structure - button panel division" ) ;
102
102
assert . equal ( panel . children ( ) . length , 2 , "Structure - button panel child count" ) ;
103
- assert . ok ( panel . children ( ": first" ) . is ( "button.ui-datepicker-current" ) , "Structure - today button" ) ;
103
+ assert . ok ( panel . children ( ) . first ( ) . is ( "button.ui-datepicker-current" ) , "Structure - today button" ) ;
104
104
assert . ok ( panel . children ( ":last" ) . is ( "button.ui-datepicker-close" ) , "Structure - close button" ) ;
105
105
106
106
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
@@ -116,7 +116,7 @@ QUnit.test( "baseStructure", function( assert ) {
116
116
assert . ok ( dp . is ( ".ui-datepicker-multi" ) , "Structure multi [2] - multi-month" ) ;
117
117
assert . equal ( dp . children ( ) . length , 3 , "Structure multi [2] - child count" ) ;
118
118
119
- child = dp . children ( ": first" ) ;
119
+ child = dp . children ( ) . first ( ) ;
120
120
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-first" ) , "Structure multi [2] - first month division" ) ;
121
121
122
122
child = dp . children ( ":eq(1)" ) ;
@@ -152,7 +152,7 @@ QUnit.test( "baseStructure", function( assert ) {
152
152
assert . ok ( dp . is ( ".ui-datepicker-multi" ) , "Structure multi - multi-month" ) ;
153
153
assert . equal ( dp . children ( ) . length , 6 , "Structure multi [2,2] - child count" ) ;
154
154
155
- child = dp . children ( ": first" ) ;
155
+ child = dp . children ( ) . first ( ) ;
156
156
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-first" ) , "Structure multi [2,2] - first month division" ) ;
157
157
158
158
child = dp . children ( ":eq(1)" ) ;
@@ -181,13 +181,13 @@ QUnit.test( "baseStructure", function( assert ) {
181
181
assert . ok ( ! dp . is ( ".ui-datepicker-multi" ) , "Structure inline - not multi-month" ) ;
182
182
assert . equal ( dp . children ( ) . length , 2 , "Structure inline - child count" ) ;
183
183
184
- header = dp . children ( ": first" ) ;
184
+ header = dp . children ( ) . first ( ) ;
185
185
assert . ok ( header . is ( "div.ui-datepicker-header" ) , "Structure inline - header division" ) ;
186
186
assert . equal ( header . children ( ) . length , 3 , "Structure inline - header child count" ) ;
187
187
188
188
table = dp . children ( ":eq(1)" ) ;
189
189
assert . ok ( table . is ( "table.ui-datepicker-calendar" ) , "Structure inline - month table" ) ;
190
- assert . ok ( table . children ( ": first" ) . is ( "thead" ) , "Structure inline - month table thead" ) ;
190
+ assert . ok ( table . children ( ) . first ( ) . is ( "thead" ) , "Structure inline - month table thead" ) ;
191
191
assert . ok ( table . children ( ":eq(1)" ) . is ( "tbody" ) , "Structure inline - month table body" ) ;
192
192
193
193
inl . datepicker ( "destroy" ) ;
@@ -199,7 +199,7 @@ QUnit.test( "baseStructure", function( assert ) {
199
199
assert . ok ( dp . is ( ".ui-datepicker-inline" ) && dp . is ( ".ui-datepicker-multi" ) , "Structure inline multi - main div" ) ;
200
200
assert . equal ( dp . children ( ) . length , 3 , "Structure inline multi - child count" ) ;
201
201
202
- child = dp . children ( ": first" ) ;
202
+ child = dp . children ( ) . first ( ) ;
203
203
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-first" ) , "Structure inline multi - first month division" ) ;
204
204
205
205
child = dp . children ( ":eq(1)" ) ;
@@ -229,16 +229,16 @@ QUnit.test( "customStructure", function( assert ) {
229
229
testHelper . onFocus ( inp , function ( ) {
230
230
assert . ok ( dp . is ( ".ui-datepicker-rtl" ) , "Structure RTL - right-to-left" ) ;
231
231
232
- header = dp . children ( ": first" ) ;
232
+ header = dp . children ( ) . first ( ) ;
233
233
assert . ok ( header . is ( "div.ui-datepicker-header" ) , "Structure RTL - header division" ) ;
234
234
assert . equal ( header . children ( ) . length , 3 , "Structure RTL - header child count" ) ;
235
- assert . ok ( header . children ( ": first" ) . is ( "a.ui-datepicker-next" ) , "Structure RTL - prev link" ) ;
235
+ assert . ok ( header . children ( ) . first ( ) . is ( "a.ui-datepicker-next" ) , "Structure RTL - prev link" ) ;
236
236
assert . ok ( header . children ( ":eq(1)" ) . is ( "a.ui-datepicker-prev" ) , "Structure RTL - next link" ) ;
237
237
238
238
panel = dp . children ( ":last" ) ;
239
239
assert . ok ( panel . is ( "div.ui-datepicker-buttonpane" ) , "Structure RTL - button division" ) ;
240
240
assert . equal ( panel . children ( ) . length , 2 , "Structure RTL - button panel child count" ) ;
241
- assert . ok ( panel . children ( ": first" ) . is ( "button.ui-datepicker-close" ) , "Structure RTL - close button" ) ;
241
+ assert . ok ( panel . children ( ) . first ( ) . is ( "button.ui-datepicker-close" ) , "Structure RTL - close button" ) ;
242
242
assert . ok ( panel . children ( ":last" ) . is ( "button.ui-datepicker-current" ) , "Structure RTL - today button" ) ;
243
243
244
244
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
@@ -256,10 +256,10 @@ QUnit.test( "customStructure", function( assert ) {
256
256
inp . val ( "02/10/2008" ) ;
257
257
258
258
testHelper . onFocus ( inp , function ( ) {
259
- header = dp . children ( ": first" ) ;
259
+ header = dp . children ( ) . first ( ) ;
260
260
assert . ok ( header . is ( "div.ui-datepicker-header" ) , "Structure hide prev/next - header division" ) ;
261
261
assert . equal ( header . children ( ) . length , 1 , "Structure hide prev/next - links child count" ) ;
262
- assert . ok ( header . children ( ": first" ) . is ( "div.ui-datepicker-title" ) , "Structure hide prev/next - title division" ) ;
262
+ assert . ok ( header . children ( ) . first ( ) . is ( "div.ui-datepicker-title" ) , "Structure hide prev/next - title division" ) ;
263
263
264
264
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
265
265
step3 ( ) ;
@@ -271,9 +271,9 @@ QUnit.test( "customStructure", function( assert ) {
271
271
inp = testHelper . initNewInput ( { changeMonth : true } ) ;
272
272
273
273
testHelper . onFocus ( inp , function ( ) {
274
- title = dp . children ( ": first" ) . children ( ":last" ) ;
274
+ title = dp . children ( ) . first ( ) . children ( ":last" ) ;
275
275
assert . equal ( title . children ( ) . length , 2 , "Structure changeable month - title child count" ) ;
276
- assert . ok ( title . children ( ": first" ) . is ( "select.ui-datepicker-month" ) , "Structure changeable month - month selector" ) ;
276
+ assert . ok ( title . children ( ) . first ( ) . is ( "select.ui-datepicker-month" ) , "Structure changeable month - month selector" ) ;
277
277
assert . ok ( title . children ( ":last" ) . is ( "span.ui-datepicker-year" ) , "Structure changeable month - read-only year" ) ;
278
278
279
279
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
@@ -286,9 +286,9 @@ QUnit.test( "customStructure", function( assert ) {
286
286
inp = testHelper . initNewInput ( { changeYear : true } ) ;
287
287
288
288
testHelper . onFocus ( inp , function ( ) {
289
- title = dp . children ( ": first" ) . children ( ":last" ) ;
289
+ title = dp . children ( ) . first ( ) . children ( ":last" ) ;
290
290
assert . equal ( title . children ( ) . length , 2 , "Structure changeable year - title child count" ) ;
291
- assert . ok ( title . children ( ": first" ) . is ( "span.ui-datepicker-month" ) , "Structure changeable year - read-only month" ) ;
291
+ assert . ok ( title . children ( ) . first ( ) . is ( "span.ui-datepicker-month" ) , "Structure changeable year - read-only month" ) ;
292
292
assert . ok ( title . children ( ":last" ) . is ( "select.ui-datepicker-year" ) , "Structure changeable year - year selector" ) ;
293
293
294
294
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
0 commit comments