27 lines
931 B
Dart
27 lines
931 B
Dart
|
|
import 'package:flutter/material.dart';
|
|||
|
|
import 'package:flutter_test/flutter_test.dart';
|
|||
|
|
import 'package:meeyao_qianwen/app/app_theme.dart';
|
|||
|
|
import 'package:meeyao_qianwen/features/divination/data/models/divination_params.dart';
|
|||
|
|
import 'package:meeyao_qianwen/features/divination/presentation/screens/manual_divination_screen.dart';
|
|||
|
|
|
|||
|
|
void main() {
|
|||
|
|
testWidgets('manual screen shows yao legend', (tester) async {
|
|||
|
|
final params = DivinationMockData.initial().copyWith(
|
|||
|
|
method: DivinationMethod.manual,
|
|||
|
|
question: '测试问题',
|
|||
|
|
);
|
|||
|
|
|
|||
|
|
await tester.pumpWidget(
|
|||
|
|
MaterialApp(
|
|||
|
|
theme: AppTheme.light(),
|
|||
|
|
home: ManualDivinationScreen(params: params),
|
|||
|
|
),
|
|||
|
|
);
|
|||
|
|
|
|||
|
|
expect(find.text('○ 老阳(变)'), findsOneWidget);
|
|||
|
|
expect(find.text('× 老阴(变)'), findsOneWidget);
|
|||
|
|
expect(find.text('初爻'), findsOneWidget);
|
|||
|
|
expect(find.text('上爻'), findsOneWidget);
|
|||
|
|
});
|
|||
|
|
}
|