AI 接入 V0.1
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:qiangbao_accounting/models/bill.dart';
|
||||
import 'package:qiangbao_accounting/models/note.dart';
|
||||
import 'package:qiangbao_accounting/models/statistics_response.dart';
|
||||
import 'package:qiangbao_accounting/pages/assistant/assistant_page.dart';
|
||||
import 'package:qiangbao_accounting/pages/bill/bill_home_page.dart';
|
||||
import 'package:qiangbao_accounting/pages/home/dashboard_page.dart';
|
||||
import 'package:qiangbao_accounting/providers/bill_provider.dart';
|
||||
@@ -102,5 +103,36 @@ void main() {
|
||||
expect(find.text('我的账单'), findsOneWidget);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('助手页(push 进来)$label 不溢出', (tester) async {
|
||||
useSize(tester, size);
|
||||
await tester.pumpWidget(
|
||||
ProviderScope(
|
||||
child: MaterialApp(
|
||||
home: Builder(
|
||||
builder: (ctx) => Scaffold(
|
||||
body: Center(
|
||||
child: TextButton(
|
||||
onPressed: () => Navigator.of(ctx).push(
|
||||
MaterialPageRoute(builder: (_) => const AssistantPage()),
|
||||
),
|
||||
child: const Text('进入'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.tap(find.text('进入'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// 空状态:标题 + 引导问题 + 底部输入框
|
||||
expect(find.text('问我点什么'), findsOneWidget);
|
||||
expect(find.text('这个月花了多少钱?'), findsOneWidget);
|
||||
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user