diff options
| author | Misko Hevery | 2010-02-04 13:27:56 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-02-04 13:27:56 -0800 |
| commit | 1da18e73a4d09b2a1ace92a4094eeba014eb7dc4 (patch) | |
| tree | 5f679ca5b575f29cd5938099a5dab37aa968c85f /test/testabilityPatch.js | |
| parent | 5dd43b85e73ca1708e7fd85094b533b02266a79a (diff) | |
| download | angular.js-1da18e73a4d09b2a1ace92a4094eeba014eb7dc4.tar.bz2 | |
consider widget errors only when widgets are visible
Diffstat (limited to 'test/testabilityPatch.js')
| -rw-r--r-- | test/testabilityPatch.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 44199b66..cb1432f7 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -96,15 +96,19 @@ function decode64(base64){ configureJQueryPlugins(); +function isVisible(node) { + var display = $(node).css('display'); + if (display == 'block') display = ""; + return display != 'none'; +} + function assertHidden(node) { var display = node.css('display'); - assertEquals("Node should be hidden but vas visible: " + node.sortedHtml(), 'none', display); + assertFalse("Node should be hidden but vas visible: " + node.sortedHtml(), isVisible(node)); } function assertVisible(node) { - var display = node.css('display'); - if (display == 'block') display = ""; - assertEquals("Node should be visible but vas hidden: " + node.sortedHtml(), '', display); + assertTrue("Node should be visible but vas hidden: " + node.sortedHtml(), isVisible(node)); } function assertJsonEquals(expected, actual) { |
