Browse Source

Add Component to StyleManager tests

pull/36/head
Artur Arseniev 10 years ago
parent
commit
3a77338bf8
  1. 11
      test/specs/style_manager/view/PropertyView.js

11
test/specs/style_manager/view/PropertyView.js

@ -1,6 +1,6 @@
var path = 'StyleManager/view/'; var path = 'StyleManager/view/';
define([path + 'PropertyView', 'StyleManager/model/Property'], define([path + 'PropertyView', 'StyleManager/model/Property', 'DomComponents/model/Component'],
function(PropertyView, Property) { function(PropertyView, Property, Component) {
return { return {
run : function(){ run : function(){
@ -18,6 +18,7 @@ define([path + 'PropertyView', 'StyleManager/model/Property'],
}); });
beforeEach(function () { beforeEach(function () {
component = new Component();
model = new Property(); model = new Property();
view = new PropertyView({ view = new PropertyView({
model: model model: model
@ -40,6 +41,12 @@ define([path + 'PropertyView', 'StyleManager/model/Property'],
prop.querySelector('.label').should.be.ok; prop.querySelector('.label').should.be.ok;
}); });
it('Rendered correctly', function() {
var prop = view.el;
$fixture.get(0).querySelector('.property').should.be.ok;
prop.querySelector('.label').should.be.ok;
});
}); });
} }
}; };

Loading…
Cancel
Save