Skip to content

Instantly share code, notes, and snippets.

@gregblake
Last active August 7, 2023 14:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregblake/cfbabc5b75032fdcb2c3d70f5a4b8f6f to your computer and use it in GitHub Desktop.
Save gregblake/cfbabc5b75032fdcb2c3d70f5a4b8f6f to your computer and use it in GitHub Desktop.
How to Test Connect Notifications

How to Test Connect Notifications

Overview

Connect has 3 types of conversations: 1-on-1's, Rooms, and Group Conversations. The rules for are different for displaying notifications for each conversation type.

Connect mobile clients have an APP-level preference that enables/disables message previews on the lock screen. This preference is enabled by default (which means that the contents of the message will be visible on the notification itself). But this can be disabled, and the notification displays placeholder text (like "Greg mentioned you in Rebel Alliance").

Conversation Types

1-on-1 and Group Conversations are straight forward. The notifications should always be displayed to the user, and the "is Connecting with you" style text always remains the same for each conversation type.

Note: if notification previews are enabled, then the notification should display the contents of the message.

1-on-1 conversations

  ✅ Should display the message with the text 'Nitro is Connecting with you'

Group conversations

  ✅ Should display the notification with the text 'Nitro wrote a message in Rebel Alliance'

Rooms

Notifications for rooms have more complex rules. Users can select a per-room notification preference (e.g. only display notifications where I am mentioned, and ignore notifications that contain @all mentions, mention someone else, or have no mentions at all).

The following shows every possible scenario of notifications, and the expected contents of the notification.

Again, if notification previews are enabled, then the notification should display the contents of the message instead of the "Greg is Connecting with you" style text.

Message contents: @all mention

Notification Preference: Activity of any kind

✅ Should display the notification with the text 'Nitro mentioned @all in Rebel Alliance'

Notification Preference: Mentions of my name or @all mentions (default)

✅ Should display the notification with the text 'Nitro mentioned @all in Rebel Alliance'

Notification Preference: Only mentions of my name

❌ Should not display the notification

Notification Preference: No notifications

❌ Should not display the notification

Notification Preference: none

✅ Should display the notification with the text 'Nitro mentioned @all in Rebel Alliance'

Message contents: the current user is @mentioned

Notification Preference: Activity of any kind

✅ Should display the notification with the text 'Nitro mentioned you in Rebel Alliance'

Notification Preference: Mentions of my name or @all mentions (default)

✅ Should display the notification with the text 'Nitro mentioned you in Rebel Alliance'

Notification Preference: Only mentions of my name

✅ Should display the notification with the text 'Nitro mentioned you in Rebel Alliance'

Notification Preference: No notifications

❌ Should not display the notification

Notification Preference: none

✅ Should display the notification with the text 'Nitro mentioned you in Rebel Alliance'

Message contents: @all mention and the current user is @mentioned

Notification Preference: Activity of any kind

✅ Should display the notification with the text 'Nitro mentioned you in Rebel Alliance'

Notification Preference: Mentions of my name or @all mentions (default)

✅ Should display the notification with the text 'Nitro mentioned you in Rebel Alliance'

Notification Preference: Only mentions of my name

✅ Should display the notification with the text 'Nitro mentioned you in Rebel Alliance'

Notification Preference: No notifications

❌ Should not display the notification

Notification Preference: none

✅ Should display the notification with the text 'Nitro mentioned you in Rebel Alliance'

Message contents: @all mention and some other user is @mentioned (but not the current user)

Notification Preference: Activity of any kind

✅ Should display the notification with the text 'Nitro mentioned @all in Rebel Alliance'

Notification Preference: Mentions of my name or @all mentions (default)

✅ Should display the notification with the text 'Nitro mentioned @all in Rebel Alliance'

Notification Preference: Only mentions of my name

❌ Should not display the notification

Notification Preference: No notifications

❌ Should not display the notification

Notification Preference: none

✅ Should display the notification with the text 'Nitro mentioned @all in Rebel Alliance'

Message contents: @all mention and some other user is @mentioned (but not the current user)

Notification Preference: Activity of any kind

✅ Should display the notification with the text 'Nitro wrote a message in Rebel Alliance'

Notification Preference: Mentions of my name or @all mentions (default)

❌ Should not display the notification

Notification Preference: Only mentions of my name

❌ Should not display the notification

Notification Preference: No notifications

❌ Should not display the notification

Notification Preference: none

❌ Should not display the notification

Message contents: no @mentions

Notification Preference: Activity of any kind

✅ Should display the notification with the text 'Nitro wrote a message in Rebel Alliance'

Notification Preference: Mentions of my name or @all mentions (default)

❌ Should not display the notification

Notification Preference: Only mentions of my name

❌ Should not display the notification

Notification Preference: No notifications

❌ Should not display the notification

Notification Preference: none

❌ Should not display the notification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment