mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
test(matchers): support 'not' text in toBeHidden matcher
This commit is contained in:
parent
66007a4150
commit
4be7612079
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue