AvailableTestStep class
Describes an automated test step. Custom test steps must register with the TestStepRegistry and create an instance of this class. This binds the input form, any quick-add values, the help and title translation entities, and the requirements of the step that determines if the step will show or not given the current constraints.
- Annotations
Constructors
-
AvailableTestStep({required TestStepForm form, Set<
String> keys = const <String>{}, required TranslationEntry help, required String id, Map<String, dynamic> ? quickAddValues, required TranslationEntry title, TestableType? type, required bool widgetless}) -
const
Properties
- form → TestStepForm
-
Binds the input form associated with the test step. This must
self-validate and ensure all required values exist before allowing
submission.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- help → TranslationEntry
-
Translation key for the help text that describes the test step.
final
- id → String
-
The id / human readable string for this particular step. Built-in values
all use a
lower_under_lower
format for the keys rather than acamelCase
format. However, custom steps may use whichever form they prefer.final -
keys
→ Set<
String> -
The unique set of value keys supported by the step. Entries in the
values
map that do not have an associated key must be removed before final processing is complete.final -
quickAddValues
→ Map<
String, dynamic> ? -
Map of key / value pairs that can be used to quick add (form less add) the
step to a test. This must be
null
if forms are always required to be filled out before adding the step.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → TranslationEntry
-
Translation key for the title text that tescribes the test step.
final
- type → TestableType?
-
The type value that the Testable must support or else this step will be
hidden from the available options. If this is not set then it is assumed
the test supports all types.
final
- widgetless → bool
-
Sets whether this step is dependent on a Testable widget or not. If
this value is
true
then it is assumed the step is Testable agnostic and can be used anywhere in the application. Iffalse
then it the step will only be shown for compatible type values.final
Methods
-
minify(
Map< String, dynamic> values) → Map<String, dynamic> -
Requests the step to minify the given
values
map by stripping any key / value pairs that exist in the map but are not allowed by the step. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
supports(
List< TestableType> ? types) → bool -
Returns
true
if this step supports any of the giventypes
or if this step has no specific type requirement. Returnsfalse
if this has a type requirement that the Testable does not support the required type. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited