CSC/ECE 517 Fall 2016/E1668.Test e-mailing functionality

From Expertiza_Wiki
Jump to navigation Jump to search

E1668 -Test e-mailling functionality

Background

There are various ways to use e-mail functionality in the Expertiza. To name a few examples: users should get welcome emails once they register successfully, they should get reminder emails if they missed deadline of submission of their works, they should receive notification emails when other users review their homework, or others finish reviewing one of their reviews. All of these above are functions belonging to emailing. However, currently there is no test for these functions in the Expertise, which should be added to ensure valid usage of e-mailling features.

Project Requirements

(1) Feature tests should be written with the use of RSpec for the e-mailing functionality.

(2) All test examples should be written with the use of fixtures, such as assignment record or participant record.


(3) Capybara should be used when interacting with the Expertise and writing these feature tests.

(4) All possible valid or invalid cases for email functionality should be included in the tests.

Tests

(1) Testing email address can be edited successfully in the profile tab. Users can update their email addresses anytime by clicking the profile button in the header after they log in. They can fill in the new address in the "E-maill address" tab. We first test if new address can be filled in successfully by using Capybara:

Then, we hit save and test whether this email address has been updated after:

(2) Testing email option can be checked successfully in the profile tab. There are three attributes related to email functionality when we define a user: email_on_review, email_on_submission, email_on_review_of_review. These boolean values can be reset in the profile page under E-mail options checkbox. We first test that if these checkbox can be check/uncheck successfully by using Capybara:

Then, we hit save and test whether these values have been reset successfully.

(3) Testing email can be sent to users successfully if they reset their password.

(4) Testing email can be sent to users successfully if they register successfully.

(5) Testing email can be sent to the users successfully when someone else reviews review their work.

(6) Testing email can be sent to the users successfully when someone else submits work they are assigned to review

(7) Testing email can be sent to the users successfully when someone else reviews one of the reviews

Proposed future work

Reference