Skip to content

Commit 5bcb5d4

Browse files
committed
msglist test [nfc]: Pin down lack of compose box in no-insets regression test
This way if some future change causes CombinedFeedNarrow to have a compose box, we'll be prompted to update this test, so that it still checks for this bug if there are any other narrows that still lack a compose box.
1 parent fe5dc29 commit 5bcb5d4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/widgets/message_list_test.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,20 @@ void main() {
122122
});
123123

124124
group('presents message content appropriately', () {
125-
// regression test for https://github.com/zulip/zulip-flutter/issues/736
126-
testWidgets('content in "Combined feed" not asked to consume insets (including bottom)', (tester) async {
125+
testWidgets('content not asked to consume insets (including bottom), even without compose box', (tester) async {
126+
// Regression test for: https://github.com/zulip/zulip-flutter/issues/736
127127
const fakePadding = FakeViewPadding(left: 10, top: 10, right: 10, bottom: 10);
128128
tester.view.viewInsets = fakePadding;
129129
tester.view.padding = fakePadding;
130130

131131
await setupMessageListPage(tester, narrow: const CombinedFeedNarrow(),
132132
messages: [eg.streamMessage(content: ContentExample.codeBlockPlain.html)]);
133133

134+
// Verify this message list lacks a compose box.
135+
// (The original bug wouldn't reproduce with a compose box present.)
136+
final state = MessageListPage.ancestorOf(tester.element(find.text("verb\natim")));
137+
check(state.composeBoxController).isNull();
138+
134139
final element = tester.element(find.byType(CodeBlock));
135140
final padding = MediaQuery.of(element).padding;
136141
check(padding).equals(EdgeInsets.zero);

0 commit comments

Comments
 (0)