Skip to content

Commit

Permalink
Isolate release-notes-related items into their own test case
Browse files Browse the repository at this point in the history
  • Loading branch information
sashaweiss-signal authored Aug 13, 2024
1 parent 86b1c8f commit 2285c21
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 37 deletions.
Binary file modified test-cases/simple-chat-update-message.binproto
Binary file not shown.
56 changes: 19 additions & 37 deletions test-cases/simple-chat-update-message.jsonproto
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Includes at least one message for each of the "simple chat updates".
// Includes at least one message for each of the "simple chat updates",
// excluding "release notes" messages that aren't supported on all platforms
// yet.
[
{
"backupTimeMs": "123456",
Expand Down Expand Up @@ -71,24 +73,17 @@
}
}
},
// Release Notes channel
{
"chat": {
"id": "1",
"recipientId": "2"
}
},
// 1:1 chat with Contact recipient 4
{
"chat": {
"id": "2",
"id": "1",
"recipientId": "4"
}
},
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "1",
"directionless": {},
"updateMessage": {
Expand All @@ -101,7 +96,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "2",
"directionless": {},
"updateMessage": {
Expand All @@ -114,7 +109,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "3",
"directionless": {},
"updateMessage": {
Expand All @@ -127,7 +122,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "4",
"directionless": {},
"updateMessage": {
Expand All @@ -137,23 +132,10 @@
}
}
},
{
"chatItem": {
"authorId": "2",
"chatId": "1",
"dateSent": "5",
"directionless": {},
"updateMessage": {
"simpleUpdate": {
"type": "RELEASE_CHANNEL_DONATION_REQUEST"
}
}
}
},
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "6",
"directionless": {},
"updateMessage": {
Expand All @@ -166,7 +148,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "7",
"directionless": {},
"updateMessage": {
Expand All @@ -179,7 +161,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "8",
"directionless": {},
"updateMessage": {
Expand All @@ -192,7 +174,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "9",
"directionless": {},
"updateMessage": {
Expand All @@ -205,7 +187,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "10",
"directionless": {},
"updateMessage": {
Expand All @@ -218,7 +200,7 @@
{
"chatItem": {
"authorId": "1",
"chatId": "2",
"chatId": "1",
"dateSent": "11",
"directionless": {},
"updateMessage": {
Expand All @@ -231,7 +213,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "12",
"directionless": {},
"updateMessage": {
Expand All @@ -244,7 +226,7 @@
{
"chatItem": {
"authorId": "1",
"chatId": "2",
"chatId": "1",
"dateSent": "13",
"directionless": {},
"updateMessage": {
Expand All @@ -257,7 +239,7 @@
{
"chatItem": {
"authorId": "4",
"chatId": "2",
"chatId": "1",
"dateSent": "14",
"directionless": {},
"updateMessage": {
Expand All @@ -270,7 +252,7 @@
{
"chatItem": {
"authorId": "1",
"chatId": "2",
"chatId": "1",
"dateSent": "14",
"directionless": {},
"updateMessage": {
Expand All @@ -283,7 +265,7 @@
{
"chatItem": {
"authorId": "1",
"chatId": "2",
"chatId": "1",
"dateSent": "15",
"directionless": {},
"updateMessage": {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Includes "release notes" simple chat updates.
[
{
"backupTimeMs": "123456",
"version": "1"
},
{
"account": {
"profileKey": "YQKRq+3DQklInaOaMcmlzZnN0m/1hzLiaONX7gB12dg=",
"givenName": "Boba",
"familyName": "Fett",
"avatarUrlPath": "",
"accountSettings": {
"readReceipts": false,
"sealedSenderIndicators": true,
"typingIndicators": false,
"linkPreviews": false,
"notDiscoverableByPhoneNumber": false,
"preferContactAvatars": false,
"universalExpireTimerSeconds": 0,
"preferredReactionEmoji": [],
"displayBadgesOnProfile": false,
"keepMutedChatsArchived": false,
"hasSetMyStoriesPrivacy": false,
"hasViewedOnboardingStory": false,
"storiesDisabled": false,
"storyViewReceiptsEnabled": false,
"hasSeenGroupStoryEducationSheet": false,
"hasCompletedUsernameOnboarding": false,
"phoneNumberSharingMode": "NOBODY"
}
}
},
{
"recipient": {
"id": "1",
"self": {}
}
},
{
"recipient": {
"id": "2",
"releaseNotes": {}
}
},
{
"recipient": {
"id": "3",
"distributionList": {
"distributionId": "AAAAAAAAAAAAAAAAAAAAAA==",
"distributionList": {
"allowReplies": true,
"memberRecipientIds": [],
"name": "My Story",
"privacyMode": "ALL"
}
}
}
},
// Release Notes channel
{
"chat": {
"id": "1",
"recipientId": "2"
}
},
{
"chatItem": {
"authorId": "2",
"chatId": "1",
"dateSent": "5",
"directionless": {},
"updateMessage": {
"simpleUpdate": {
"type": "RELEASE_CHANNEL_DONATION_REQUEST"
}
}
}
},
]

0 comments on commit 2285c21

Please sign in to comment.