aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-09-11 10:48:20 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-10-08 14:02:56 -0400
commit641c5ed17a302bcc7cdf395461efdfa12640fcbf (patch)
tree4cc75f5b543f8daede2b0cd04ac83afbf33a46d7 /tests
parent6169099229497aa83ba1eea0875846d52cd89eb8 (diff)
downloadjquery-ui-641c5ed17a302bcc7cdf395461efdfa12640fcbf.tar.gz
jquery-ui-641c5ed17a302bcc7cdf395461efdfa12640fcbf.zip
Checkboxradio: Style updates
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/checkboxradio/common.js2
-rw-r--r--tests/unit/checkboxradio/core.js26
-rw-r--r--tests/unit/checkboxradio/events.js4
-rw-r--r--tests/unit/checkboxradio/methods.js16
-rw-r--r--tests/unit/checkboxradio/options.js40
5 files changed, 44 insertions, 44 deletions
diff --git a/tests/unit/checkboxradio/common.js b/tests/unit/checkboxradio/common.js
index 0dd663d07..5e03cc9df 100644
--- a/tests/unit/checkboxradio/common.js
+++ b/tests/unit/checkboxradio/common.js
@@ -17,6 +17,6 @@ common.testWidget( "checkboxradio", {
// Callbacks
create: null
}
-});
+} );
} );
diff --git a/tests/unit/checkboxradio/core.js b/tests/unit/checkboxradio/core.js
index 70ed4bb69..6d4ab6a22 100644
--- a/tests/unit/checkboxradio/core.js
+++ b/tests/unit/checkboxradio/core.js
@@ -6,13 +6,13 @@ define( [
module( "Checkboxradio: core" );
test( "Checkbox - Initial class structure", function( assert ) {
expect( 2 );
- var input = $("#check"),
- label = $("label[for=check]");
+ var input = $( "#check" ),
+ label = $( "label[for=check]" );
input.checkboxradio();
assert.hasClasses( input, "ui-helper-hidden-accessible ui-checkboxradio" );
assert.hasClasses( label, "ui-button ui-widget ui-checkboxradio-label ui-corner-all" );
-});
+} );
test( "Radios - Initial class structure", function( assert ) {
expect( 6 );
@@ -22,11 +22,11 @@ test( "Radios - Initial class structure", function( assert ) {
inputs.checkboxradio();
inputs.each( function() {
assert.hasClasses( this, "ui-helper-hidden-accessible" );
- });
+ } );
labels.each( function() {
assert.hasClasses( this, "ui-button" );
- });
-});
+ } );
+} );
asyncTest( "Ensure checked after single click on checkbox label button", function( assert ) {
expect( 2 );
@@ -36,17 +36,17 @@ asyncTest( "Ensure checked after single click on checkbox label button", functio
ok( this.checked, "checked ok" );
assert.hasClasses( label, "ui-state-active" );
- });
+ } );
// Support: Opera
// Opera doesn't trigger a change event when this is done synchronously.
// This seems to be a side effect of another test, but until that can be
// tracked down, this delay will have to do.
- setTimeout(function() {
+ setTimeout( function() {
$( "#check2" ).checkboxradio( "widget" ).simulate( "click" );
start();
- });
-});
+ } );
+} );
test( "Checkbox creation requires a label, and finds it in all cases", function( assert ) {
expect( 7 );
@@ -66,7 +66,7 @@ test( "Checkbox creation requires a label, and finds it in all cases", function(
group.find( "input[type=checkbox]" ).checkboxradio();
assert.hasClasses( group.find( "label" ), "ui-button" );
} );
-});
+} );
test( "Calling checkboxradio on an unsupported element throws an error", function( assert ) {
expect( 2 );
@@ -86,7 +86,7 @@ test( "Calling checkboxradio on an unsupported element throws an error", functio
error,
"Proper error thrown"
);
-});
+} );
test( "Calling checkboxradio on an input with no label throws an error", function( assert ) {
expect( 1 );
var error = new Error( "No label found for checkboxradio widget" );
@@ -97,6 +97,6 @@ test( "Calling checkboxradio on an input with no label throws an error", functio
error,
"Proper error thrown"
);
-});
+} );
} );
diff --git a/tests/unit/checkboxradio/events.js b/tests/unit/checkboxradio/events.js
index ad7f1e75f..498491bd1 100644
--- a/tests/unit/checkboxradio/events.js
+++ b/tests/unit/checkboxradio/events.js
@@ -20,7 +20,7 @@ asyncTest(
form.get( 0 ).reset();
- setTimeout(function() {
+ setTimeout( function() {
assert.hasClasses( widget, "ui-state-active" );
start();
}, 1 );
@@ -33,7 +33,7 @@ asyncTest( "Checkbox shows focus when using keyboard navigation", function( asse
label = $( "label[for='check']" );
assert.lacksClasses( label, "ui-state-focus" );
check.focus();
- setTimeout(function() {
+ setTimeout( function() {
assert.hasClasses( label, "ui-state-focus" );
start();
} );
diff --git a/tests/unit/checkboxradio/methods.js b/tests/unit/checkboxradio/methods.js
index c0ce9fde6..a749ef450 100644
--- a/tests/unit/checkboxradio/methods.js
+++ b/tests/unit/checkboxradio/methods.js
@@ -46,14 +46,14 @@ $.each( [ "checkbox", "radio" ], function( index, value ) {
assert.lacksClasses( icon, "ui-icon-check" );
}
assert.lacksClasses( widget, "ui-checkboxradio-checked" );
- });
+ } );
- test( value + ": destroy", function( assert ){
+ test( value + ": destroy", function( assert ) {
expect( 1 );
assert.domEqual( "#" + value + "-method-destroy", function() {
$( "#" + value + "-method-destroy" ).checkboxradio().checkboxradio( "destroy" );
- });
- });
+ } );
+ } );
test( value + ": disable / enable", function( assert ) {
expect( 4 );
@@ -69,9 +69,9 @@ $.each( [ "checkbox", "radio" ], function( index, value ) {
assert.lacksClasses( widget, "ui-state-disabled" );
strictEqual( input.is( ":disabled" ), false,
value + " has disabled prop removed when enable is called" );
- });
+ } );
- test( value + ": widget returns the label", function(){
+ test( value + ": widget returns the label", function() {
var input = $( "#" + value + "-method-refresh" ),
label = $( "#" + value + "-method-refresh-label" );
@@ -80,7 +80,7 @@ $.each( [ "checkbox", "radio" ], function( index, value ) {
input.checkboxradio();
strictEqual( input.checkboxradio( "widget" )[ 0 ], label[ 0 ],
"widget method returns label" );
- });
+ } );
} );
@@ -92,6 +92,6 @@ test( "Input wrapped in a label preserved on refresh", function() {
input.checkboxradio( "refresh" );
strictEqual( input.parent()[ 0 ], element[ 0 ], "Input preserved" );
-});
+} );
} );
diff --git a/tests/unit/checkboxradio/options.js b/tests/unit/checkboxradio/options.js
index 1998ff54e..734bb2e17 100644
--- a/tests/unit/checkboxradio/options.js
+++ b/tests/unit/checkboxradio/options.js
@@ -22,9 +22,9 @@ function assertEnabled( checkbox, assert ) {
test( "disabled", function( assert ) {
var checkbox = $( "#checkbox-option-disabled" );
expect( 6 );
- checkbox.checkboxradio({
+ checkbox.checkboxradio( {
disabled: true
- });
+ } );
assertDisabled( checkbox, assert );
@@ -33,7 +33,7 @@ test( "disabled", function( assert ) {
checkbox.checkboxradio( "option", "disabled", true );
assertDisabled( checkbox, assert );
-});
+} );
test( "disabled - prop true on init", function( assert ) {
expect( 2 );
var checkbox = $( "#checkbox-option-disabled" );
@@ -42,17 +42,17 @@ test( "disabled - prop true on init", function( assert ) {
checkbox.checkboxradio();
assertDisabled( checkbox, assert );
-});
+} );
test( "disabled - explicit null value, checks the DOM", function( assert ) {
expect( 2 );
var checkbox = $( "#checkbox-option-disabled" );
checkbox.prop( "disabled", true );
- checkbox.checkboxradio({
+ checkbox.checkboxradio( {
disabled: null
- });
+ } );
assertDisabled( checkbox, assert );
-});
+} );
function assertNoIcon( checkbox ) {
strictEqual( checkbox.checkboxradio( "widget" ).find( "span.ui-icon" ).length, 0,
@@ -73,9 +73,9 @@ test( "icon - false on init", function() {
expect( 1 );
- checkbox.checkboxradio({ icon: false });
+ checkbox.checkboxradio( { icon: false } );
assertNoIcon( checkbox );
-});
+} );
test( "icon - default unchecked", function( assert ) {
var checkbox = $( "#checkbox-option-icon" );
@@ -84,8 +84,8 @@ test( "icon - default unchecked", function( assert ) {
checkbox.checkboxradio();
assertIcon( checkbox, false, assert );
-});
-test( "icon", function( assert ){
+} );
+test( "icon", function( assert ) {
var checkbox = $( "#checkbox-option-icon" );
expect( 8 );
@@ -108,7 +108,7 @@ test( "icon", function( assert ){
checkbox.checkboxradio( "option", "icon", true );
assertIcon( checkbox, false, assert );
-});
+} );
test( "label - default", function() {
var checkbox = $( "#checkbox-option-label" ),
@@ -122,12 +122,12 @@ test( "label - default", function() {
"checkbox label", "When no value passed on create text from dom is used for option" );
strictEqual( widget.text(),
" checkbox label", "When no value passed on create text from dom is used in dom" );
-});
+} );
test( "label - explicit value", function() {
expect( 5 );
- var checkbox = $( "#checkbox-option-label" ).checkboxradio({
+ var checkbox = $( "#checkbox-option-label" ).checkboxradio( {
label: "foo"
- }),
+ } ),
widget = checkbox.checkboxradio( "widget" ),
icon = widget.find( ".ui-icon" ),
iconSpace = widget.find( ".ui-checkboxradio-icon-space" );
@@ -142,7 +142,7 @@ test( "label - explicit value", function() {
"Icon space is preserved when label is set on init when wrapped in label" );
strictEqual( $( "#checkbox-option-label" ).length, 1,
"Element is preserved when label is set on init when wrapped in label" );
-});
+} );
test( "label - explicit null value", function() {
var checkbox = $( "#checkbox-option-label" ),
@@ -153,16 +153,16 @@ test( "label - explicit null value", function() {
// We are testing the default here because the default null is a special value which means to check
// the DOM, so we need to make sure this happens correctly checking the options should never return
// null. It should always be true or false
- checkbox.checkboxradio({
+ checkbox.checkboxradio( {
label: null
- });
+ } );
widget = checkbox.checkboxradio( "widget" );
strictEqual( checkbox.checkboxradio( "option", "label" ),
"checkbox label", "When null is passed on create text from dom is used for option" );
strictEqual( widget.text(),
" checkbox label", "When null is passed on create text from dom is used in dom" );
-});
+} );
test( "label", function() {
var checkbox = $( "#checkbox-option-label" ),
@@ -184,6 +184,6 @@ test( "label", function() {
strictEqual( widget.text(),
" bar", "When null is passed text from dom is used in dom" );
-});
+} );
} );