From 92b4d3f7e6f47fc55b1e4792480064cdc37b10df Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 23 Oct 2023 14:22:40 -0700 Subject: [PATCH] test [nfc]: Add section headings in example_data.dart --- test/example_data.dart | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/test/example_data.dart b/test/example_data.dart index 443209f07e..e5376fa1d2 100644 --- a/test/example_data.dart +++ b/test/example_data.dart @@ -7,12 +7,20 @@ import 'package:zulip/model/store.dart'; import 'api/fake_api.dart'; import 'stdlib_checks.dart'; +//////////////////////////////////////////////////////////////// +// Realm-wide (or server-wide) metadata. +// + final Uri realmUrl = Uri.parse('https://chat.example/'); const String recentZulipVersion = '8.0'; const int recentZulipFeatureLevel = 185; const int futureZulipFeatureLevel = 9999; +//////////////////////////////////////////////////////////////// +// Users and accounts. +// + User user({ int? userId, String? email, @@ -66,6 +74,10 @@ final Account otherAccount = Account( final User thirdUser = user(fullName: 'Third User', email: 'third@example', userId: 345); +//////////////////////////////////////////////////////////////// +// Streams and subscriptions. +// + ZulipStream stream({ int? streamId, String? name, @@ -96,6 +108,10 @@ ZulipStream stream({ ); } +//////////////////////////////////////////////////////////////// +// Messages. +// + UnreadMessagesSnapshot unreadMsgs({ int? count, List? dms, @@ -234,7 +250,9 @@ Reaction zulipExtraEmojiReaction = Reaction( userId: selfUser.userId, ); -// TODO example data for many more types +//////////////////////////////////////////////////////////////// +// The entire per-account state. +// InitialSnapshot initialSnapshot({ String? queueId, @@ -285,6 +303,10 @@ PerAccountStore store({Account? account, InitialSnapshot? initialSnapshot}) { ); } +//////////////////////////////////////////////////////////////// +// Events. +// + UpdateMessageFlagsRemoveEvent updateMessageFlagsRemoveEvent( MessageFlag flag, Iterable messages, {