testing/src/test_context.ts
The test context allows for global configuration of services, i.e. to globally register element resolvers.
Properties |
|
Methods |
Accessors |
dateLibrary |
Type : DateFormattingLibrary
|
Default value : new MissingDateFormattingLibrary()
|
Implementation of the date formatting library to use. This must be assigned an actual implementation, ideally the one that is also used for production. Typically, a date library is configured during the test environment setup, such that it becomes available all tests. |
Static Readonly DEFAULT |
Default value : new TestContext()
|
Accesses the default instance of the test context. Modifications to this instance will be seen by other tests |
addElementResolver | ||||||
addElementResolver(resolver: ElementResolver)
|
||||||
Registers an element resolver with this context.
Parameters :
Returns :
void
|
addValidationRule | ||||||
addValidationRule(factory: ValidationRuleFactory)
|
||||||
Parameters :
Returns :
void
|
pageModelService |
getpageModelService()
|
Accesses the PageModelService using the configured element resolvers.
Returns :
PageModelService
|