mirror of
https://github.com/flutter/samples.git
synced 2025-11-11 15:28:44 +00:00
Add a new null safety example (#562)
This commit is contained in:
14
experimental/null_safety/null_safe_app/test/widget_test.dart
Normal file
14
experimental/null_safety/null_safe_app/test/widget_test.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
// This is a basic widget test that tests just the good app code.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:null_safe_app/goodapp.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('App smoke test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(GoodMyApp());
|
||||
|
||||
// Verify that we have a forecast, or a managed failure.
|
||||
expect(find.textContaining('Temperature'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user