W3cubDocs

/Angular

MockAnimationDriver

class final

class MockAnimationDriver implements AnimationDriver {
  static log: AnimationPlayer[]
  validateStyleProperty(prop: string): boolean
  validateAnimatableStyleProperty(prop: string): boolean
  matchesElement(_element: any, _selector: string): boolean
  containsElement(elm1: any, elm2: any): boolean
  getParentElement(element: unknown): unknown
  query(element: any, selector: string, multi: boolean): any[]
  computeStyle(element: any, prop: string, defaultValue?: string): string
  animate(element: any, keyframes: ɵStyleDataMap[], duration: number, delay: number, easing: string, previousPlayers: any[] = []): MockAnimationPlayer
}

Static properties

Property Description
static log: AnimationPlayer[]

Methods

validateStyleProperty(prop: string): boolean

Parameters
prop string
Returns

boolean

validateAnimatableStyleProperty(prop: string): boolean

Parameters
prop string
Returns

boolean

matchesElement(_element: any, _selector: string): boolean

Parameters
_element any
_selector string
Returns

boolean

containsElement(elm1: any, elm2: any): boolean

Parameters
elm1 any
elm2 any
Returns

boolean

getParentElement(element: unknown): unknown

Parameters
element unknown
Returns

unknown

query(element: any, selector: string, multi: boolean): any[]

Parameters
element any
selector string
multi boolean
Returns

any[]

computeStyle(element: any, prop: string, defaultValue?: string): string

Parameters
element any
prop string
defaultValue string

Optional. Default is undefined.

Returns

string

animate(element: any, keyframes: ɵStyleDataMap[], duration: number, delay: number, easing: string, previousPlayers: any[] = []): MockAnimationPlayer

Parameters
element any
keyframes ɵStyleDataMap[]
duration number
delay number
easing string
previousPlayers any[]

Optional. Default is [].

Returns

MockAnimationPlayer

© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/animations/browser/testing/MockAnimationDriver