NyWidgetTest class
Widget testing utilities for Nylo applications.
Provides easy-to-use helpers for testing NyStatefulWidget, NyPage, and NyState widgets with proper initialization, theme support, and loading state management.
Quick Start
import 'package:nylo_support/testing/ny_testing.dart';
void main() {
NyTest.init();
nySetUpAll(() async {
// Initialize your app
NyEnvRegistry.register(getter: Env.get);
await setupApplication(providers);
});
nyGroup('MyPage', () {
nyWidgetTest('displays content', (tester) async {
await tester.pumpNyWidget(MyPage());
expect(find.text('Hello'), findsOneWidget);
});
});
}
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- simpleDarkTestTheme → ThemeData
-
Get a simple dark test theme.
no setter
- simpleTestTheme → ThemeData
-
Get a simple test theme that doesn't use Google Fonts.
no setter