TestStep class
Describes a single step in a test. A test step is required to have an id which is the human-readable key for the test step. It has an optional image that is a capture of the widget for reference. Finally, it has an optional set of values that configure the step.
- Annotations
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Human readable identifer for the test step.
final
- image → Uint8List?
-
Optional image that shows an example of the widget involved with the step.
final
- key → String
-
Guaranteed unique key for the step. This is meant for internal use to
ensure widgets that represent the widget can be correctly, and uniquely,
identified by Flutter's widget builder. This is not meant for external
consumption as it is guaranteed to be unique with every object instance.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ Map<
String, dynamic> ? -
The map of key / value pairs that are utilized by the step. This map will
be different based on the step's id.
final
Methods
-
copyWith(
{String? id, Uint8List? image, Map< String, dynamic> ? values}) → TestStep - Copies the current test step with the values provided. The values from the original object will only be overwritten by any values from non-null passed in objects.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Returns a JSON-compatible representation of the internal data structure. For the returned format, see the fromDynamic function.
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromDynamic(
dynamic map, {bool ignoreImages = false}) → TestStep -
Converts a JSON-like object to a TestStep. Whie this accepts a
dynamic
, that is because different frameworks provide different types of JSON-like objects. So long as the givenmap
implements the[]
operator, this will work. A value ofnull
will result innull
being returned and an object that does not suppor the[]
operator will result in an exception being thrown. -
fromDynamicNullable(
dynamic map, {bool ignoreImages = false}) → TestStep? -
Attempts to parse a TestStep using the fromDynamic function, but if
for any reason that function throws an error, this will return
null
rather that propagating the error.