1
0
Fork 0

Fixed tests for new graphviwer toolbox layout

This commit is contained in:
Michael Hackstein 2014-02-04 09:21:03 +01:00
parent 4dc635e59c
commit c83f4621c1
2 changed files with 11 additions and 7 deletions

View File

@ -92,9 +92,8 @@ var uiMatchers = uiMatchers || {};
expect(box).toBeOfClass("btn-group-vertical"); expect(box).toBeOfClass("btn-group-vertical");
expect(box).toBeOfClass("toolbox"); expect(box).toBeOfClass("toolbox");
_.each(box.children, function(btn) { _.each(box.children, function(btn) {
expect(btn).toBeTag("button"); expect(btn).toBeTag("div");
expect(btn).toBeOfClass("btn"); expect(btn).toBeOfClass("gv_action_button");
expect(btn).toBeOfClass("btn-icon");
}); });
return true; return true;
}, },

View File

@ -179,13 +179,18 @@
this.addMatchers({ this.addMatchers({
toConformToToolbox: function() { toConformToToolbox: function() {
var box = this.actual, var box = this.actual,
icon = $("h6", $(box))[0],
title = $("h6", $(box))[1],
foundActive = false, foundActive = false,
failed = false; failed = false;
_.each(box.children, function(btn) { _.each(box.children, function(btn) {
expect(btn).toBeTag("button"); expect(btn).toBeTag("div");
expect(btn).toBeOfClass("btn btn-icon"); expect(btn).toBeOfClass("gv_action_button");
expect(btn).toBeOfClass("btn-icon"); expect(icon).toBeTag("h6");
expect(btn).toBeOfClass("gv-icon-btn"); expect(icon).toBeOfClass("fa");
expect(icon).toBeOfClass("gv_icon_icon");
expect(title).toBeTag("h6");
expect(title).toBeOfClass("gv_button_title");
if ($(btn).hasClass("active")) { if ($(btn).hasClass("active")) {
if (foundActive) { if (foundActive) {
failed = true; failed = true;