Caplin Trader 4.3.2

Class: module:br/test/ViewFixture

module:br/test/ViewFixture

Constructor

new module:br/test/ViewFixture(viewSelector)

Constructs a br.test.ViewFixture.
Parameters:
Name Type Description
viewSelector String (optional) CSS selector to identify the parent view element for this fixture
Implements:

Methods

addViewHandlers(viewHandlersMap)

Allows custom view handlers to be added.
Parameters:
Name Type Description
viewHandlersMap Map A map of handler name to handler class constructor reference.
Throws:
If an attempt is made to override an existing handler.
Type
br.Errors.InvalidParametersError

setSelectorMappings(selectorMappings)

Set the selector mappings to use with this fixture.

This allows users to create a shorthand for a selector, so that the same selector doesn't need to be repeated across different tests.

Calling: viewFixture.setSelectorMappings({'my-mapping': '.some .selector'}); then allows you to use that mapping in the test: then("form.view.(my-mapping).text = 'foo'");.

Parameters:
Name Type Description
selectorMappings Object Map of selector mappings.