aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/datepicker/datepicker_options.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/datepicker/datepicker_options.js')
-rw-r--r--tests/unit/datepicker/datepicker_options.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js
index a763b2fda..a775a5302 100644
--- a/tests/unit/datepicker/datepicker_options.js
+++ b/tests/unit/datepicker/datepicker_options.js
@@ -95,8 +95,7 @@ asyncTest( "invocation", function() {
expect( isOldIE ? 25 : 29 );
function step0() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input ),
+ var inp = TestHelpers.datepicker.initNewInput(),
dp = $( "#ui-datepicker-div" );
button = inp.siblings( "button" );
@@ -114,8 +113,7 @@ asyncTest( "invocation", function() {
function step1() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input ),
+ var inp = TestHelpers.datepicker.initNewInput(),
dp = $( "#ui-datepicker-div" );
TestHelpers.datepicker.onFocus( inp, function() {
@@ -129,8 +127,10 @@ asyncTest( "invocation", function() {
}
function step2() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input, { showOn: "button", buttonText: "Popup" } ),
+ var inp = TestHelpers.datepicker.initNewInput({
+ showOn: "button",
+ buttonText: "Popup"
+ }),
dp = $( "#ui-datepicker-div" );
ok( !dp.is( ":visible" ), "Button - initially hidden" );
@@ -153,8 +153,7 @@ asyncTest( "invocation", function() {
}
function step3() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input, {
+ var inp = TestHelpers.datepicker.initNewInput({
showOn: "button",
buttonImageOnly: true,
buttonImage: "images/calendar.gif",
@@ -183,8 +182,10 @@ asyncTest( "invocation", function() {
}
function step4() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input, { showOn: "both", buttonImage: "images/calendar.gif"} ),
+ var inp = TestHelpers.datepicker.initNewInput({
+ showOn: "both",
+ buttonImage: "images/calendar.gif"
+ }),
dp = $( "#ui-datepicker-div" );
ok( !dp.is( ":visible" ), "Both - initially hidden" );