Skip to content

Commit

Permalink
Remove tests referencing mm-icon primaryColor
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuwen Qian committed Sep 14, 2015
1 parent d9da97a commit 29d3c68
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
13 changes: 0 additions & 13 deletions test/mm-checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@
}, 150);
});

it("the inner icon color should be 'Colors.D0' if default", function(done) {
var a = document.querySelector("#cbx"),
aInner = Polymer.dom(a.root).querySelector("mm-icon").$.iconGlyph,
expectedColor = TestHelper.hexToRgb(Colors.D0),
color = null;

setTimeout(function() {
color = TestHelper.getRgbNoSpace(aInner, "color");
color.should.equal(expectedColor);
done();
}, 150);
});

it("should set icon primaryColor if custom icon is set", function(done) {
var a = document.querySelector("#cbxIcon"),
aInner = Polymer.dom(a.root).querySelector("mm-icon"),
Expand Down
30 changes: 0 additions & 30 deletions test/mm-icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
a.nodeName.should.equal("MM-ICON");
});

it("should have a unique id", function() {
var a = new Strand.Icon();
should.exist(a.uid);
});

it("should have a default width and height of 28px by 28px", function(done) {
var a = document.querySelector("#plus"),
aInner = Polymer.dom(a.root).querySelector("#iconGlyph"),
Expand All @@ -55,31 +50,6 @@
}, 150);
});

it("should have the correct primaryColor", function(done) {
var a = document.querySelector("#alerts"),
aInner = Polymer.dom(a.root).querySelector("#iconGlyph"),
expectedColor = TestHelper.hexToRgb("#00FF00"),
color = null;

a.primaryColor = expectedColor;

setTimeout(function() {
color = TestHelper.getRgbNoSpace(aInner, "color");
color.should.equal(expectedColor);
done();
}, 150);
});

it("should have a hover class which matches it's uid", function() {
var a = document.querySelector("#geoHover"),
styleNodes = Polymer.dom(a.root).querySelector("style[no-shim]"),
expectedHoverClass = "._mm_icon." + a.uid + ":hover{color:" + a.hoverColor + "}",
tc = styleNodes.textContent.replace(/\s/ig, "");
hoverClass = tc.indexOf(expectedHoverClass) !== -1;

hoverClass.should.equal(true);
});

});

</script>
Expand Down

0 comments on commit 29d3c68

Please sign in to comment.