selectOnFinder method
Implementation
Future<void> selectOnFinder(
Finder finder,
String value, {
TestStep? step,
Future<void> Function()? onBeforeSelection,
}) async {
if (value.isEmpty) {
throw EnsembleTestFailure('select requires "value"');
}
await tapFinder(
finder,
step: step,
onBeforeTap: () async {
if (step != null) await _emitEvidenceBoundary(step);
await onBeforeSelection?.call();
},
);
final option = find.text(value);
if (option.evaluate().isEmpty) {
throw EnsembleTestFailure('select could not find option "$value"');
}
await tester.tap(option);
await runtime.settleAfterAction();
}