Separate chat selectors from Files and More actions
This commit is contained in:
@@ -86,25 +86,25 @@ void main() {
|
||||
|
||||
await tester.tap(find.byKey(const Key('chat-row-s')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('model-a'), findsOneWidget);
|
||||
expect(find.byTooltip('Change model (currently model-a)'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byKey(const Key('chat-model')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Model Beta'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('model-b'), findsOneWidget);
|
||||
expect(find.byTooltip('Change model (currently model-b)'), findsOneWidget);
|
||||
|
||||
await tester.tap(findNativeBack());
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('model-b'), findsNothing);
|
||||
expect(find.byTooltip('Change model (currently model-b)'), findsNothing);
|
||||
|
||||
// The list still carries the row it read before the switch; reopening must
|
||||
// still show the model the server accepted.
|
||||
await tester.tap(find.byKey(const Key('chat-row-s')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('model-b'), findsOneWidget);
|
||||
expect(find.text('model-a'), findsNothing);
|
||||
expect(find.byTooltip('Change model (currently model-b)'), findsOneWidget);
|
||||
expect(find.byTooltip('Change model (currently model-a)'), findsNothing);
|
||||
|
||||
await tester.tap(find.byKey(const Key('chat-model')));
|
||||
await tester.pumpAndSettle();
|
||||
@@ -133,7 +133,7 @@ void main() {
|
||||
// The deep link opened before any row was tapped: the list's own read
|
||||
// supplies the title and the recorded model, with no second list request.
|
||||
expect(find.text('Wire chat'), findsOneWidget);
|
||||
expect(find.text('model-a'), findsOneWidget);
|
||||
expect(find.byTooltip('Change model (currently model-a)'), findsOneWidget);
|
||||
expect(find.byKey(const Key('chat-model')), findsOneWidget);
|
||||
expect(gateway.count('chat_sessions'), 1);
|
||||
|
||||
@@ -149,7 +149,7 @@ void main() {
|
||||
expect(gateway.calls.last.fields, {
|
||||
'chat_model': {'session_id': 's', 'provider': 'p2', 'model': 'model-b'},
|
||||
});
|
||||
expect(find.text('model-b'), findsOneWidget);
|
||||
expect(find.byTooltip('Change model (currently model-b)'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
|
||||
Reference in New Issue
Block a user