Skip to content

Commit ef87fe4

Browse files
PIG208gnprice
authored andcommitted
compose_box test: Use a layout similar to the message list page
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]>
1 parent cdce570 commit ef87fe4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/widgets/compose_box_test.dart

+7-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ void main() {
5151

5252
final controllerKey = GlobalKey<ComposeBoxController>();
5353
await tester.pumpWidget(TestZulipApp(accountId: eg.selfAccount.id,
54-
child: ComposeBox(controllerKey: controllerKey, narrow: narrow)));
54+
child: Column(
55+
// This positions the compose box at the bottom of the screen,
56+
// simulating the layout of the message list page.
57+
children: [
58+
const Expanded(child: SizedBox.expand()),
59+
ComposeBox(controllerKey: controllerKey, narrow: narrow),
60+
])));
5561
await tester.pumpAndSettle();
5662

5763
return controllerKey;

0 commit comments

Comments
 (0)