nyWidgetTest function
void
nyWidgetTest(
- String description,
- Future<
void> callback(- WidgetTester tester
- bool skip = false,
- dynamic tags,
- Timeout? timeout,
Pest-style widget test wrapper with Patrol integration.
This wraps the standard patrolWidgetTest for consistent syntax:
nyWidgetTest('can tap login button', ($) async {
await $.pumpWidget(MyApp());
await $.tap(find.text('Login'));
});
Note: Requires patrol package to be installed.
Implementation
void nyWidgetTest(
String description,
Future<void> Function(WidgetTester tester) callback, {
bool skip = false,
dynamic tags,
Timeout? timeout,
}) {
testWidgets(
description,
(WidgetTester tester) async {
await callback(tester);
},
skip: skip,
tags: tags,
timeout: timeout,
);
}