From 05d23f61017c7411c459c5a04f5be771347bb2a6 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 15 Mar 2018 14:04:26 -0400 Subject: [PATCH] failing test for #1240 --- .../_config.js | 26 +++++++++++++++++++ .../main.html | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 test/runtime/samples/each-block-deconflict-name-context/_config.js create mode 100644 test/runtime/samples/each-block-deconflict-name-context/main.html diff --git a/test/runtime/samples/each-block-deconflict-name-context/_config.js b/test/runtime/samples/each-block-deconflict-name-context/_config.js new file mode 100644 index 0000000000..c4b9deb32e --- /dev/null +++ b/test/runtime/samples/each-block-deconflict-name-context/_config.js @@ -0,0 +1,26 @@ +export default { + data: { + foo: { + bar: ['x', 'y', 'z'] + } + }, + + html: ` + + + + `, + + test(assert, component, target, window) { + const inputs = target.querySelectorAll('input'); + + inputs[1].value = 'w'; + inputs[1].dispatchEvent(new window.MouseEvent('input')); + + assert.deepEqual(component.get(), { + foo: { + bar: ['x', 'w', 'z'] + } + }); + } +}; diff --git a/test/runtime/samples/each-block-deconflict-name-context/main.html b/test/runtime/samples/each-block-deconflict-name-context/main.html new file mode 100644 index 0000000000..08730e1e01 --- /dev/null +++ b/test/runtime/samples/each-block-deconflict-name-context/main.html @@ -0,0 +1,3 @@ +{{#each foo.bar as bar}} + +{{/each}}