feat(app): chat list drops search, New chat and Refresh are bar actions, and rows show agent, model and ~ paths
This commit is contained in:
@@ -6,7 +6,7 @@ import 'chat_test_harness.dart';
|
||||
import 'fake_chat_gateway.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('embedded, New chat sits beside search on one toolbar row', (
|
||||
testWidgets('embedded, New chat and Refresh share one actions row', (
|
||||
tester,
|
||||
) async {
|
||||
final gateway = FakeChatGateway()
|
||||
@@ -26,13 +26,14 @@ void main() {
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final search = tester.getCenter(find.byType(TextField));
|
||||
// No search field: New chat and Refresh share one actions row.
|
||||
expect(find.byType(TextField), findsNothing);
|
||||
final create = find.byKey(const Key('chat-new-chat'));
|
||||
final refresh = find.byKey(const Key('chat-refresh'));
|
||||
expect(create, findsOneWidget);
|
||||
expect(
|
||||
find.descendant(of: create, matching: find.text('New chat')),
|
||||
findsOneWidget,
|
||||
(tester.getCenter(create).dy - tester.getCenter(refresh).dy).abs(),
|
||||
lessThan(4),
|
||||
);
|
||||
expect((tester.getCenter(create).dy - search.dy).abs(), lessThan(4));
|
||||
expect(tester.getCenter(create).dx, greaterThan(search.dx));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user