NyWidgetTesterExtension extension

Extension on WidgetTester for Nylo-specific widget testing.

Provides convenient methods for pumping Nylo widgets with proper configuration and testing loading states.

on

Methods

assertNavigatedTo(RouteView route) → void

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Assert that the app navigated to the given route.
assertOnRoute(RouteView route) → void

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Assert that the current route matches the given route.
fillField(Finder finder, String text) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Tap a form field, enter text into it, and settle.
isLoading() bool

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Check if a widget is currently in loading state.
isLoadingNamed(Finder finder, {required String name}) bool

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Check if a named loading key is active in a NyPage/NyState widget.
isLockedNamed(Finder finder, {required String name}) bool

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Check if a named lock is held in a NyPage/NyState widget.

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Navigate back by popping the current route, then settle.
pumpAndSettleGracefully({Duration timeout = const Duration(seconds: 5)}) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Pump and settle with graceful error handling.
pumpNyWidget(Widget widget, {ThemeData? theme, ThemeData? darkTheme, ThemeMode themeMode = ThemeMode.light, Duration? settleTimeout, bool useSimpleTheme = false}) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Pump a Nylo widget with proper MaterialApp wrapper and theme support.
pumpNyWidgetAndWaitForInit(Widget widget, {Duration timeout = const Duration(seconds: 10), ThemeData? theme, bool useSimpleTheme = false}) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Pump a widget and wait for loading to complete.
pumpNyWidgetSimple(Widget widget) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Pump a Nylo widget using a simple theme (no Google Fonts).
pumpUntilFound(Finder finder, {Duration timeout = const Duration(seconds: 5)}) Future<bool>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Pump until a specific widget is found or timeout.
scrollTo(Finder finder, {Finder? scrollable, double delta = 100}) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Scroll until a widget is visible in the nearest Scrollable.
settle({Duration? timeout}) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Wait for all animations, frame callbacks, and pending UI updates to complete.
simulateLifecycleState(AppLifecycleState state) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Simulate an AppLifecycleState change on any NyPage in the widget tree.
tapText(String text) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Find a widget by its text, tap it, and settle.
visit(RouteView route, {ThemeData? theme, ThemeData? darkTheme, ThemeMode themeMode = ThemeMode.light}) Future<void>

Available on WidgetTester, provided by the NyWidgetTesterExtension extension

Pump a route with full Nylo navigation support.