chore(project): 初始化项目基础配置文件
- 添加 CodeGraph、Android 和通用 gitignore 配置 - 创建项目元数据文件跟踪 Flutter 项目属性 - 添加 Codex AI 指导文档 AGENTS.md 说明项目架构 - 配置代码分析选项 analysis_options.yaml - 设置 Android 应用清单权限和 Kiosk 模式配置 - 实现中英文国际化支持 AppLocalizations - 配置 GoRouter 应用路由导航 - 创建明亮工业控制风格的主题配置 AppTheme
This commit is contained in:
18
test/widget_test.dart
Normal file
18
test/widget_test.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:kuaishai2/main.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('App launches without errors', (WidgetTester tester) async {
|
||||
// 验证应用能正常启动,不抛出异常
|
||||
await tester.pumpWidget(const ProviderScope(child: KuaishaiApp()));
|
||||
|
||||
// 等待异步加载完成
|
||||
await tester.pumpAndSettle(const Duration(seconds: 3));
|
||||
|
||||
// 验证 Scaffold 存在(应用正常渲染)
|
||||
expect(find.byType(Scaffold), findsWidgets);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user