diff options
author | Scott González <scott.gonzalez@gmail.com> | 2016-02-09 11:28:31 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2016-06-09 17:34:40 -0400 |
commit | f7a529ff0e2939cdc36c29a7ce90c719de5ba380 (patch) | |
tree | 832ea99db657168fe520cd65334a57412ad53fbd /tests/unit | |
parent | 3046d9150f5ec31f93d1caa73cf3eb6f7a9da299 (diff) | |
download | jquery-ui-f7a529ff0e2939cdc36c29a7ce90c719de5ba380.tar.gz jquery-ui-f7a529ff0e2939cdc36c29a7ce90c719de5ba380.zip |
Datepicker: Fix flaky test
(cherry picked from commit 8fc3ba22ba12fe5f3c579db53c3c8da0a68ac16d)
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/datepicker/datepicker_options.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js index 11b010717..5c60ed431 100644 --- a/tests/unit/datepicker/datepicker_options.js +++ b/tests/unit/datepicker/datepicker_options.js @@ -504,19 +504,19 @@ test("minMax", function() { inp.datepicker("setDate", "12/30/" + new Date().getFullYear()); ok(dp.find(".ui-datepicker-next").hasClass("ui-state-disabled"), "Year Range Test - next button disabled at 12/30/maxYear"); - inp.datepicker("option", { + inp.val( "" ).datepicker("option", { minDate: new Date(1900, 0, 1), maxDate: "-7Y", yearRange: "1900:-7" - }).val( "" ); + }); ok(dp.find(".ui-datepicker-next").hasClass("ui-state-disabled"), "Year Range Test - relative - next button disabled"); ok(!dp.find(".ui-datepicker-prev").hasClass("ui-state-disabled"), "Year Range Test - relative - prev button enabled"); - inp.datepicker("option", { + inp.val( "" ).datepicker("option", { minDate: new Date(1900, 0, 1), maxDate: "1/25/2007", yearRange: "1900:2007" - }).val( "" ); + }); ok(dp.find(".ui-datepicker-next").hasClass("ui-state-disabled"), "Year Range Test - absolute - next button disabled"); ok(!dp.find(".ui-datepicker-prev").hasClass("ui-state-disabled"), "Year Range Test - absolute - prev button enabled"); }); |