Skip to content

Commit

Permalink
chore(ngAnimate): fix incomplete animation test
Browse files Browse the repository at this point in the history
  • Loading branch information
matsko authored and mhevery committed Aug 9, 2013
1 parent 87405e2 commit f61ff69
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions test/ngAnimate/animateSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1485,18 +1485,14 @@ describe("ngAnimate", function() {
expect(element.hasClass('hiding')).toBe(false);

$animate.addClass(element, 'ng-hide');
return

if($sniffer.transitions) {
expect(element).toBeShown(); //still showing
$timeout.flush();
expect(element).toBeShown();
$timeout.flushNext(5555);
}
$timeout.flushNext(555);
if($sniffer.transitions) {
expect(element).toBeShown();
$timeout.flushNext(5000);
}
$timeout.flush();
expect(element).toBeHidden();

expect(element.hasClass('showing')).toBe(false);
Expand All @@ -1507,12 +1503,9 @@ describe("ngAnimate", function() {
expect(element).toBeHidden();
$timeout.flush();
expect(element).toBeHidden();
$timeout.flushNext(5580);
}
$timeout.flushNext(25);
if($sniffer.transitions) {
expect(element).toBeHidden();
$timeout.flushNext(5000);
}
$timeout.flush();
expect(element).toBeShown();

expect(element.hasClass('showing')).toBe(true);
Expand Down

0 comments on commit f61ff69

Please sign in to comment.