mirror of
https://github.com/pebble-dev/clay.git
synced 2026-09-03 23:57:43 -04:00
add radio component
This commit is contained in:
@@ -7,7 +7,7 @@ var fixture = require('../../fixture');
|
||||
describe('manipulators', function() {
|
||||
|
||||
/**
|
||||
* @param {string} itemType
|
||||
* @param {string|Clay~ConfigItem} itemType
|
||||
* @param {*} value
|
||||
* @param {*} [expected]
|
||||
* @return {void}
|
||||
@@ -31,7 +31,7 @@ describe('manipulators', function() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} itemType
|
||||
* @param {string|Clay~ConfigItem} itemType
|
||||
* @return {void}
|
||||
*/
|
||||
function testDisable(itemType) {
|
||||
@@ -85,6 +85,23 @@ describe('manipulators', function() {
|
||||
testEnable('toggle');
|
||||
});
|
||||
|
||||
describe('radio', function() {
|
||||
var item = {
|
||||
type: 'radio',
|
||||
clayId: 1,
|
||||
options: [
|
||||
{ label: '1', value: 'one' },
|
||||
{ label: '2', value: 'two' },
|
||||
{ label: '3', value: 'three "quote' }
|
||||
]
|
||||
};
|
||||
testSetGet(item, 'one');
|
||||
testSetGet(item, 'two');
|
||||
testSetGet(item, 'three "quote');
|
||||
testDisable(item);
|
||||
testEnable(item);
|
||||
});
|
||||
|
||||
describe('color', function() {
|
||||
testSetGet('color', 'FF0000', 0xff0000);
|
||||
testSetGet('color', '#FF0000', 0xff0000);
|
||||
|
||||
Reference in New Issue
Block a user