From df3e8c4deb07105eb8a387caf27d7a1f9ecdb02c Mon Sep 17 00:00:00 2001 From: Scott González Date: Mon, 6 Apr 2015 14:27:05 -0400 Subject: Progressbar: Convert tests to new infrastructure Ref #10119 Ref gh-1528 --- tests/unit/progressbar/progressbar.html | 26 ++------------------------ tests/unit/progressbar/progressbar_common.js | 9 ++++++++- tests/unit/progressbar/progressbar_core.js | 7 +++++-- tests/unit/progressbar/progressbar_events.js | 7 +++++-- tests/unit/progressbar/progressbar_methods.js | 11 +++++++---- tests/unit/progressbar/progressbar_options.js | 7 +++++-- 6 files changed, 32 insertions(+), 35 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/progressbar/progressbar.html b/tests/unit/progressbar/progressbar.html index 1dae6b666..351ed4e21 100644 --- a/tests/unit/progressbar/progressbar.html +++ b/tests/unit/progressbar/progressbar.html @@ -4,30 +4,8 @@ jQuery UI Progressbar Test Suite - - - - - - - - - - - - - - - + + diff --git a/tests/unit/progressbar/progressbar_common.js b/tests/unit/progressbar/progressbar_common.js index 0608f09f7..c949f136f 100644 --- a/tests/unit/progressbar/progressbar_common.js +++ b/tests/unit/progressbar/progressbar_common.js @@ -1,4 +1,9 @@ -TestHelpers.commonWidgetTests( "progressbar", { +define( [ + "lib/common", + "ui/progressbar" +], function( common ) { + +common.testWidget( "progressbar", { defaults: { classes: { "ui-progressbar": "ui-corner-all", @@ -15,3 +20,5 @@ TestHelpers.commonWidgetTests( "progressbar", { create: null } }); + +} ); diff --git a/tests/unit/progressbar/progressbar_core.js b/tests/unit/progressbar/progressbar_core.js index 60ff31411..05eea9ef7 100644 --- a/tests/unit/progressbar/progressbar_core.js +++ b/tests/unit/progressbar/progressbar_core.js @@ -1,4 +1,7 @@ -(function( $ ) { +define( [ + "jquery", + "ui/progressbar" +], function( $ ) { module( "progressbar: core" ); @@ -58,4 +61,4 @@ test( "accessibility", function() { equal( element.attr( "aria-valuenow" ), null, "aria-valuenow" ); }); -}( jQuery ) ); +} ); diff --git a/tests/unit/progressbar/progressbar_events.js b/tests/unit/progressbar/progressbar_events.js index ed3da169a..a40b2c432 100644 --- a/tests/unit/progressbar/progressbar_events.js +++ b/tests/unit/progressbar/progressbar_events.js @@ -1,4 +1,7 @@ -(function( $ ) { +define( [ + "jquery", + "ui/progressbar" +], function( $ ) { module( "progressbar: events" ); @@ -52,4 +55,4 @@ test( "complete", function() { element.progressbar( "value", value ); }); -}( jQuery ) ); +} ); diff --git a/tests/unit/progressbar/progressbar_methods.js b/tests/unit/progressbar/progressbar_methods.js index c665566b5..eaf0a5c76 100644 --- a/tests/unit/progressbar/progressbar_methods.js +++ b/tests/unit/progressbar/progressbar_methods.js @@ -1,10 +1,13 @@ -(function( $ ) { +define( [ + "jquery", + "ui/progressbar" +], function( $ ) { module( "progressbar: methods" ); -test( "destroy", function() { +test( "destroy", function( assert ) { expect( 1 ); - domEqual( "#progressbar", function() { + assert.domEqual( "#progressbar", function() { $( "#progressbar" ).progressbar().progressbar( "destroy" ); }); }); @@ -36,4 +39,4 @@ test( "widget", function() { strictEqual( widgetElement[ 0 ], element[ 0 ], "same element" ); }); -}( jQuery ) ); +} ); diff --git a/tests/unit/progressbar/progressbar_options.js b/tests/unit/progressbar/progressbar_options.js index 739c97bd9..7b6ac9db2 100644 --- a/tests/unit/progressbar/progressbar_options.js +++ b/tests/unit/progressbar/progressbar_options.js @@ -1,4 +1,7 @@ -(function( $ ) { +define( [ + "jquery", + "ui/progressbar" +], function( $ ) { module( "progressbar: options" ); @@ -73,4 +76,4 @@ test( "change max below value", function() { "value constrained at max" ); }); -}( jQuery ) ); +} ); -- cgit v1.2.3