forked from hesabix/arc
36 lines
1.3 KiB
Dart
Executable file
36 lines
1.3 KiB
Dart
Executable file
// 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/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:hesabix_ui/l10n/app_localizations.dart';
|
|
import 'package:hesabix_ui/widgets/progress_splash_screen.dart';
|
|
|
|
void main() {
|
|
testWidgets(
|
|
'progress splash renders without starting network initialization',
|
|
(WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const MaterialApp(
|
|
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
|
supportedLocales: AppLocalizations.supportedLocales,
|
|
home: ProgressSplashScreen(
|
|
message: 'Loading',
|
|
progress: 0.5,
|
|
currentStep: 2,
|
|
totalSteps: 4,
|
|
),
|
|
),
|
|
);
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.byType(MaterialApp), findsOneWidget);
|
|
expect(find.byType(ProgressSplashScreen), findsOneWidget);
|
|
expect(find.text('Loading'), findsOneWidget);
|
|
},
|
|
);
|
|
}
|