Skip to content

Commit

Permalink
test [nfc]: Add section headings in example_data.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Oct 23, 2023
1 parent 6b17ec5 commit 92b4d3f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion test/example_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -96,6 +108,10 @@ ZulipStream stream({
);
}

////////////////////////////////////////////////////////////////
// Messages.
//

UnreadMessagesSnapshot unreadMsgs({
int? count,
List<UnreadDmSnapshot>? dms,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -285,6 +303,10 @@ PerAccountStore store({Account? account, InitialSnapshot? initialSnapshot}) {
);
}

////////////////////////////////////////////////////////////////
// Events.
//

UpdateMessageFlagsRemoveEvent updateMessageFlagsRemoveEvent(
MessageFlag flag,
Iterable<Message> messages, {
Expand Down

0 comments on commit 92b4d3f

Please sign in to comment.