From b55797666a7ee9a98960603a152410951939aa6b Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Thu, 4 May 2017 09:23:09 -0400 Subject: [PATCH] failing test for #561 --- .../component-yield-placement/Modal.html | 6 +++++ .../component-yield-placement/_config.js | 25 +++++++++++++++++++ .../component-yield-placement/main.html | 15 +++++++++++ 3 files changed, 46 insertions(+) create mode 100644 test/runtime/samples/component-yield-placement/Modal.html create mode 100644 test/runtime/samples/component-yield-placement/_config.js create mode 100644 test/runtime/samples/component-yield-placement/main.html diff --git a/test/runtime/samples/component-yield-placement/Modal.html b/test/runtime/samples/component-yield-placement/Modal.html new file mode 100644 index 000000000000..0085a3ef7f97 --- /dev/null +++ b/test/runtime/samples/component-yield-placement/Modal.html @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-yield-placement/_config.js b/test/runtime/samples/component-yield-placement/_config.js new file mode 100644 index 000000000000..6e5a7d4b7355 --- /dev/null +++ b/test/runtime/samples/component-yield-placement/_config.js @@ -0,0 +1,25 @@ +export default { + data: { + showModal: true + }, + + html: ` + + + + `, + + test ( assert, component, target, window ) { + const button = target.querySelector( 'button' ); + const click = new window.MouseEvent( 'click' ); + + button.dispatchEvent( click ); + + assert.htmlEqual( target.innerHTML, ` + + `); + } +}; diff --git a/test/runtime/samples/component-yield-placement/main.html b/test/runtime/samples/component-yield-placement/main.html new file mode 100644 index 000000000000..ac8366a9c7a3 --- /dev/null +++ b/test/runtime/samples/component-yield-placement/main.html @@ -0,0 +1,15 @@ +{{#if showModal}} + +

Hello!

+
+{{else}} + +{{/if}} + + \ No newline at end of file