button-test.js revision 62042090abb1c33eb3b9bc1a00f635913706a867
ArrayAssert = Y.ArrayAssert,
// -- Suite --------------------------------------------------------------------
// -- Methods ----------------------------------------------------------------
name: 'Methods',
setUp : function () {
srcNode : '#foo',
type : 'toggle'
});
},
tearDown: function () {
},
'button.getNode() should return a Y.Node instance': function () {
},
'button.simulate(click) should make `selected` attribute = true and `yui3-button-selected` class': function () {
// Ensure the button is unselected by default
// Simulate the button click
// Now make sure it is selected and has all the approriate attributes
},
'button.select() should set the `selected` attribute to `true`': function () {
},
'button.unselect() should set the `selected` attribute to `false`': function () {
},
'button.disable() should set the `disable` attribute to `true`': function () {
},
'button.enable() should set the `disabled` attribute to `false`': function () {
}
}));
// -- Rendering ----------------------------------------------------------------
name: 'Render',
setUp : function () {
srcNode : '#foo',
type: 'toggle'
});
srcNode : '#bar'
});
},
tearDown: function () {
},
'button should have `yui3-button` class': function () {
},
'buttonA should have `toggle` role': function () {
},
'buttonB should have `button` role': function () {
},
}
}));
// -- Attributes ----------------------------------------------------------------
name: 'Attributes',
setUp : function () {
srcNode : '#foo'
});
},
tearDown: function () {
},
'setting label attribute should set innerHTML': function () {
var label;
label = 'foobar';
label = 'fizzbuzz';
},
'setting disabled=`true` attribute should add class `yui3-button-disabled`': function () {
// Ensure button is enabled by default
// Disable button
// Ensure button is enabled by default
},
'setting disabled=`false` attribute should remove class `yui3-button-disabled`': function () {
// Disable button
// Ensure button is disabled
// Disable button
// Ensure button is enabled
},
'setting type=`toggle` attribute should make button toggle-able': function () {
// Ensure button is unselected by default
// Ensure it is a push button
// Click and check selected state (false)
// Click and check selected state (false)
// Set to toggle
// Click and check selected state (true)
// Click and check selected state (false)
// Set back to type='push'
// Click and check selected state (false)
// Click and check selected state (false)
}
}));
}, '@VERSION@', {
});