mirror of
https://github.com/pebble-dev/clay.git
synced 2026-09-01 14:47:37 -04:00
change "value" to "defaultValue"
This commit is contained in:
@@ -18,7 +18,7 @@ describe('component - color', function() {
|
||||
type: 'color',
|
||||
sunlight: true,
|
||||
id: '1',
|
||||
value: 'ff0000'
|
||||
defaultValue: 'ff0000'
|
||||
}
|
||||
]);
|
||||
var colorItem = clayConfig.getItemById('1');
|
||||
@@ -41,7 +41,7 @@ describe('component - color', function() {
|
||||
type: 'color',
|
||||
sunlight: false,
|
||||
id: '1',
|
||||
value: 'ff0000'
|
||||
defaultValue: 'ff0000'
|
||||
}
|
||||
]);
|
||||
var colorItem = clayConfig.getItemById('1');
|
||||
|
||||
@@ -8,7 +8,7 @@ describe('component - color', function() {
|
||||
var clayConfig = fixture.clayConfig([
|
||||
{
|
||||
type: 'select',
|
||||
value: 'value-1',
|
||||
defaultValue: 'value-1',
|
||||
options: [
|
||||
{ label: 'label 1', value: 'value-1' },
|
||||
{ label: 'label 2', value: 'value-2' }
|
||||
|
||||
@@ -87,7 +87,7 @@ describe('ClayConfig', function() {
|
||||
it('returns the correct settings', function() {
|
||||
var clayConfig = fixtures.clayConfig(
|
||||
[
|
||||
{type: 'input', appKey: 'test1', value: 'not this'},
|
||||
{type: 'input', appKey: 'test1', defaultValue: 'default val'},
|
||||
{type: 'select', appKey: 'test2', options: [
|
||||
{label: 'label-1', value: 'val-1'},
|
||||
{label: 'label-2', value: 'val-2'}
|
||||
@@ -97,11 +97,17 @@ describe('ClayConfig', function() {
|
||||
true,
|
||||
true,
|
||||
{
|
||||
test1: 'val-1' // set one of the values via settings
|
||||
test2: 'val-2' // set one of the values via settings
|
||||
}
|
||||
);
|
||||
|
||||
clayConfig.getItemByAppKey('test2').set('val-2');
|
||||
assert.deepEqual(clayConfig.getSettings(), {
|
||||
test1: 'default val',
|
||||
test2: 'val-2',
|
||||
test3: false
|
||||
});
|
||||
|
||||
clayConfig.getItemByAppKey('test1').set('val-1');
|
||||
clayConfig.getItemByAppKey('test3').set(true);
|
||||
|
||||
assert.deepEqual(clayConfig.getSettings(), {
|
||||
|
||||
Reference in New Issue
Block a user