nyWidgetTest function

void nyWidgetTest(
  1. String description,
  2. Future<void> callback(
    1. WidgetTester tester
    ), {
  3. bool skip = false,
  4. dynamic tags,
  5. 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,
  );
}