mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-14 12:08:27 +08:00
test(matchers): support 'not' text in toBeHidden matcher
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user