TestStepDelays class
Defines the various delays and timeouts involved when executing tests.
- Annotations
Constructors
- TestStepDelays({Duration defaultTimeout = const Duration(seconds: 10), Duration postFoundWidget = Duration.zero, Duration postStep = const Duration(seconds: 1), Duration postSubmitReport = const Duration(seconds: 5), Duration preStep = const Duration(seconds: 1), Duration screenshot = const Duration(seconds: 5), Duration scrollIncrement = const Duration(milliseconds: 100), Duration testSetUp = const Duration(milliseconds: 500), Duration testTearDown = const Duration(milliseconds: 500)})
-
Constructs the delay object. All values have timeouts that have been
tested via the example application on various devices. They may need to
be altered based on your individual application's timings and
requirements.
const
Properties
- defaultTimeout → Duration
-
The default amount of time to wait for a widget being tested to become
available on the widget tree. Exceeding this timeout will result in an
error that will fail the associated test step.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- postFoundWidget → Duration
-
The amount of time to wait aftr discovering a widget being tested. This
allows the widget to perform any post-processing that it may do once it is
attached to the tree. In general, this should be a small value and the
SleepStep should be used when specific widgets need large amounts of time
after being added to the tree.
final
- postStep → Duration
-
The amount of time to wait after a step is complete before moving to the
next step.
final
- postSubmitReport → Duration
-
The amount of time to wait after a test report was submitted before
resetting and starting the next test.
final
- preStep → Duration
-
The amount of time to wait before starting a step.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenshot → Duration
-
The time to wait in order to receive a screenshot. Screenshot requests
are fully async so this time needs to be large enough for a device to
generate and respond to a screenshot request.
final
- scrollIncrement → Duration
-
The amount of time to wait between each scroll attempt. A value too small
will result in scroll attempts happening too close for the scroller to
complete each step.
final
- testSetUp → Duration
-
The amount of time at the start of each test to wait after the reset
request and before any steps are executed.
final
- testTearDown → Duration
-
The amount of time at the end of each test to wait before submitting the
report or initiating the reset request for the next test.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this delay object to a JSON compatible map. For the format, see fromDynamic.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromDynamic(
dynamic map) → TestStepDelays - Creates the delays object from a JSON-like map. The format of the map is as follows: