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