Files
lis/mylis/test/widget_test.dart
T
2026-07-22 05:18:55 +07:00

28 lines
930 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:shared_preferences/shared_preferences.dart';
import 'package:mylis/main.dart';
void main() {
testWidgets('shows login screen', (WidgetTester tester) async {
SharedPreferences.setMockInitialValues({});
await tester.pumpWidget(const MyLisApp());
await tester.pump();
expect(
find.text('Mikrobiology Laboratory Information System (MyLIS)'),
findsOneWidget,
);
expect(find.text('Login'), findsOneWidget);
expect(find.text('Username'), findsOneWidget);
});
}