From 22cb6737fdcddf3cb7d4c01cf05d609375b83e1d Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 30 Nov 2016 21:58:32 +0100 Subject: [PATCH] Fix tests --- test/specs/style_manager/view/PropertyColorView.js | 4 ++-- test/specs/style_manager/view/PropertyIntegerView.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/specs/style_manager/view/PropertyColorView.js b/test/specs/style_manager/view/PropertyColorView.js index dcadbc045..a35bc55ea 100644 --- a/test/specs/style_manager/view/PropertyColorView.js +++ b/test/specs/style_manager/view/PropertyColorView.js @@ -58,7 +58,7 @@ define([path + 'PropertyColorView', 'StyleManager/model/Property', 'DomComponent it('Inputs rendered', function() { var prop = view.el; prop.querySelector('input[type=text]').should.be.ok; - prop.querySelector('.color-picker').should.be.ok; + prop.querySelector('.field-color-picker').should.be.ok; }); it('Inputs should exist', function() { @@ -161,4 +161,4 @@ define([path + 'PropertyColorView', 'StyleManager/model/Property', 'DomComponent } }; -}); \ No newline at end of file +}); diff --git a/test/specs/style_manager/view/PropertyIntegerView.js b/test/specs/style_manager/view/PropertyIntegerView.js index e3b2983d4..5a6a2d602 100644 --- a/test/specs/style_manager/view/PropertyIntegerView.js +++ b/test/specs/style_manager/view/PropertyIntegerView.js @@ -21,6 +21,7 @@ define([path + 'PropertyIntegerView', 'StyleManager/model/Property', 'DomCompone var units = ['px', '%', 'em']; var minValue = -15; var maxValue = 15; + var unitsElSel = '.field-units select'; before(function () { $fixtures = $("#fixtures"); @@ -63,16 +64,16 @@ define([path + 'PropertyIntegerView', 'StyleManager/model/Property', 'DomCompone it('Inputs rendered', function() { var prop = view.el; prop.querySelector('input[type=text]').should.be.ok; - prop.querySelector('select.unit').should.be.ok; + prop.querySelector(unitsElSel).should.be.ok; }); it('Units rendered', function() { - var select = view.el.querySelector('select.unit'); + var select = view.el.querySelector(unitsElSel); select.children.length.should.equal(units.length); }); it('Units rendered correctly', function() { - var children = view.el.querySelector('select.unit').children; + var children = view.el.querySelector(unitsElSel).children; children[0].textContent.should.equal(units[0]); children[1].textContent.should.equal(units[1]); children[2].textContent.should.equal(units[2]); @@ -205,4 +206,4 @@ define([path + 'PropertyIntegerView', 'StyleManager/model/Property', 'DomCompone } }; -}); \ No newline at end of file +});