18 lines
560 B
Dart
18 lines
560 B
Dart
|
|
// This is a basic Flutter widget smoke test.
|
||
|
|
|
||
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||
|
|
import 'package:flutter_test/flutter_test.dart';
|
||
|
|
|
||
|
|
import 'package:cloudhome_ops/main.dart';
|
||
|
|
|
||
|
|
void main() {
|
||
|
|
testWidgets('App builds without throwing', (WidgetTester tester) async {
|
||
|
|
// Build our app and trigger a frame.
|
||
|
|
await tester.pumpWidget(const ProviderScope(child: OpsConsoleApp()));
|
||
|
|
await tester.pump();
|
||
|
|
|
||
|
|
// 只要渲染树成功构建,即认为 smoke test 通过。
|
||
|
|
expect(find.byType(ProviderScope), findsOneWidget);
|
||
|
|
});
|
||
|
|
}
|