MockAnimationPlayer
class
experimental
npm Package | @angular/animations |
---|---|
Module | import { MockAnimationPlayer } from '@angular/animations/browser/testing'; |
Source | animations/browser/testing/src/mock_animation_driver.ts |
Overview
class MockAnimationPlayer extends NoopAnimationPlayer { constructor(element: any, keyframes: {...}, duration: number, delay: number, easing: string, previousPlayers: any[]) previousStyles: {...} currentSnapshot: ɵStyleData element: any keyframes: {...} duration: number delay: number easing: string previousPlayers: any[] onInit(fn: () => any) init() finish(): void destroy(): void triggerMicrotask() play(): void hasStarted() beforeDestroy() // inherited from animations/NoopAnimationPlayer parentPlayer: AnimationPlayer | null totalTime: 0 onStart(fn: () => void): void onDone(fn: () => void): void onDestroy(fn: () => void): void hasStarted(): boolean init(): void play(): void triggerMicrotask() pause(): void restart(): void finish(): void destroy(): void reset(): void setPosition(p: number): void getPosition(): number triggerCallback(phaseName: string): void }
Constructor
constructor(element: any, keyframes: {
[key: string]: string | number;
}[], duration: number, delay: number, easing: string, previousPlayers: any[])
Members
previousStyles: {
[key: string]: string | number;
}
currentSnapshot: ɵStyleData
element: any
keyframes: {
[key: string]: string | number;
}[]
duration: number
delay: number
easing: string
previousPlayers: any[]
onInit(fn: () => any)
init()
finish(): void
destroy(): void
triggerMicrotask()
play(): void
hasStarted()
beforeDestroy()
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v5.angular.io/api/animations/browser/testing/MockAnimationPlayer