diff --git a/test/generator/samples/select-one-way-bind/_config.js b/test/generator/samples/select-one-way-bind/_config.js new file mode 100644 index 0000000000..7fd1f668f9 --- /dev/null +++ b/test/generator/samples/select-one-way-bind/_config.js @@ -0,0 +1,19 @@ +export default { + 'skip-ssr': true, + + data: { + foo: 'a' + }, + + test ( assert, component, target ) { + const options = target.querySelectorAll( 'option' ); + + assert.equal( options[0].selected, true ); + assert.equal( options[1].selected, false ); + + component.set( { foo: 'b' } ); + + assert.equal( options[0].selected, false ); + assert.equal( options[1].selected, true ); + } +}; diff --git a/test/generator/samples/select-one-way-bind/main.html b/test/generator/samples/select-one-way-bind/main.html new file mode 100644 index 0000000000..9072a822b8 --- /dev/null +++ b/test/generator/samples/select-one-way-bind/main.html @@ -0,0 +1,4 @@ +