CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

Problem Statement

This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.

Scope of the Feature

- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed.
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project.
- Reviewers will be anonymous to authors.

Flowchart

Author's View : The flow for authors to email reviewers regarding the work they have been reviewed for:


Reviewer's View : The flow for reviewers to email authors whose work they have reviewed:



Proposed Changes

Code Implementation

Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users. 'def send_mail_to_user(user, subject, partial_name, password)' can be used to send the email to an another from reviewer and 'def send_mail_to_assigned_reviewers' can be used to send email to all reviewers from an author.
From Reviewer perspective, following files will be updated and a new partial will be created to render the new view.

1. app/views/student_review/list.html.erb  : link to the new view will be added in this file.
2. app/controllers/student_review_controller.rb : implementation of action method for the send button will be added here. Methods from MailerHelper will be used here.
3. app/views/student_review/email_author.html.erb ( new partial) : This is the new UI page. Mock up for the view is presented in the UI section.

From Author perspective, following files will be updated and a new partial will be created to render the new view.

1. App/views/student_task/list.html.erb  : link to the new view will be added in this file.
2. app/controllers/student_task controller.rb : implementation of action method for the send button will be added here. Methods from MailerHelper will be used here.
3. app/views/student_review/email_reviwers.html.erb ( new partial) : This is the new UI page. Mock up for the view is presented in the UI section.

UI

As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers.





Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing.




Testing

RSPEC Testing

Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the MailHelper class method.

Manual Testing

For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. There are two views that need to be tested manually.

1. Author View:

The author must follow the following steps:

1. Go to the Assignments page.
2. Click on the link which is placed on the right corner of the page called "send email to reviewers".
3. On clicking the above link, the author must be redirected to a page with an email text box. 
4. Type the email message and click on send.
5. Log in to the email to check if the message is received. 

2. Reviewer View:

The reviewer must follow the following steps:

1. Go to the other's work page.
2. Click on the link which is placed on the right corner of the page called "send email to author".
3. On clicking the above link, the reviewer must be redirected to a page with an email text box. 
4. Type the email message and click on send. 
5. Log in to the email to check if the message is received.

We are planning to cover the following test cases:

1. Author View:

1. Upon Clicking on the link which is placed on the right corner of the page called "send email to reviewers",
   the author must be redirected to email_reviewers_view. 
2. Check if the recipients of the email are indeed the reviewers of the authors' work.

2. Reviewer View:

1. Upon Clicking on the link which is placed on the right corner of the page called "send email to author",
   the reviewer must be redirected to email_authors_view. 
2. Check if the recipients of the email are indeed the authors of the reviewed work.

We will also be checking the below two edge cases:

1. Author View:

1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success
   or failure message

2. Reviewer View:

2. Once the email is sent, the author should be redirected to the "others work" page with the corresponding success
   or failure message

Design Pattern

A design pattern is a general repeatable solution to a commonly occurring problem in software design. It is a description or template for how to solve a problem that can be used in many different situations.

We will be implementing the decorator design pattern in our code. The decorator pattern is used to add/extend existing functionality without modifying the existing code. Our code is also going to follow the open-closed principle.

Team Members

Ashritha Bommagani (abommag@ncsu.edu)

Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)

Harini Bharata (hbharat@ncsu.edu)

Sri Pallavi Damuluri (sdamulu@ncsu.edu)