@@ -57,11 +57,11 @@ QUnit.test( "baseStructure", function( assert ) {
57
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
- title = header . children ( ": last" ) ;
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
63
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" ) ;
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" ) ;
@@ -77,7 +77,7 @@ QUnit.test( "baseStructure", function( assert ) {
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
79
assert . ok ( week . children ( ) . first ( ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table first day cell" ) ;
80
- assert . ok ( week . children ( ": last" ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table second day cell" ) ;
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" ) ;
83
83
step2 ( ) ;
@@ -95,13 +95,13 @@ QUnit.test( "baseStructure", function( assert ) {
95
95
testHelper . onFocus ( inp , function ( ) {
96
96
title = dp . find ( "div.ui-datepicker-title" ) ;
97
97
assert . ok ( title . children ( ) . first ( ) . is ( "select.ui-datepicker-month" ) , "Structure - month selector" ) ;
98
- assert . ok ( title . children ( ": last" ) . is ( "select.ui-datepicker-year" ) , "Structure - year selector" ) ;
98
+ assert . ok ( title . children ( ) . last ( ) . is ( "select.ui-datepicker-year" ) , "Structure - year selector" ) ;
99
99
100
- panel = dp . children ( ": last" ) ;
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
103
assert . ok ( panel . children ( ) . first ( ) . is ( "button.ui-datepicker-current" ) , "Structure - today button" ) ;
104
- assert . ok ( panel . children ( ": last" ) . is ( "button.ui-datepicker-close" ) , "Structure - close button" ) ;
104
+ assert . ok ( panel . children ( ) . last ( ) . is ( "button.ui-datepicker-close" ) , "Structure - close button" ) ;
105
105
106
106
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
107
107
step3 ( ) ;
@@ -235,11 +235,11 @@ QUnit.test( "customStructure", function( assert ) {
235
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
- panel = dp . children ( ": last" ) ;
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
241
assert . ok ( panel . children ( ) . first ( ) . is ( "button.ui-datepicker-close" ) , "Structure RTL - close button" ) ;
242
- assert . ok ( panel . children ( ": last" ) . is ( "button.ui-datepicker-current" ) , "Structure RTL - today button" ) ;
242
+ assert . ok ( panel . children ( ) . last ( ) . is ( "button.ui-datepicker-current" ) , "Structure RTL - today button" ) ;
243
243
244
244
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
245
245
step2 ( ) ;
@@ -271,10 +271,10 @@ 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
276
assert . ok ( title . children ( ) . first ( ) . is ( "select.ui-datepicker-month" ) , "Structure changeable month - month selector" ) ;
277
- assert . ok ( title . children ( ": last" ) . is ( "span.ui-datepicker-year" ) , "Structure changeable month - read-only year" ) ;
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" ) ;
280
280
step4 ( ) ;
@@ -286,10 +286,10 @@ 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
291
assert . ok ( title . children ( ) . first ( ) . is ( "span.ui-datepicker-month" ) , "Structure changeable year - read-only month" ) ;
292
- assert . ok ( title . children ( ": last" ) . is ( "select.ui-datepicker-year" ) , "Structure changeable year - year selector" ) ;
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" ) ;
295
295
step5 ( ) ;
0 commit comments