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

From Expertiza_Wiki
Revision as of 02:28, 28 October 2016 by Ychen75 (talk | contribs) (→‎Tests)
Jump to navigation Jump to search

E1668 -Test e-mailling functionality

Background

There are various ways to use e-mail functionality in the Expertiza. Users should get emails once they register successfully, they should get informed once they missed deadline of submission of their works and they should receive notification once others review their homework, their assigned work finished or others review one of their reviews. All of these above are functions belonging to emailing. However, there is no test for these functions in the Expertise right now, which should be added to ensure valid usage of e-mailling features.

Project Requirements

(1) We should write feature test with the use of RSpec

(2) We should create assignment record, participant record with the use of fixtures

(3) We should use Capybara to write these feature 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