Simulate
Event simulation interface.
Provides methods for simulating user interactions with React components.
Example:
final button = result.findByTag('button');
Simulate.click(button);
final input = result.findByTag('input');
Simulate.change(input, {'target': {'value': 'hello'}});
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
blur(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a blur event on
node. -
change(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a change event on
node. -
click(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a click event on
node. -
focus(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a focus event on
node. -
input(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates an input event on
node. -
keyDown(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a keyDown event on
node. -
keyPress(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a keyPress event on
node. -
keyUp(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a keyUp event on
node. -
mouseDown(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a mouseDown event on
node. -
mouseEnter(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a mouseEnter event on
node. -
mouseLeave(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a mouseLeave event on
node. -
mouseUp(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a mouseUp event on
node. -
submit(
JSAny? node, [Map< String, Object?> ? eventData]) → void -
Simulates a submit event on
node.