Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit f61ff69

Browse files
matskomhevery
authored andcommitted
chore(ngAnimate): fix incomplete animation test
1 parent 87405e2 commit f61ff69

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

test/ngAnimate/animateSpec.js

+4-11
Original file line numberDiff line numberDiff line change
@@ -1485,18 +1485,14 @@ describe("ngAnimate", function() {
14851485
expect(element.hasClass('hiding')).toBe(false);
14861486

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

14901489
if($sniffer.transitions) {
14911490
expect(element).toBeShown(); //still showing
14921491
$timeout.flush();
14931492
expect(element).toBeShown();
1493+
$timeout.flushNext(5555);
14941494
}
1495-
$timeout.flushNext(555);
1496-
if($sniffer.transitions) {
1497-
expect(element).toBeShown();
1498-
$timeout.flushNext(5000);
1499-
}
1495+
$timeout.flush();
15001496
expect(element).toBeHidden();
15011497

15021498
expect(element.hasClass('showing')).toBe(false);
@@ -1507,12 +1503,9 @@ describe("ngAnimate", function() {
15071503
expect(element).toBeHidden();
15081504
$timeout.flush();
15091505
expect(element).toBeHidden();
1506+
$timeout.flushNext(5580);
15101507
}
1511-
$timeout.flushNext(25);
1512-
if($sniffer.transitions) {
1513-
expect(element).toBeHidden();
1514-
$timeout.flushNext(5000);
1515-
}
1508+
$timeout.flush();
15161509
expect(element).toBeShown();
15171510

15181511
expect(element.hasClass('showing')).toBe(true);

0 commit comments

Comments
 (0)