mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-09 07:14:44 +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'),
|
toBeDirty: cssMatcher('ng-dirty', 'ng-pristine'),
|
||||||
toBePristine: cssMatcher('ng-pristine', 'ng-dirty'),
|
toBePristine: cssMatcher('ng-pristine', 'ng-dirty'),
|
||||||
toBeShown: function() {
|
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);
|
return !isNgElementHidden(this.actual);
|
||||||
},
|
},
|
||||||
toBeHidden: function() {
|
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);
|
return isNgElementHidden(this.actual);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue