已完成用户APP首期功能开发
交付用户端首期页面、配套接口、后台资源及测试文档。用户APP构建、静态分析和三个管理后台构建通过;完整测试仍有2项失败,后端模型注释检查未通过,详见交付记录。
This commit is contained in:
28
apps/user_app/test/ui/deposit_page_test.dart
Normal file
28
apps/user_app/test/ui/deposit_page_test.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
// 功能描述:押金汇总、筛选、规则与退瓶状态入口回归;版本:1.0.0。
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:user_app/ui/core/app_theme.dart';
|
||||
import 'package:user_app/ui/features/wallet/deposit_page.dart';
|
||||
|
||||
import '../support/a1_fixture.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('展示服务端押金并按状态筛选,退瓶入口不伪造提交', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: AppTheme.light(),
|
||||
home: DepositPage(repository: A1FixtureRepository()),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('¥200.00'), findsOneWidget);
|
||||
expect(find.text('GZ-15-0286'), findsOneWidget);
|
||||
await tester.tap(find.text('退款中').first);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('GZ-15-0193'), findsOneWidget);
|
||||
expect(find.text('GZ-15-0286'), findsNothing);
|
||||
await tester.tap(find.text('使用中').first);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('申请退瓶'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user