| 12345678910111213141516171819202122232425262728 |
- // 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:flutter_riverpod/flutter_riverpod.dart';
- import 'package:sino_med_cloud/app/app.dart';
- void main() {
- testWidgets('App launches successfully', (WidgetTester tester) async {
- // Build our app and trigger a frame.
- await tester.pumpWidget(const ProviderScope(child: SinoMedApp()));
- await tester.pumpAndSettle();
- // Verify that the login page is displayed with app name and subtitle.
- expect(find.text('SinoMed Cloud'), findsOneWidget);
- expect(find.text('中方诊药云'), findsOneWidget);
-
- // Verify that login tabs are displayed.
- expect(find.text('密码登录'), findsOneWidget);
- expect(find.text('验证码登录'), findsOneWidget);
- });
- }
|