mariposa_test library

Classes

DomTester
A class that renders Mariposa widgets into a package:html Document. [...]
DomTesterElement
A wrapper around a package:html Element.

Functions

convertNode(Node node) Node
Converts a package:html node into a package:html_builder Node.
createTestRenderer() StringRenderer
Creates a simple renderer that renders HTML5 on one line, without a DOCTYPE.
hasAttributes(dynamic matcher) Matcher
Ensures that a Node has attributes that match the matcher (can also just be a Map, which will be wrapped).
hasChildren(dynamic matcher) Matcher
Ensures that a Node has children that match the matcher (can also just be a List, which will be wrapped).
hasClass(dynamic matcher) Matcher
Asserts a matcher against a Node's class attribute.
hasClassList(dynamic matcher) Matcher
Asserts a matcher against a Node's class attribute, as a List<String>.
hasClassString(dynamic matcher) Matcher
Asserts a matcher against a Node's class attribute, as a single String.
hasTagName(dynamic matcher) Matcher
Ensures that a Node has a tag name that matches the matcher (can also just be a String, which will be wrapped).
rendersEqualTo(Node node, { StringRenderer createRenderer() }) Matcher
Ensures that a Node produces the exact same output as another node. [...]
rendersTo(dynamic matcher, { StringRenderer createRenderer() }) Matcher
Ensures that a Node produces a given output, which may be a Matcher or String. [...]