[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:
Joffrey JAFFEUX
2017-10-19 17:34:56 -07:00
committed by GitHub
parent 24e3e321e1
commit 4d041d5b87
3 changed files with 26 additions and 2 deletions
@@ -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');
});
}
});