From f6c0d674b0b4c3085cf371c116fa0c744ed9efe6 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 26 Oct 2016 13:17:29 +0200 Subject: [PATCH] Add trait test --- test/specs/dom_components/model/Component.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/specs/dom_components/model/Component.js b/test/specs/dom_components/model/Component.js index 44ecbc13e..a6b561a61 100644 --- a/test/specs/dom_components/model/Component.js +++ b/test/specs/dom_components/model/Component.js @@ -33,6 +33,15 @@ define(['DomComponents/model/Component', sAttr.should.deep.equal(eAttr); }); + it('Clones correctly with traits', function() { + obj.get('traits').at(0).set('value', 'testTitle'); + var cloned = obj.clone(); + cloned.set('stylable', 0); + cloned.get('traits').at(0).set('value', 'testTitle2'); + obj.get('traits').at(0).get('value').should.equal('testTitle'); + obj.get('stylable').should.equal(true); + }); + it('Has expected name', function() { obj.cid = 'c999'; obj.getName().should.equal('Box 999');