MountOps
Utilities for mounting / unmounting a single DOM node and running assertions on it. This functionality can be used with DOM nodes created by any means, you don't need to use Scala DOM Builder. This trait is agnostic of the testing frameworks. We have an adapter for ScalaTest, see MountSpec. Old versions used to have an adapter for ScalaTest.
Value members
Abstract methods
If condition is false, fail the test with a given message This method exists for compatibility with different test frameworks.
If condition is false, fail the test with a given message This method exists for compatibility with different test frameworks.
Concrete methods
Remove all traces of previous tests from the DOM: Unmount the root node and remove the container from the DOM
Remove all traces of previous tests from the DOM: Unmount the root node and remove the container from the DOM
Check that the root node matches the provided description. Call doFail with an error message if the test fails.
Check that the root node matches the provided description. Call doFail with an error message if the test fails.
Check that a given node matches the provided description. Call doFail with an error message if the test fails.
Check that a given node matches the provided description. Call doFail with an error message if the test fails.
Inject the root node into the DOM – with default clue
Note: defaultMountedElementClue should not be made a default value on the above mount
method
because that prevents users from defining their own mount
methods that accept default arguments
("multiple overloaded alternatives of method mount define default arguments") error
Inject the root node into the DOM – with default clue
Note: defaultMountedElementClue should not be made a default value on the above mount
method
because that prevents users from defining their own mount
methods that accept default arguments
("multiple overloaded alternatives of method mount define default arguments") error
Inject the root node into the DOM – alternative argument order for convenience
Inject the root node into the DOM – alternative argument order for convenience
Clear the DOM and create a new container. This should be called before each test.
Clear the DOM and create a new container. This should be called before each test.
Concrete fields
Container element that will hold the root node as a child. Container is mounted as a child of
elementContainer element that will hold the root node as a child. Container is mounted as a child of
element