25 lines
991 B
Dart
25 lines
991 B
Dart
|
|
// This is a basic Flutter widget test.
|
||
|
|
//
|
||
|
|
// To perform an interaction with a widget in your test, use the WidgetTester
|
||
|
|
// utility in the flutter_test package. For example, you can send tap and scroll
|
||
|
|
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||
|
|
// tree, read text, and verify that the values of widget properties are correct.
|
||
|
|
|
||
|
|
import 'package:flutter_test/flutter_test.dart';
|
||
|
|
import 'package:cloud_client_gui/main.dart';
|
||
|
|
|
||
|
|
void main() {
|
||
|
|
testWidgets('App launches and shows main screen', (WidgetTester tester) async {
|
||
|
|
// Build our app and trigger a frame.
|
||
|
|
// Note: CloudClientApp already includes MultiProvider setup
|
||
|
|
await tester.pumpWidget(const CloudClientApp());
|
||
|
|
|
||
|
|
// Wait for async initialization (give it time to initialize)
|
||
|
|
await tester.pump();
|
||
|
|
await tester.pump(const Duration(seconds: 1));
|
||
|
|
|
||
|
|
// Verify that the app title is present in the AppBar
|
||
|
|
expect(find.text('云算力平台客户端'), findsOneWidget);
|
||
|
|
});
|
||
|
|
}
|