From b0f6a106659bc791961c99d89527e48688c3744b Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Thu, 19 May 2016 00:55:46 +0300 Subject: [PATCH] fix spec toShow() --- spec/spec-helper.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 9c4e09da086..99fc98f1842 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -205,7 +205,8 @@ addCustomMatchers = (spec) -> element = @actual element = element.get(0) if element.jquery @message = -> return "Expected element '#{element}' or its descendants #{toOrNotTo} show." - element.style.display in ['block', 'inline-block', 'static', 'fixed'] + computedStyle = getComputedStyle(element) + computedStyle.display isnt 'none' and computedStyle.visibility is 'visible' and not element.hidden toEqualPath: (expected) -> actualPath = path.normalize(@actual)