On this page
TestabilityRegistry
class  final 
A global registry of Testability instances for specific elements.
class TestabilityRegistry {
  registerApplication(token: any, testability: Testability)
  unregisterApplication(token: any)
  unregisterAllApplications()
  getTestability(elem: any): Testability | null
  getAllTestabilities(): Testability[]
  getAllRootElements(): any[]
  findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability | null
}
   Provided in
'platform'
Methods
| 
         
         registerApplication()
          | 
      ||||||
|---|---|---|---|---|---|---|
Registers an application with a testability hook so that it can be tracked  | 
      ||||||
        
          | 
      
token | 
            any | 
            token of application, root element  | 
           
testability | 
            Testability | 
            Testability hook  | 
           
| 
         
         unregisterApplication()
          | 
      |||
|---|---|---|---|
Unregisters an application.  | 
      |||
        
          | 
      
token | 
            any | 
            token of application, root element  | 
           
| 
         
         unregisterAllApplications()
          | 
      
|---|
Unregisters all applications  | 
      
        
          | 
      
| 
         
         getTestability()
          | 
      |||
|---|---|---|---|
Get a testability hook associated with the application  | 
      |||
        
          | 
      
elem | 
            any | 
            root element  | 
           
Returns
Testability | null
| 
         
         getAllTestabilities()
          | 
      
|---|
Get all registered testabilities  | 
      
| 
         
         getAllRootElements()
          | 
      
|---|
Get all registered applications(root elements)  | 
      
        
          | 
      
| 
         
         findTestabilityInTree()
          | 
      ||||||
|---|---|---|---|---|---|---|
Find testability of a node in the Tree  | 
      ||||||
        
          | 
      
elem | 
            Node | 
            node  | 
           
findInAncestors | 
            boolean | 
            whether finding testability in ancestors if testability was not found in current node Optional. Default is   | 
           
Returns
Testability | null
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
 https://v14.angular.io/api/core/TestabilityRegistry