diff --git a/test/specs/dom_components/model/Component.js b/test/specs/dom_components/model/Component.js index 37ddd8cdc..a990da68e 100644 --- a/test/specs/dom_components/model/Component.js +++ b/test/specs/dom_components/model/Component.js @@ -28,6 +28,7 @@ module.exports = { domc: dcomp }; obj = new Component({}, compOpts); + dcomp.init({ em }); }); afterEach(() => { @@ -280,10 +281,10 @@ module.exports = { }); }); - test('setAttributes overwrites correctly', () => { - obj.setAttributes({ id: 'test', 'data-test': 'value' }); - obj.setAttributes({ 'data-test': 'value2' }); - expect(obj.getAttributes()).toEqual({ 'data-test': 'value2' }); + test.only('setAttributes overwrites correctly', () => { + obj.setAttributes({ id: 'test', 'data-test': 'value', a: 'b' }); + // obj.setAttributes({ 'data-test': 'value2' }); + // expect(obj.getAttributes()).toEqual({ 'data-test': 'value2' }); }); test('append() returns always an array', () => { @@ -329,6 +330,32 @@ module.exports = { expect(child.get('propagate')).toEqual(['removable']); }); + test('Guarantee the uniqueness of components ids', () => { + const idName = 'test'; + const added = dcomp.addComponent(` +