From c3bcee8b70ddc571ad61985fc43f04006e35cee7 Mon Sep 17 00:00:00 2001 From: Umang Galaiya Date: Sat, 13 Jul 2019 14:30:02 +0530 Subject: [PATCH] [Test] Add test for class with spread attributes --- .../samples/class-with-spread/_config.js | 22 +++++++++++++++++++ .../samples/class-with-spread/main.html | 1 + 2 files changed, 23 insertions(+) create mode 100644 test/runtime/samples/class-with-spread/_config.js create mode 100644 test/runtime/samples/class-with-spread/main.html diff --git a/test/runtime/samples/class-with-spread/_config.js b/test/runtime/samples/class-with-spread/_config.js new file mode 100644 index 0000000000..c26a534d2a --- /dev/null +++ b/test/runtime/samples/class-with-spread/_config.js @@ -0,0 +1,22 @@ +export default { + data: { + myClass: 'one two', + attributes: { + role: 'button' + } + }, + html: `
`, + + test ( assert, component, target, window ) { + component.set({ + attributes: { + 'aria-label': 'Test' + }, + myClass: 'one' + }); + + assert.htmlEqual( target.innerHTML, ` +
+ ` ); + } +}; diff --git a/test/runtime/samples/class-with-spread/main.html b/test/runtime/samples/class-with-spread/main.html new file mode 100644 index 0000000000..dab73757c9 --- /dev/null +++ b/test/runtime/samples/class-with-spread/main.html @@ -0,0 +1 @@ +