Make gateway integration sections collapsible

This commit is contained in:
Haitao Pan 2026-03-23 11:01:46 +08:00
parent f15ede6d09
commit e15cc55f28
2 changed files with 588 additions and 488 deletions

File diff suppressed because it is too large Load Diff

View File

@ -139,6 +139,33 @@ void main() {
);
});
testWidgets('SettingsPage gateway sections can collapse individually', (
WidgetTester tester,
) async {
final controller = await createTestController(tester);
await pumpPage(
tester,
child: SettingsPage(controller: controller),
platform: TargetPlatform.macOS,
);
await tester.tap(find.text('集成'));
await tester.pumpAndSettle();
await tester.tap(find.text('OpenClaw Gateway'));
await tester.pumpAndSettle();
expect(find.byKey(const ValueKey('gateway-host-field')), findsNothing);
expect(find.byKey(const ValueKey('gateway-test-button')), findsNothing);
await tester.tap(find.text('OpenClaw Gateway'));
await tester.pumpAndSettle();
expect(find.byKey(const ValueKey('gateway-host-field')), findsOneWidget);
expect(find.byKey(const ValueKey('gateway-test-button')), findsOneWidget);
});
testWidgets('SettingsPage shows Linux desktop integration controls', (
WidgetTester tester,
) async {