[FIX] Fix wizard spec
This commit introduces a mutation on input value given to select-box-kit when value is empty. The refactoring required to avoid this would be too heavy atm, but ultimately we would want to avoid this.
This commit is contained in:
@@ -222,3 +222,20 @@ componentTest('with no value and no none', {
|
||||
// andThen(() => assert.equal(selectBox().rows.length, 1) );
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
componentTest('with empty string as value', {
|
||||
template: '{{combo-box content=items value=value}}',
|
||||
beforeEach() {
|
||||
this.set('items', ['evil', 'trout', 'hat']);
|
||||
this.set('value', '');
|
||||
},
|
||||
|
||||
test(assert) {
|
||||
expandSelectBox('.combobox');
|
||||
|
||||
andThen(() => {
|
||||
assert.equal(selectBox('.combobox').header.name(), 'evil', 'it sets the first row as value');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user