On this page
MockAnimationDriver
class
class MockAnimationDriver implements AnimationDriver {
  static log: AnimationPlayer[]
  validateStyleProperty(prop: string): boolean
  matchesElement(element: any, selector: string): boolean
  containsElement(elm1: any, elm2: any): boolean
  query(element: any, selector: string, multi: boolean): any[]
  computeStyle(element: any, prop: string, defaultValue?: string): string
  animate(element: any, keyframes: {...}, duration: number, delay: number, easing: string, previousPlayers: any[] = []): MockAnimationPlayer
}
   Static properties
Methods
| 
         
          validateStyleProperty() 
          | 
      ||
|---|---|---|
  | 
      
| prop | Type:   | 
          
Returns
boolean
| 
         
          matchesElement() 
          | 
      ||||
|---|---|---|---|---|
  | 
      
| element | Type:   | 
          
| selector | Type:   | 
          
Returns
boolean
| 
         
          containsElement() 
          | 
      ||||
|---|---|---|---|---|
  | 
      
| elm1 | Type:   | 
          
| elm2 | Type:   | 
          
Returns
boolean
| 
         
          query() 
          | 
      ||||||
|---|---|---|---|---|---|---|
  | 
      
| element | Type:   | 
          
| selector | Type:   | 
          
| multi | Type:   | 
          
Returns
any[]
| 
         
          computeStyle() 
          | 
      ||||||
|---|---|---|---|---|---|---|
  | 
      
| element | Type:   | 
          
| prop | Type:   | 
          
| defaultValue | Type:  Optional. Default is   | 
          
Returns
string
| 
         
          animate() 
          | 
      ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
  | 
      
| element | Type:   | 
          
| keyframes | Type:   | 
          
| duration | Type:   | 
          
| delay | Type:   | 
          
| easing | Type:   | 
          
| previousPlayers | Type:  Optional. Default is   | 
          
Returns
© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
 https://v6.angular.io/api/animations/browser/testing/MockAnimationDriver