ScrollUntilVisibleStep class
Step that will attempt to scroll another widget until it becomes visible.
- Inheritance
-
- Object
- TestRunnerStep
- ScrollUntilVisibleStep
Constructors
- ScrollUntilVisibleStep({required String? increment, String? scrollableId, required String testableId, Duration? timeout})
Properties
- defaultStepTimeout → Duration
-
Returns the default timeout for the step. Steps that should respond
quickly should use a relatively low value and steps that may take a long
time should return an appropriately longer time.
no setterinherited
- driver → OverrideWidgetTester
-
Returns the test driver that can be used to interact with widgets.
no setterinherited
- find → CommonFinders
-
Returns the finder that can be used to locate widgets.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- increment → String?
-
The increment in device-independent-pixels. This may be a positive or
negative number. Positive to scroll "forward" and negative to scroll
"backward".
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollableId → String?
-
The id of the Scrollable widget to perform the scrolling actions on.
final
- stepId → String
-
no setteroverride
- testableId → String
-
The id of the Testable widget to interact with.
final
- timeout → Duration?
-
The maximum amount of time this step will wait while searching for the
Testable on the widget tree.
final
Methods
-
execute(
{required CancelToken cancelToken, required TestReport report, required TestController tester}) → Future< void> -
Executes the test step. If the scrollableId is set then this will get
that Scrollable instance and interact with it. Otherwise, this will
attempt to find the first Scrollable instance currently in the viewport
and interact with that.
override
-
getBehaviorDrivenDescription(
TestController tester) → String -
Gets the most appropriate BDD string based on the values set on the step.
override
-
log(
String message, {required TestController tester}) → void -
Logs a message and posts it as a status update to the TestRunner.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postStepSleep(
Duration duration) → Future< void> -
Gives the test step an opportunity to sleep after the step has been
executed. Steps that do not interact with the application may choose to
override this and reduce or elimate the delay.
inherited
-
preStepSleep(
Duration duration) → Future< void> -
Gives the test step an opportunity to sleep before the step has been
executed. Steps that do not interact with the application may choose to
override this and reduce or elimate the delay.
inherited
-
sleep(
Duration duration, {required Stream< void> ? cancelStream, bool error = false, String? message, required TestController tester}) → Future<void> -
Sleeps for the defined Duration. This accept an optional
cancelStream
which can be used to cancel the sleep. Theerror
flag informs the sleeper about whether the duration is a standard duration or an error based timeout.inherited -
toJson(
) → Map< String, dynamic> - Converts this to a JSON compatible map. For a description of the format, see fromDynamic.
-
toString(
) → String -
Returns the string encoded JSON representation for this class. This will
remove all null values and empty collections from the returned string.
inherited
-
waitFor(
dynamic testableId, {required CancelToken cancelToken, required TestController tester, Duration? timeout}) → Future< Finder> -
Waits for a widget with a key that has
testableId
as the value.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
behaviorDrivenDescriptions
→ List<
String> -
final
Static Methods
-
fromDynamic(
dynamic map) → ScrollUntilVisibleStep? - Creates an instance from a JSON-like map structure. This expects the following format: