test(app): make the model fixtures use an unsupported backend and answer the directory read
This commit is contained in:
@@ -97,6 +97,18 @@ void main() {
|
|||||||
|
|
||||||
await tester.tap(find.byKey(runPipelineActionKey));
|
await tester.tap(find.byKey(runPipelineActionKey));
|
||||||
await tester.pumpAndSettle();
|
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(
|
await tester.enterText(
|
||||||
find.byKey(runPipelinePromptKey),
|
find.byKey(runPipelinePromptKey),
|
||||||
'Review the change.',
|
'Review the change.',
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ void main() {
|
|||||||
(tester) async {
|
(tester) async {
|
||||||
final gateway = _ScreenGateway()
|
final gateway = _ScreenGateway()
|
||||||
..sessions = [
|
..sessions = [
|
||||||
{'id': 's', 'title': 'Wire chat', 'backend': 'claude'},
|
{'id': 's', 'title': 'Wire chat', 'backend': 'other'},
|
||||||
];
|
];
|
||||||
await _pumpScreen(tester, gateway, initialSessionId: 's');
|
await _pumpScreen(tester, gateway, initialSessionId: 's');
|
||||||
|
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ void main() {
|
|||||||
await _openThread(
|
await _openThread(
|
||||||
tester,
|
tester,
|
||||||
gateway,
|
gateway,
|
||||||
session: _withSession({'backend': 'claude'}),
|
session: _withSession({'backend': 'other'}),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(const Key('chat-model')), findsNothing);
|
expect(find.byKey(const Key('chat-model')), findsNothing);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ void main() {
|
|||||||
gateway: gateway,
|
gateway: gateway,
|
||||||
sessionId: 's',
|
sessionId: 's',
|
||||||
title: _title,
|
title: _title,
|
||||||
session: {..._session, 'backend': 'claude'},
|
session: {..._session, 'backend': 'other'},
|
||||||
onBack: () {},
|
onBack: () {},
|
||||||
),
|
),
|
||||||
cupertino: false,
|
cupertino: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user