AssertValueStep class Null safety

Test step that asserts that the value equals (or does not equal) a specific value.



AssertValueStep({required bool caseSensitive, required bool equals, required String testableId, Duration? timeout, required String? value})


caseSensitive bool
Set to true if the comparison should be case sensitive. Set to false to allow the comparison to be case insensitive.
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.
read-only, inherited
driver → OverrideWidgetTester
Returns the test driver that can be used to interact with widgets.
read-only, inherited
equals bool
Set to true if the value from the Testable must equal the set value. Set to false if the value from the Testable must not equal the value.
find → CommonFinders
Returns the finder that can be used to locate widgets.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stepId String
read-only, override
testableId String
The id of the Testable widget to interact with.
timeout Duration?
The maximum amount of time this step will wait while searching for the Testable on the widget tree.
value String?
The value to test againt when comparing the Testable's value.


execute({required CancelToken cancelToken, required TestReport report, required TestController tester}) Future<void>
Executes the step. This will first look for the Testable, get the value from the Testable, then compare it against the set value.
getBehaviorDrivenDescription(TestController tester) String
Gets the most appropriate BDD string based on the values set on the step.
log(String message, {required TestController tester}) → void
Logs a message and posts it as a status update to the TestRunner.
@protected, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
postStepSleep(Duration duration) Future<void>
Overidden to ignore the delay
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.
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. The error flag informs the sleeper about whether the duration is a standard duration or an error based timeout. [...]
@protected, 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.
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.
@protected, inherited


operator ==(Object other) bool
The equality operator. [...]

Static Properties

behaviorDrivenDescriptions List<String>
Returns the Behavior Driven Development description for the test step. The results of this may be in Markdown and this provides a description of the test step in a way that is more easily understood by non-developers. [...]
read-only, override

Static Methods

fromDynamic(dynamic map) AssertValueStep?
Creates an instance from a JSON-like map structure. This expects the following format: [...]


id → const String