diff --git a/test/runtime/samples/component-if-placement/Component.html b/test/runtime/samples/component-if-placement/Component.html new file mode 100644 index 000000000000..e229cff5cce6 --- /dev/null +++ b/test/runtime/samples/component-if-placement/Component.html @@ -0,0 +1,3 @@ +{{#if true}} + Component +{{/if}} diff --git a/test/runtime/samples/component-if-placement/_config.js b/test/runtime/samples/component-if-placement/_config.js new file mode 100644 index 000000000000..9b0a74df1985 --- /dev/null +++ b/test/runtime/samples/component-if-placement/_config.js @@ -0,0 +1,20 @@ +export default { + data: { + flag: true + }, + + html: ` + Before + Component + After + `, + + test ( assert, component, target ) { + component.set( { flag: false } ); + assert.htmlEqual( target.innerHTML, ` + Before + Component + After + `); + } +}; diff --git a/test/runtime/samples/component-if-placement/main.html b/test/runtime/samples/component-if-placement/main.html new file mode 100644 index 000000000000..abb45738ba13 --- /dev/null +++ b/test/runtime/samples/component-if-placement/main.html @@ -0,0 +1,14 @@ +Before +{{#if flag}} + +{{else}} + +{{/if}} +After + +