Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

test(mobile): each Focus test starts with the keyboard put away

dee2383a0769e1c
diff --git a/mobile/test/phone_edge/focus_behavior_test.dart b/mobile/test/phone_edge/focus_behavior_test.dart
index 8582a30a9..d85377420 100644
--- a/mobile/test/phone_edge/focus_behavior_test.dart
+++ b/mobile/test/phone_edge/focus_behavior_test.dart
@@ -27,6 +27,9 @@ import 'edge_fixture.dart';
/// line and by voice.
void main() {
setUp(() {
+ // Whether the keyboard is up is kept once for the whole screen, not per page — so it outlives
+ // a test that raised one. A pager clears it as it opens (`AgentSwipeHost`); so does each test.
+ resetKeyboardSession();
// The sheet's own haptics and the clipboard are platform calls a test has no platform for.
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(SystemChannels.platform, (call) async {
diff --git a/mobile/test/phone_edge/focus_layout_test.dart b/mobile/test/phone_edge/focus_layout_test.dart
index 1871a5bcf..577334dfd 100644
--- a/mobile/test/phone_edge/focus_layout_test.dart
+++ b/mobile/test/phone_edge/focus_layout_test.dart
@@ -13,6 +13,8 @@ import 'edge_fixture.dart';
/// phone meets, with the names that break layouts. None may report an overflow.
void main() {
setUpAll(loadRealFontsIfAsked);
+ // The keyboard is kept once for the screen, not per page: see `resetKeyboardSession`.
+ setUp(resetKeyboardSession);
Future<void> pumpFocus(
WidgetTester tester,