E1921 Write tests for popup controller.rb
Project Introduction
Team
File and Running Tests
Design
Test Outline
The following sections show the Rspec outline of the tests we created.
PopupController
#action_allowed? when the role current user is student does not allow certain action when the role current user is ta allows certain action when the role name of current user is super admin or admin allows certain action when the role current user is super instructor allows certain action
#author_feedback_popup when response_id exists #team_users_popup when a response map exists calculates response stats for one response when a response map does not exist finds team and users
#participants_popup called with no response does not calculate scores called with a response assignment has a review questionnaire calculates the scores with a max assignment has no review questionnaire calculates the scores without a max
tone analysis tests #tone_analysis_chart_popup review tone analysis is calculated prepares tone analysis report for building #build_tone_analysis_report upon selecting summery, the tone analysis for review comments is calculated and applied to the page builds a tone analysis report and returns the heat map URLs #view_review_scores_popup prepares tone analysis report for building #reviewer_details_popup it will show the reviewer details it will show the reviewer details #self_review_popup when response_id exists get the result