TestDom

japgolly.scalajs.react.test.TestDom
See theTestDom companion object
trait TestDom

Wraps a DOM and provides utilities for testing its state.

As an example `testDom.outerHTML.assert("

Welcome")`

Attributes

Since

2.2.0

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Types

type Self <: TestDom

Value members

Abstract methods

def node: Node

Concrete methods

def as[A](implicit ct: ClassTag[A]): A

Cast the DOM as A or throw an exception.

Cast the DOM as A or throw an exception.

Attributes

def asButton(): HTMLButtonElement
def asDocument(): Document
def asDocumentFragment(): DocumentFragment
def asElement(): Element
def asHtml(): HTMLElement
def asInput(): HTMLInputElement
def asSelect(): HTMLSelectElement
def asTextArea(): HTMLTextAreaElement
def children(): Vector[Node]
def firstChild(): Node
def querySelector(selectors: String): Element
def querySelectorAll(selectors: String): Vector[Element]
def querySelectorOption(selectors: String): Option[Element]
def select(f: Node => Node): Self
def select(selectors: String): Self
def selectFirst(selectors: String): Self