Skip to content

Commit

Permalink
compose_box test: Use a layout similar to the message list page
Browse files Browse the repository at this point in the history
This gives more vertical space above the compose box.  This will provide
enough space for the autocomplete to appear without overflowing when we
add tests for it.

Signed-off-by: Zixuan James Li <[email protected]>
  • Loading branch information
PIG208 authored and gnprice committed Nov 9, 2024
1 parent cdce570 commit ef87fe4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/widgets/compose_box_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ void main() {

final controllerKey = GlobalKey<ComposeBoxController>();
await tester.pumpWidget(TestZulipApp(accountId: eg.selfAccount.id,
child: ComposeBox(controllerKey: controllerKey, narrow: narrow)));
child: Column(
// This positions the compose box at the bottom of the screen,
// simulating the layout of the message list page.
children: [
const Expanded(child: SizedBox.expand()),
ComposeBox(controllerKey: controllerKey, narrow: narrow),
])));
await tester.pumpAndSettle();

return controllerKey;
Expand Down

0 comments on commit ef87fe4

Please sign in to comment.