From 4be7612079f34c8b95c82f24b822e2ae06c82270 Mon Sep 17 00:00:00 2001 From: Chirayu Krishnappa Date: Tue, 6 Aug 2013 21:53:51 -0700 Subject: test(matchers): support 'not' text in toBeHidden matcher --- test/matchers.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/matchers.js b/test/matchers.js index ef89e3ee..b7d336b7 100644 --- a/test/matchers.js +++ b/test/matchers.js @@ -40,11 +40,13 @@ beforeEach(function() { toBeDirty: cssMatcher('ng-dirty', 'ng-pristine'), toBePristine: cssMatcher('ng-pristine', 'ng-dirty'), toBeShown: function() { - this.message = valueFn("Expected element to not have 'ng-hide' class"); + this.message = valueFn( + "Expected element " + (this.isNot ? "": "not ") + "to have 'ng-hide' class"); return !isNgElementHidden(this.actual); }, toBeHidden: function() { - this.message = valueFn("Expected element to have 'ng-hide' class"); + this.message = valueFn( + "Expected element " + (this.isNot ? "not ": "") + "to have 'ng-hide' class"); return isNgElementHidden(this.actual); }, -- cgit v1.2.3