Skip to content

Commit

Permalink
action_sheet test: Cut assumption of topic recipient header in topic …
Browse files Browse the repository at this point in the history
…narrow

With zulip#1039 "Fuse recipient header into app bar for topic narrows",
this setup will likely become invalid. It assumes that a topic
recipient header can be found in a topic-narrow message list.

Switching to the combined-feed narrow would break tests that use a
muted topic, because the topic's message(s) are excluded in that
narrow, so there wouldn't be a recipient header to tap.

Instead, trigger the topic action sheet from the topic-narrow app
bar.
  • Loading branch information
chrisbobbe committed Jan 24, 2025
1 parent 090808c commit 6cba30c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions test/widgets/action_sheet_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,7 @@ void main() {

final message = eg.streamMessage(
stream: someChannel, topic: topic, sender: eg.otherUser);
connection.prepare(json: eg.newestGetMessagesResult(
foundOldest: true, messages: [message]).toJson());
await tester.pumpWidget(TestZulipApp(accountId: eg.selfAccount.id,
child: MessageListPage(
initNarrow: eg.topicNarrow(someChannel.streamId, topic))));
await tester.pumpAndSettle();

await tester.longPress(find.descendant(
of: find.byType(RecipientHeader), matching: find.text(topic)));
// sheet appears onscreen; default duration of bottom-sheet enter animation
await tester.pump(const Duration(milliseconds: 250));
await showFromAppBar(tester, channel: someChannel, topic: topic, message: message);
}

void checkButtons(List<Finder> expectedButtonFinders) {
Expand Down

0 comments on commit 6cba30c

Please sign in to comment.