Hide
This is the last issue about push notifications, so we'll test everything in here.
Please notice that some tests will require a branded app since some features are only available in branded apps (like Firebase analytics).
This issue should be tested using the latest Airnotifier code (not applied yet). Please talk to Juan first to verify which site to use.
Test push clicks (both in Android and iOS)
- Install the regular app in the device and login as a student in a master site with push notifications enabled (mobile master).
- Go to notification preferences and make sure that all notifications are enabled for the Mobile processor.
- In web as another user, send a contact request to the user in the app. Check that you receive a push notification.
- In the device, check that you see a badge in the notification tab with the number 1 (number of unread notifications).
- Click the push notification. Check that the messages tab is opened (view with the list of conversations). Check that the badge in the notification tab has disappeared (the notification is now marked as read).
- As the student, submit an assignment (either in app or in web). Check that you receive a push notification.
- Click the push notification. Check that the assignment is opened.
- In web as teacher, open a not-anonymous feedback activity that the student hasn't answered yet.
- Go to the "Show non-respondents" tab, select the student using the checkbox in the right, write a subject and a message and click "Send". Check that you receive a push notification.
- Click the push notification. Check that the feedback is opened.
- In web, award a badge to the student. Check that you receive a push notification.
- Click the push notification. Check that the badge is opened.
- As the student, submit a quiz. Check that you receive a push notification.
- Click the push notification. Check that the quiz is opened.
- As the student, answer a lesson that contains an essay question.
- In web as teacher, grade that essay question manually. Check that you receive a push notification.
- Click the push notification. Check that the grade of the lesson is opened.
- Now login as a teacher in the app and make sure that all notifications are enabled.
- In web as student, submit an assignment. Check that you receive a push notification.
- Click the push notification. Check that the assign is opened.
- In web as a student, answer a feedback. Check that you receive a push notification.
- Click the push notification. Check that the feedback attempt (or the list of respondents, depending on the configuration) is opened in the app.
- In web as a student, submit a quiz. Check that you receive a push notification.
- Click the push notification. Check that the student attempt is opened to review it.
Test icon and group in mobile37 (Android only)
- In the app, login as a certain user in mobile37 site (it's configured as it was a branded app).
- Put the app in background.
- In web or another app, send a message to that user. Check that you receive a push notification with the image of the user that sent the message.
- Send a new message to that user. Check that you receive another push notification and the title now says there are 2 messages (something like: "John Smith (2)").
- Expand the notification center and check that you can see the 2 messages in the same notification.
- Now put the app in foreground.
- In web or another app, send a new message to that user. Check that you receive another push notification and the title now says there are 3 messages (something like: "John Smith (3)").
- Expand the notification center and check that you can see the 3 messages in the same notification.
Test Firebase analytics in an app with analytics enabled (both Android and iOS)
Testing Analytics is quite annoying because it can take up to an hour to send the events. In Android you can enable DebugView to make it faster, but in iOS it can only be done if the app is built with XCode.
- Install the app in the device and login in a site.
- Put the app in background.
- In web, open the Firebase Analytics console, open the right project and open "StreamView".
- Send a push notification (e.g. a private message). Check that you receive the push.
- Dismiss/Clear the notification.
- Put the app in foreground and send a new push notification.
- Click the push notification.
- Now open a couple of activities in the app. You just need to open the first page.
- Wait for the events to be sent to the console. It can take up to an hour, and the StreamView only displays events from the last 30 minutes so it's a bit annoying. If the events don't appear in StreamView, check the Events option.
- Check that you see the following events:
- moodle_notification_receive (only for Android).
- moodle_notification_dismiss (only for Android).
- moodle_notification_foreground
- moodle_notification_open
- Several view_item. Check that in view item params you see the WS called and the name of the item viewed (course name, activity name, etc.)
Test in desktop apps
- Repeat any of the click tests in the section "Test push clicks" and check that it works fine in desktop too. You don't have to test them all, just a couple of them.
- In the desktop app, login with a user that has at least 1 group conversation that isn't muted.
- In web, send a message to the group conversation.
- In the desktop app, wait a bit and check that a notification for the message is displayed.
- Now open the conversation and mute it.
- Open a different conversation (to make sure the group conversation isn't opened).
- In web, send a message to the group conversation.
- In the desktop app, wait a bit and check that no notification is displayed now.
Show
This is the last issue about push notifications, so we'll test everything in here.
Please notice that some tests will require a branded app since some features are only available in branded apps (like Firebase analytics).
This issue should be tested using the latest Airnotifier code (not applied yet). Please talk to Juan first to verify which site to use.
Test push clicks (both in Android and iOS)
Install the regular app in the device and login as a student in a master site with push notifications enabled (mobile master).
Go to notification preferences and make sure that all notifications are enabled for the Mobile processor.
In web as another user, send a contact request to the user in the app. Check that you receive a push notification.
In the device, check that you see a badge in the notification tab with the number 1 (number of unread notifications).
Click the push notification. Check that the messages tab is opened (view with the list of conversations). Check that the badge in the notification tab has disappeared (the notification is now marked as read).
As the student, submit an assignment (either in app or in web). Check that you receive a push notification.
Click the push notification. Check that the assignment is opened.
In web as teacher, open a not-anonymous feedback activity that the student hasn't answered yet.
Go to the "Show non-respondents" tab, select the student using the checkbox in the right, write a subject and a message and click "Send". Check that you receive a push notification.
Click the push notification. Check that the feedback is opened.
In web, award a badge to the student. Check that you receive a push notification.
Click the push notification. Check that the badge is opened.
As the student, submit a quiz. Check that you receive a push notification.
Click the push notification. Check that the quiz is opened.
As the student, answer a lesson that contains an essay question.
In web as teacher, grade that essay question manually. Check that you receive a push notification.
Click the push notification. Check that the grade of the lesson is opened.
Now login as a teacher in the app and make sure that all notifications are enabled.
In web as student, submit an assignment. Check that you receive a push notification.
Click the push notification. Check that the assign is opened.
In web as a student, answer a feedback. Check that you receive a push notification.
Click the push notification. Check that the feedback attempt (or the list of respondents, depending on the configuration) is opened in the app.
In web as a student, submit a quiz. Check that you receive a push notification.
Click the push notification. Check that the student attempt is opened to review it.
Test icon and group in mobile37 (Android only)
In the app, login as a certain user in mobile37 site (it's configured as it was a branded app).
Put the app in background.
In web or another app, send a message to that user. Check that you receive a push notification with the image of the user that sent the message.
Send a new message to that user. Check that you receive another push notification and the title now says there are 2 messages (something like: "John Smith (2)").
Expand the notification center and check that you can see the 2 messages in the same notification.
Now put the app in foreground.
In web or another app, send a new message to that user. Check that you receive another push notification and the title now says there are 3 messages (something like: "John Smith (3)").
Expand the notification center and check that you can see the 3 messages in the same notification.
Test Firebase analytics in an app with analytics enabled (both Android and iOS)
Testing Analytics is quite annoying because it can take up to an hour to send the events. In Android you can enable DebugView to make it faster, but in iOS it can only be done if the app is built with XCode.
Install the app in the device and login in a site.
Put the app in background.
In web, open the Firebase Analytics console , open the right project and open "StreamView".
Send a push notification (e.g. a private message). Check that you receive the push.
Dismiss/Clear the notification.
Put the app in foreground and send a new push notification.
Click the push notification.
Now open a couple of activities in the app. You just need to open the first page.
Wait for the events to be sent to the console. It can take up to an hour, and the StreamView only displays events from the last 30 minutes so it's a bit annoying. If the events don't appear in StreamView, check the Events option.
Check that you see the following events:
moodle_notification_receive (only for Android).
moodle_notification_dismiss (only for Android).
moodle_notification_foreground
moodle_notification_open
Several view_item. Check that in view item params you see the WS called and the name of the item viewed (course name, activity name, etc.)
Test in desktop apps
Repeat any of the click tests in the section "Test push clicks" and check that it works fine in desktop too. You don't have to test them all, just a couple of them.
In the desktop app, login with a user that has at least 1 group conversation that isn't muted.
In web, send a message to the group conversation.
In the desktop app, wait a bit and check that a notification for the message is displayed.
Now open the conversation and mute it.
Open a different conversation (to make sure the group conversation isn't opened).
In web, send a message to the group conversation.
In the desktop app, wait a bit and check that no notification is displayed now.