mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-30 05:46:57 -04:00
Allow floats in the slider component and update docs
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
var assert = require('chai').assert;
|
||||
var fixture = require('../../fixture');
|
||||
|
||||
describe('component - select', function() {
|
||||
describe('component - slider', function() {
|
||||
it('sets the value display to the correct value on set', function() {
|
||||
var clayConfig = fixture.clayConfig(['slider']);
|
||||
var sliderItem = clayConfig.getItemsByType('slider')[0];
|
||||
@@ -55,4 +55,14 @@ describe('component - select', function() {
|
||||
$valueDisplay.set('value', 75).trigger('change');
|
||||
assert.strictEqual($slider.get('value'), '75');
|
||||
});
|
||||
|
||||
it('sets the precision correctly', function() {
|
||||
var clayConfig = fixture.clayConfig([{
|
||||
type: 'slider',
|
||||
step: 0.25
|
||||
}]);
|
||||
var sliderItem = clayConfig.getItemsByType('slider')[0];
|
||||
|
||||
assert.strictEqual(sliderItem.precision, 2);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user