Skip to content

UserGuide.md: Cici -> Email Notification #86

@qianxuege

Description

@qianxuege

Name of Feature: Email Notification

Link to the related user story and pull request(s)

Manual Testing

Detailed instructions on how to use and user test your new feature

  1. Download the .env file from the shared google drive, and add it to the root directory.
  2. Run ./nodebb setup
  3. Run npm install
  4. Run ./nodebb dev
  5. Log in as admin using username=admin and password=password123!. image
  6. Go to Edit Profile
image 7. Select Change Email image 8. Enter your school email and the password `password123!`. Then click Submit. image 9. In your terminal where you ran `./nodebb dev`, you should see console log statements. Click on the **confirm_link** image image 10. Go to [mailgun](https://login.mailgun.com/login/) and login with email: qge@andrew.cmu.edu, password: huy+5.SBZ@$/a2C
11. Go to "Domains" under SENDING. Select the sandbox domain (second on the screenshot). image
12. Add your email address to Authorized Recipients. image
13. Select I Agree in the confirmation email image 14. Go to Settings image 15. Change notification settings of "When a new reply is posted in a topic you are watching" to "Notifications & Email" image 16. Click Save Changes.
17. As an admin, post a new topic. image
18. Log out of the admin account
19. Login as a user (create a new user account if needed), and post a comment to that topic.
20. You should receive an email in your admin account. image 21. You can repeat the process to confirm that the user receives an email notification when another user responds to their post. However, note that the free tier email API will only send out 100 emails per day. We should be good as long as it's within that limit.

Automated Tests

Link/description of where your added automated tests can be found

Description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made

What is being tested

  • Backend test check that the mailgun plugin is triggered to send a notification email to user A when another user replies to user A's post
  • Backend test check that the payload matches the expected payload for mailgun API, so that the mailgun API would not error out
  • Manual testing process described above can confirm that the mailgun plugin is configured correctly, as the notification arrives in the user's mailbox after another user responds to the post

These tests are sufficient to cover the changes I've made in regards to the acceptance criteria of the user story, since it includes both testing of the payload format and the actual result of the receiving the email. This ensures that both in theory and in practice, the user should receive an email notification when a reply is made to their post.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions