From 83e9ed9111035f95b0a50d9d613b04e8af314030 Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Wed, 7 Dec 2016 17:51:48 +0100 Subject: [PATCH] add a failing test for svg rendered via child component --- test/compiler/svg-child-component/Rect.html | 1 + test/compiler/svg-child-component/_config.js | 20 ++++++++++++++++++++ test/compiler/svg-child-component/main.html | 10 ++++++++++ 3 files changed, 31 insertions(+) create mode 100644 test/compiler/svg-child-component/Rect.html create mode 100644 test/compiler/svg-child-component/_config.js create mode 100644 test/compiler/svg-child-component/main.html diff --git a/test/compiler/svg-child-component/Rect.html b/test/compiler/svg-child-component/Rect.html new file mode 100644 index 0000000000..b9c3fae27b --- /dev/null +++ b/test/compiler/svg-child-component/Rect.html @@ -0,0 +1 @@ + diff --git a/test/compiler/svg-child-component/_config.js b/test/compiler/svg-child-component/_config.js new file mode 100644 index 0000000000..977b02407d --- /dev/null +++ b/test/compiler/svg-child-component/_config.js @@ -0,0 +1,20 @@ +export default { + skip: true, + data: { + x: 0, + y: 0, + width: 100, + height: 100 + }, + html: ``, + test ( assert, component, target ) { + const svg = target.querySelector( 'svg' ); + const rect = target.querySelector( 'rect' ); + + assert.equal( svg.namespaceURI, 'http://www.w3.org/2000/svg' ); + assert.equal( rect.namespaceURI, 'http://www.w3.org/2000/svg' ); + + component.set({ width: 150, height: 50 }); + assert.equal( target.innerHTML, `` ); + } +}; diff --git a/test/compiler/svg-child-component/main.html b/test/compiler/svg-child-component/main.html new file mode 100644 index 0000000000..226687a3d1 --- /dev/null +++ b/test/compiler/svg-child-component/main.html @@ -0,0 +1,10 @@ + + + +