From 8fc6d850cc82a592e732eb2534a41a6cc934b13e Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 6 Jun 2018 16:52:01 -0400 Subject: [PATCH] failing test for #1527 --- .../Span.html | 1 + .../_config.js | 26 +++++++++++++++++++ .../main.html | 14 ++++++++++ 3 files changed, 41 insertions(+) create mode 100644 test/runtime/samples/nested-transition-if-block-not-remounted/Span.html create mode 100644 test/runtime/samples/nested-transition-if-block-not-remounted/_config.js create mode 100644 test/runtime/samples/nested-transition-if-block-not-remounted/main.html diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/Span.html b/test/runtime/samples/nested-transition-if-block-not-remounted/Span.html new file mode 100644 index 0000000000..b16b370950 --- /dev/null +++ b/test/runtime/samples/nested-transition-if-block-not-remounted/Span.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/_config.js b/test/runtime/samples/nested-transition-if-block-not-remounted/_config.js new file mode 100644 index 0000000000..128a518134 --- /dev/null +++ b/test/runtime/samples/nested-transition-if-block-not-remounted/_config.js @@ -0,0 +1,26 @@ +export default { + data: { + x: true, + value: 'one' + }, + + html: ` +
+ + x +
+ `, + + nestedTransitions: true, + + test(assert, component, target, window, raf) { + const div = target.querySelector('div'); + const { appendChild, insertBefore } = div; + + div.appendChild = div.insertBefore = () => { + throw new Error('DOM was mutated'); + }; + + component.set({ value: 'two' }); + }, +}; diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/main.html b/test/runtime/samples/nested-transition-if-block-not-remounted/main.html new file mode 100644 index 0000000000..ad8b2454a8 --- /dev/null +++ b/test/runtime/samples/nested-transition-if-block-not-remounted/main.html @@ -0,0 +1,14 @@ +
+ {#if x} + + x + {/if} +
+ + \ No newline at end of file