- 更新 WorkspaceDestination 枚举,添加 skills/nodes/agents/clawHub/aiGateway - 调整侧边栏顺序:助手→任务→技能→节点→代理 | ClawHub→密钥→AI Gateway - 新建 SkillsPage 展示已安装技能列表 - ModulesPage 添加 initialTab 参数支持直接跳转 - 修复 ai_gateway_page 和 claw_hub_page 的编译错误 - 更新测试文件适配新的导航结构
33 lines
1.1 KiB
Dart
33 lines
1.1 KiB
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:xworkmate/features/modules/modules_page.dart';
|
|
import 'package:xworkmate/models/app_models.dart';
|
|
|
|
import '../test_support.dart';
|
|
|
|
void main() {
|
|
testWidgets(
|
|
'ModulesPage switches connectors tab and routes module actions to settings',
|
|
(WidgetTester tester) async {
|
|
final controller = await createTestController(tester);
|
|
controller.navigateTo(WorkspaceDestination.skills);
|
|
|
|
await pumpPage(
|
|
tester,
|
|
child: ModulesPage(controller: controller, onOpenDetail: (_) {}),
|
|
);
|
|
|
|
await tester.tap(find.text('配置').first);
|
|
await tester.pumpAndSettle();
|
|
expect(controller.destination, WorkspaceDestination.settings);
|
|
|
|
await tester.tap(find.text('连接器'));
|
|
await tester.pumpAndSettle();
|
|
expect(find.textContaining('连接 Gateway 后可加载连接器状态'), findsOneWidget);
|
|
|
|
await tester.tap(find.text('接入模块'));
|
|
await tester.pumpAndSettle();
|
|
expect(controller.destination, WorkspaceDestination.settings);
|
|
},
|
|
);
|
|
}
|