aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng')
-rw-r--r--test/ng/animateSpec.js14
-rw-r--r--test/ng/directive/ngShowHideSpec.js8
2 files changed, 5 insertions, 17 deletions
diff --git a/test/ng/animateSpec.js b/test/ng/animateSpec.js
index 7f440bb5..c5914a74 100644
--- a/test/ng/animateSpec.js
+++ b/test/ng/animateSpec.js
@@ -31,22 +31,10 @@ describe("$animate", function() {
expect(element.text()).toBe('21');
}));
- it("should animate the show animation event", inject(function($animate) {
- element.addClass('ng-hide');
- $animate.show(element);
- expect(element).toBeShown();
- }));
-
- it("should animate the hide animation event", inject(function($animate) {
- expect(element).toBeShown();
- $animate.hide(element);
- expect(element).toBeHidden();
- }));
-
it("should still perform DOM operations even if animations are disabled", inject(function($animate) {
$animate.enabled(false);
expect(element).toBeShown();
- $animate.hide(element);
+ $animate.addClass(element, 'ng-hide');
expect(element).toBeHidden();
}));
});
diff --git a/test/ng/directive/ngShowHideSpec.js b/test/ng/directive/ngShowHideSpec.js
index f8193a12..be0a3895 100644
--- a/test/ng/directive/ngShowHideSpec.js
+++ b/test/ng/directive/ngShowHideSpec.js
@@ -81,14 +81,14 @@ describe('ngShow / ngHide animations', function() {
))($scope);
$scope.$digest();
- item = $animate.process('show').element;
+ item = $animate.process('removeClass').element;
expect(item.text()).toBe('data');
expect(item).toBeShown();
$scope.on = false;
$scope.$digest();
- item = $animate.process('hide').element;
+ item = $animate.process('addClass').element;
expect(item.text()).toBe('data');
expect(item).toBeHidden();
}));
@@ -104,14 +104,14 @@ describe('ngShow / ngHide animations', function() {
))($scope);
$scope.$digest();
- item = $animate.process('hide').element;
+ item = $animate.process('addClass').element;
expect(item.text()).toBe('datum');
expect(item).toBeHidden();
$scope.off = false;
$scope.$digest();
- item = $animate.process('show').element;
+ item = $animate.process('removeClass').element;
expect(item.text()).toBe('datum');
expect(item).toBeShown();
}));