test(app): make the model fixtures use an unsupported backend and answer the directory read

This commit is contained in:
2026-10-22 18:48:50 +01:00
parent 0ee68204cd
commit 76d3ac040c
4 changed files with 15 additions and 3 deletions
@@ -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': <dynamic>[],
}),
);
await tester.pump();
await tester.enterText(
find.byKey(runPipelinePromptKey),
'Review the change.',
@@ -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');
@@ -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);
@@ -110,7 +110,7 @@ void main() {
gateway: gateway,
sessionId: 's',
title: _title,
session: {..._session, 'backend': 'claude'},
session: {..._session, 'backend': 'other'},
onBack: () {},
),
cupertino: false,