mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-04-30 03:14:48 +00:00
chore(ngAnimate): fix incomplete animation test
This commit is contained in:
parent
87405e25ae
commit
f61ff69519
1 changed files with 4 additions and 11 deletions
|
|
@ -1485,18 +1485,14 @@ describe("ngAnimate", function() {
|
||||||
expect(element.hasClass('hiding')).toBe(false);
|
expect(element.hasClass('hiding')).toBe(false);
|
||||||
|
|
||||||
$animate.addClass(element, 'ng-hide');
|
$animate.addClass(element, 'ng-hide');
|
||||||
return
|
|
||||||
|
|
||||||
if($sniffer.transitions) {
|
if($sniffer.transitions) {
|
||||||
expect(element).toBeShown(); //still showing
|
expect(element).toBeShown(); //still showing
|
||||||
$timeout.flush();
|
$timeout.flush();
|
||||||
expect(element).toBeShown();
|
expect(element).toBeShown();
|
||||||
|
$timeout.flushNext(5555);
|
||||||
}
|
}
|
||||||
$timeout.flushNext(555);
|
$timeout.flush();
|
||||||
if($sniffer.transitions) {
|
|
||||||
expect(element).toBeShown();
|
|
||||||
$timeout.flushNext(5000);
|
|
||||||
}
|
|
||||||
expect(element).toBeHidden();
|
expect(element).toBeHidden();
|
||||||
|
|
||||||
expect(element.hasClass('showing')).toBe(false);
|
expect(element.hasClass('showing')).toBe(false);
|
||||||
|
|
@ -1507,12 +1503,9 @@ describe("ngAnimate", function() {
|
||||||
expect(element).toBeHidden();
|
expect(element).toBeHidden();
|
||||||
$timeout.flush();
|
$timeout.flush();
|
||||||
expect(element).toBeHidden();
|
expect(element).toBeHidden();
|
||||||
|
$timeout.flushNext(5580);
|
||||||
}
|
}
|
||||||
$timeout.flushNext(25);
|
$timeout.flush();
|
||||||
if($sniffer.transitions) {
|
|
||||||
expect(element).toBeHidden();
|
|
||||||
$timeout.flushNext(5000);
|
|
||||||
}
|
|
||||||
expect(element).toBeShown();
|
expect(element).toBeShown();
|
||||||
|
|
||||||
expect(element.hasClass('showing')).toBe(true);
|
expect(element.hasClass('showing')).toBe(true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue