aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/progressbar
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-08-24 08:58:48 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-09-11 08:29:08 -0400
commit12be35562af60ea25a6578005cf8b914345f26e3 (patch)
treed4fea77ee8f0c710eda45afe3a7858591ac22b6e /tests/unit/progressbar
parent5850a5c755afa064cf3cb4c4998f299333921d63 (diff)
downloadjquery-ui-12be35562af60ea25a6578005cf8b914345f26e3.tar.gz
jquery-ui-12be35562af60ea25a6578005cf8b914345f26e3.zip
Progressbar: Style updates
Ref #14246
Diffstat (limited to 'tests/unit/progressbar')
-rw-r--r--tests/unit/progressbar/common.js2
-rw-r--r--tests/unit/progressbar/core.js8
-rw-r--r--tests/unit/progressbar/events.js18
-rw-r--r--tests/unit/progressbar/methods.js12
-rw-r--r--tests/unit/progressbar/options.js38
5 files changed, 39 insertions, 39 deletions
diff --git a/tests/unit/progressbar/common.js b/tests/unit/progressbar/common.js
index baadb6d53..566b96465 100644
--- a/tests/unit/progressbar/common.js
+++ b/tests/unit/progressbar/common.js
@@ -19,6 +19,6 @@ common.testWidget( "progressbar", {
complete: null,
create: null
}
-});
+} );
} );
diff --git a/tests/unit/progressbar/core.js b/tests/unit/progressbar/core.js
index 8c09f67ae..3c5ad9e68 100644
--- a/tests/unit/progressbar/core.js
+++ b/tests/unit/progressbar/core.js
@@ -19,11 +19,11 @@ test( "markup structure", function( assert ) {
element.progressbar( "option", "value", 100 );
assert.hasClasses( value, "ui-progressbar-complete ui-widget-header ui-progressbar-value" );
equal( element.children().children().length, 0, "no overlay div" );
-});
+} );
test( "markup structure - indeterminate", function( assert ) {
expect( 5 );
- var element = $( "#progressbar" ).progressbar({ value: false }),
+ var element = $( "#progressbar" ).progressbar( { value: false } ),
children = element.children();
assert.hasClasses( element, "ui-progressbar ui-progressbar-indeterminate ui-widget ui-widget-content" );
@@ -32,7 +32,7 @@ test( "markup structure - indeterminate", function( assert ) {
assert.hasClasses( children[ 0 ], "ui-progressbar-value" );
equal( children.children( ".ui-progressbar-overlay" ).length, 1,
"Value has class ui-progressbar-overlay" );
-});
+} );
test( "accessibility", function() {
expect( 11 );
@@ -59,6 +59,6 @@ test( "accessibility", function() {
equal( element.attr( "aria-valuemin" ), 0, "aria-valuemin" );
equal( element.attr( "aria-valuemax" ), 150, "aria-valuemax" );
equal( element.attr( "aria-valuenow" ), null, "aria-valuenow" );
-});
+} );
} );
diff --git a/tests/unit/progressbar/events.js b/tests/unit/progressbar/events.js
index 7f4926466..b767e1395 100644
--- a/tests/unit/progressbar/events.js
+++ b/tests/unit/progressbar/events.js
@@ -7,7 +7,7 @@ module( "progressbar: events" );
test( "create", function() {
expect( 1 );
- $( "#progressbar" ).progressbar({
+ $( "#progressbar" ).progressbar( {
value: 5,
create: function() {
equal( $( this ).progressbar( "value" ), 5, "Correct value at create" );
@@ -15,8 +15,8 @@ test( "create", function() {
change: function() {
ok( false, "create has triggered change()" );
}
- });
-});
+ } );
+} );
test( "change", function() {
expect( 2 );
@@ -24,19 +24,19 @@ test( "change", function() {
element.one( "progressbarchange", function() {
equal( element.progressbar( "value" ), 5, "change triggered for middle value" );
- });
+ } );
element.progressbar( "value", 5 );
element.one( "progressbarchange", function() {
equal( element.progressbar( "value" ), 100, "change triggered for final value" );
- });
+ } );
element.progressbar( "value", 100 );
-});
+} );
test( "complete", function() {
expect( 5 );
var value,
changes = 0,
- element = $( "#progressbar" ).progressbar({
+ element = $( "#progressbar" ).progressbar( {
change: function() {
changes++;
equal( element.progressbar( "value" ), value, "change at " + value );
@@ -45,7 +45,7 @@ test( "complete", function() {
equal( changes, 3, "complete triggered after change and not on indeterminate" );
equal( element.progressbar( "value" ), 100, "value is 100" );
}
- });
+ } );
value = 5;
element.progressbar( "value", value );
@@ -53,6 +53,6 @@ test( "complete", function() {
element.progressbar( "value", value );
value = 100;
element.progressbar( "value", value );
-});
+} );
} );
diff --git a/tests/unit/progressbar/methods.js b/tests/unit/progressbar/methods.js
index 00de2f46e..4bc4fa65e 100644
--- a/tests/unit/progressbar/methods.js
+++ b/tests/unit/progressbar/methods.js
@@ -9,8 +9,8 @@ test( "destroy", function( assert ) {
expect( 1 );
assert.domEqual( "#progressbar", function() {
$( "#progressbar" ).progressbar().progressbar( "destroy" );
- });
-});
+ } );
+} );
test( "disable", function( assert ) {
expect( 3 );
@@ -20,16 +20,16 @@ test( "disable", function( assert ) {
assert.hasClasses( element.progressbar( "widget" ), "ui-state-disabled" );
ok( element.progressbar( "widget" ).attr( "aria-disabled" ), "element gets aria-disabled" );
assert.hasClasses( element.progressbar( "widget" ), "ui-progressbar-disabled" );
-});
+} );
test( "value", function() {
expect( 3 );
- var element = $( "<div>" ).progressbar({ value: 20 });
+ var element = $( "<div>" ).progressbar( { value: 20 } );
equal( element.progressbar( "value" ), 20, "correct value as getter" );
strictEqual( element.progressbar( "value", 30 ), element, "chainable as setter" );
equal( element.progressbar( "option", "value" ), 30, "correct value after setter" );
-});
+} );
test( "widget", function() {
expect( 2 );
@@ -37,6 +37,6 @@ test( "widget", function() {
widgetElement = element.progressbar( "widget" );
equal( widgetElement.length, 1, "one element" );
strictEqual( widgetElement[ 0 ], element[ 0 ], "same element" );
-});
+} );
} );
diff --git a/tests/unit/progressbar/options.js b/tests/unit/progressbar/options.js
index 533c15351..fb6faac9a 100644
--- a/tests/unit/progressbar/options.js
+++ b/tests/unit/progressbar/options.js
@@ -9,14 +9,14 @@ test( "{ value: 0 }, default", function() {
expect( 1 );
$( "#progressbar" ).progressbar();
equal( $( "#progressbar" ).progressbar( "value" ), 0 );
-});
+} );
// Ticket #7231 - valueDiv should be hidden when value is at 0%
test( "value: visibility of valueDiv", function() {
expect( 4 );
- var element = $( "#progressbar" ).progressbar({
+ var element = $( "#progressbar" ).progressbar( {
value: 0
- });
+ } );
ok( element.children( ".ui-progressbar-value" ).is( ":hidden" ),
"valueDiv hidden when value is initialized at 0" );
element.progressbar( "value", 1 );
@@ -28,52 +28,52 @@ test( "value: visibility of valueDiv", function() {
element.progressbar( "value", 0 );
ok( element.children( ".ui-progressbar-value" ).is( ":hidden" ),
"valueDiv hidden when value is set to 0" );
-});
+} );
test( "{ value: 5 }", function() {
expect( 1 );
- $( "#progressbar" ).progressbar({
+ $( "#progressbar" ).progressbar( {
value: 5
- });
+ } );
equal( $( "#progressbar" ).progressbar( "value" ), 5 );
-});
+} );
test( "{ value: -5 }", function() {
expect( 1 );
- $( "#progressbar" ).progressbar({
+ $( "#progressbar" ).progressbar( {
value: -5
- });
+ } );
equal( $( "#progressbar" ).progressbar( "value" ), 0,
"value constrained at min" );
-});
+} );
test( "{ value: 105 }", function() {
expect( 1 );
- $( "#progressbar" ).progressbar({
+ $( "#progressbar" ).progressbar( {
value: 105
- });
+ } );
equal( $( "#progressbar" ).progressbar( "value" ), 100,
"value constrained at max" );
-});
+} );
test( "{ value: 10, max: 5 }", function() {
expect( 1 );
- $("#progressbar").progressbar({
+ $( "#progressbar" ).progressbar( {
max: 5,
value: 10
- });
+ } );
equal( $( "#progressbar" ).progressbar( "value" ), 5,
"value constrained at max" );
-});
+} );
test( "change max below value", function() {
expect( 1 );
- $("#progressbar").progressbar({
+ $( "#progressbar" ).progressbar( {
max: 10,
value: 10
- }).progressbar( "option", "max", 5 );
+ } ).progressbar( "option", "max", 5 );
equal( $( "#progressbar" ).progressbar( "value" ), 5,
"value constrained at max" );
-});
+} );
} );