Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Notifications Banner #184

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions data/test-by-folder.json
Original file line number Diff line number Diff line change
Expand Up @@ -3272,6 +3272,13 @@
"Mobile V2: Threads - Save and Unsave Thread"
]
},
{
"folder": "notifications-banner",
"tests": [
"Enable Desktop notification on Window/Mac/Ubuntu Desktop app",
"Enable/Disabled notification on Mobile app"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Enable/Disabled notification on Mobile app"
"Enable/Disable notification on Mobile app"

]
},
{
"folder": "omnibus",
"tests": [
Expand Down
78 changes: 78 additions & 0 deletions data/test-cases/notifications-banner/1-Enable-disable-notif.md
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
# (Required) Ensure all values are filled up
name: "Enable Desktop notification on Window/Mac/Ubuntu Desktop app"
status: Active
priority: Normal
folder: Notifications Banner
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
priority_p1_to_p4: P3 - Deep Functions (Do extensive scenarios work?)


# (Optional)
location: null
component: null
tags: []
labels: []
tested_by_contributor: ''

# (Optional) Test type and tools
cypress: N/A
detox: N/A
mmctl: N/A
playwright: N/A
rainforest: []
manual_test_environments: []

# Do not change
id: null
key: null
created_on: null
last_updated: null
case_hashed: null
steps_hashed: null
---

**Step 1**

### Scenario: User Enable's the desktop notifications
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Scenario: User Enable's the desktop notifications
### Scenario: User Enables the desktop notifications


Steps:

1. Log into User's account.
2. Verify desktop app shows the global blue banner with message "We need your permission to show desktop notifications." and the button "Enable desktop notification".
3. Open Settings modal. Expand "Desktop and mobile notification section".
4. In Notifications section, there should be a message "Desktop notifications aren’t enabled" and the button "Enable desktop notification".
5. Click on "Enable desktop notification".
6. Verify a confirmation pop up is shown with message `Mattermost(<Instance link>) would like to send you notifications.`.
7. **Allow** the notifications permissions.
8. Receive a notification ping from another user.
9. Verify the notification pops up and also can be seen in the Notification tray or Notification centre on WINDOWS and MAC.
10. Verify the Global banner is not visible anymore.
11. Open Settings modal. Expand "Desktop and mobile notification section".
12. Verify "Desktop notifications aren’t enabled" message is not visible anymore.

### Scenario: User Deny's the desktop notifications on WINDOWS / MAC / Ubuntu OS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Scenario: User Deny's the desktop notifications on WINDOWS / MAC / Ubuntu OS
### Scenario: User Denies the desktop notifications on WINDOWS / MAC / Ubuntu OS


Steps:

1. Log into User's account.
2. Verify desktop app shows the global blue banner with message "We need your permission to show desktop notifications." and the button "Enable desktop notification".
3. Open Settings modal. Expand "Desktop and mobile notification section".
4. In Notifications section, there should be a message "Desktop notifications aren’t enabled" and the button "Enable desktop notification".
5. Click on "Enable desktop notification".
6. Verify a confirmation pop up is shown with message `Mattermost(<Instance link>) would like to send you notifications.`.
7. **Deny** the notifications permissions.
8. Receive a notification ping from another user.
9. Verify the notification pop-up are not seen.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
9. Verify the notification pop-up are not seen.
9. Verify the notification pop-up is not seen.

10. Verify the Global banner is not visible anymore.
11. Open Settings modal.
12. Verify a Alert tag is visible, saying "Permission required".
13. Expand "Desktop and mobile notification section".
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
13. Expand "Desktop and mobile notification section".
13. Expand "Desktop and mobile notifications" section.

14. Verify "Desktop notifications permission was denied" message is visible. A buttons with text "Enable desktop notifications" and "How to enable notifications" are visible.

### Scenario: User Deny's the desktop notifications on Browsers Chrome/Safari/Firefox/Edge
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Scenario: User Deny's the desktop notifications on Browsers Chrome/Safari/Firefox/Edge
### Scenario: User Denies the desktop notifications on browsers Chrome/Safari/Firefox/Edge


Steps:

1. In addition to above scenario, the only change to **Step 12** is that we will not see "Enable desktop notifications" button.
53 changes: 53 additions & 0 deletions data/test-cases/notifications-banner/2-Mobile-disable-notif.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# (Required) Ensure all values are filled up
name: "Enable/Disabled notification on Mobile app"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: "Enable/Disabled notification on Mobile app"
name: "Enable/Disable notification on Mobile app"

status: Active
priority: Normal
folder: Notifications Banner
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
priority_p1_to_p4: P3 - Deep Functions (Do extensive scenarios work?)


# (Optional)
location: null
component: null
tags: []
labels: []
tested_by_contributor: ''

# (Optional) Test type and tools
cypress: N/A
detox: N/A
mmctl: N/A
playwright: N/A
rainforest: []
manual_test_environments: []

# Do not change
id: null
key: null
created_on: null
last_updated: null
case_hashed: null
steps_hashed: null
---

**Step 1**

### Scenario: Enable notifications on mobile.

Steps:

1. Log into User's account on Mobile app.
2. Deny the Notifications permission.
3. Verify the banner is shown on the Channel list screen saying `Notifications disabled` and a `Settings` button.
4. Click on Settings button.
5. Verify the Settings page is opened. There should be an alert tag saying `Permission required`.
6. Click on Notifications option.
7. Verify a banner is shown with message `Notifications are not enabled`.
8. Verify a button with text `Enable notifications` is visible.
9. Click on the Enable notifications button.
10. Allow the Notifications.
11. Receive a message from other user.
12. Verify push notification are received on the mobile.
Loading