feat: 实现起卦、设置与积分系统
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meeyao_qianwen/features/divination/data/models/divination_params.dart';
|
||||
import 'package:meeyao_qianwen/shared/widgets/divination/yao_line_row.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('oldYang shows circle mark when enabled', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: YaoLineRow(
|
||||
name: '初爻',
|
||||
type: YaoType.oldYang,
|
||||
showChangeMark: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.text('初爻'), findsOneWidget);
|
||||
expect(find.text('○'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('oldYin does not show mark when showChangeMark=false', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: YaoLineRow(
|
||||
name: '二爻',
|
||||
type: YaoType.oldYin,
|
||||
showChangeMark: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.text('×'), findsNothing);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user