From 76d3ac040cdcf01577b2a6fd7bbd4bfd611f287a Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Thu, 22 Oct 2026 18:48:50 +0100 Subject: [PATCH] test(app): make the model fixtures use an unsupported backend and answer the directory read --- app/test/application/run_start_wiring_test.dart | 12 ++++++++++++ app/test/features/chat/chat_screen_model_test.dart | 2 +- .../chat/conversation/chat_model_picker_test.dart | 2 +- .../chat/conversation/chat_thread_header_test.dart | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/test/application/run_start_wiring_test.dart b/app/test/application/run_start_wiring_test.dart index 17eff11c..906f0078 100644 --- a/app/test/application/run_start_wiring_test.dart +++ b/app/test/application/run_start_wiring_test.dart @@ -97,6 +97,18 @@ void main() { await tester.tap(find.byKey(runPipelineActionKey)); await tester.pumpAndSettle(); + // The dialog asks for recent directories; answer it so the transport is + // free for the launch request this test asserts. + await waitForRequest(tester, channel, 'chat_directories'); + final directories = pipelineRequest(channel, 'chat_directories')!; + channel.incoming.add( + jsonEncode({ + 'id': directories['id'], + 'type': 'chat_directories', + 'chat_directories': [], + }), + ); + await tester.pump(); await tester.enterText( find.byKey(runPipelinePromptKey), 'Review the change.', diff --git a/app/test/features/chat/chat_screen_model_test.dart b/app/test/features/chat/chat_screen_model_test.dart index 7c7149c9..59336ef9 100644 --- a/app/test/features/chat/chat_screen_model_test.dart +++ b/app/test/features/chat/chat_screen_model_test.dart @@ -152,7 +152,7 @@ void main() { (tester) async { final gateway = _ScreenGateway() ..sessions = [ - {'id': 's', 'title': 'Wire chat', 'backend': 'claude'}, + {'id': 's', 'title': 'Wire chat', 'backend': 'other'}, ]; await _pumpScreen(tester, gateway, initialSessionId: 's'); diff --git a/app/test/features/chat/conversation/chat_model_picker_test.dart b/app/test/features/chat/conversation/chat_model_picker_test.dart index 1c845114..b9823b73 100644 --- a/app/test/features/chat/conversation/chat_model_picker_test.dart +++ b/app/test/features/chat/conversation/chat_model_picker_test.dart @@ -380,7 +380,7 @@ void main() { await _openThread( tester, gateway, - session: _withSession({'backend': 'claude'}), + session: _withSession({'backend': 'other'}), ); expect(find.byKey(const Key('chat-model')), findsNothing); diff --git a/app/test/features/chat/conversation/chat_thread_header_test.dart b/app/test/features/chat/conversation/chat_thread_header_test.dart index 32f61877..34fa8b79 100644 --- a/app/test/features/chat/conversation/chat_thread_header_test.dart +++ b/app/test/features/chat/conversation/chat_thread_header_test.dart @@ -110,7 +110,7 @@ void main() { gateway: gateway, sessionId: 's', title: _title, - session: {..._session, 'backend': 'claude'}, + session: {..._session, 'backend': 'other'}, onBack: () {}, ), cupertino: false,