Trait

com.raquo.domtestutils

MountOps

Related Doc: package domtestutils

Permalink

trait MountOps[N] extends AnyRef

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.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MountOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def doAssert(condition: Boolean, message: String): Unit

    Permalink

    If condition is false, fail the test with a given message This method exists for compatibility with different test frameworks.

  2. abstract def doFail(message: String): Nothing

    Permalink

    Fail the test with a given message This method exists for compatibility with different test frameworks.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def assertEmptyContainer(clue: String): Unit

    Permalink
  6. def assertRootNodeMounted(clue: String): Unit

    Permalink
  7. def clearDOM(): Unit

    Permalink

    Remove all traces of previous tests from the DOM: Unmount the root node and remove the container from the DOM

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. var containerNode: Element

    Permalink

    Container element that will hold the root node as a child.

    Container element that will hold the root node as a child. Container is mounted as a child of <body> element

  10. def createContainer(): Element

    Permalink
  11. val defaultMountedElementClue: String

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def expectNode(actualNode: Node, expectedNode: ExpectedNode[N], clue: String = mountedElementClue): Unit

    Permalink

    Check that a given node matches the provided description.

    Check that a given node matches the provided description. Call doFail with an error message if the test fails.

  15. def expectNode(expectedNode: ExpectedNode[N]): Unit

    Permalink

    Check that the root node matches the provided description.

    Check that the root node matches the provided description. Call doFail with an error message if the test fails.

  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def mount(clue: String, node: Node): Unit

    Permalink

    Inject the root node into the DOM – alternative argument order for convenience

  21. def mount(node: Node): Unit

    Permalink

    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

  22. def mount(node: Node, clue: String): Unit

    Permalink

    Inject the root node into the DOM

  23. var mountedElementClue: String

    Permalink

    Prefix to add to error messages – useful to differentiate between different mount() calls within one test

  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def resetDOM(): Unit

    Permalink

    Clear the DOM and create a new container.

    Clear the DOM and create a new container. This should be called before each test.

  28. def rootNode: Node

    Permalink

    Root node is the node that we test in expectNode.

    Root node is the node that we test in expectNode. It is the only child of the containerNode element

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. def unmount(): Unit

    Permalink

    Remove root node from the DOM

  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped