From ef87fe427b2a6bf4ba5d40169d9c62b2e2b7e0ae Mon Sep 17 00:00:00 2001 From: Zixuan James Li Date: Thu, 31 Oct 2024 16:54:51 -0400 Subject: [PATCH] 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 --- test/widgets/compose_box_test.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/widgets/compose_box_test.dart b/test/widgets/compose_box_test.dart index ae670f0c10..666e1941f4 100644 --- a/test/widgets/compose_box_test.dart +++ b/test/widgets/compose_box_test.dart @@ -51,7 +51,13 @@ void main() { final controllerKey = GlobalKey(); 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;