CSC/ECE 517 Fall 2022 - E2279. Further refactoring and improvement of signup sheet controller

From Expertiza_Wiki
Jump to navigation Jump to search

Team

Mentor

  • Ed Gehringer (efg)

Team Members

  • Juan Benavides (jdbenavi)
  • Wei-Chi Chen (wchen37)
  • Swetha Sairamakrishnan (ssairam)

Problem Statement

  • describe the issues?

Prior Work section with last years and last projects background

About Controller

The sign up sheet controller performs the following functions:

  • Allows an instructor to add/remove topics to an assignment.
  • Allows an instructor to assign/remove students to topics (This has been removed as it is unused/impersonation of student is used instead)
  • Allows a student to see the list of available topics which can be bid on for given OSS assignment.

General Design Goals

Plan and List of Work done (specific tasks planned)

  • assignment is intelligent? (Swetha)
  • participants variable (Juan)
  • topics staggered ( Wei-Chi)

Test Plan

Edge Cases and Pre-Conditions

  1. When dropping topic if submission already done.
  2. When deadline from dropping topic has passed.
  3. Deleting topic when topic cannot be found.
  4. Signup in case when user cannot be found.
  5. Create signup_sheet when sign_up_topic cannot be found.
  6. Destroy signup_sheet when other topics with the same assignment exists.

RSpec

As such no functionality changed in any function, only refactoring done. All the refactoring was carefully verified by running rspec tests. To run the spec file, run:
rspec spec/controllers/signup_sheet_controller_spec.rb

We also ran the rspecs for signup_sheet model and helper just to make sure no functionality was broken.

rspec spec/helpers/signup_sheet_helper_spec.rb
rspec spec/models/signup_sheet_spec.rb
New test cases
Destroy signup_sheet when there are other topics in the assignment
New, more general test case added for rendering list view, as we noticed that some functionalities we broke while refactoring did not result in failed test cases.

Mandatory

Login as instructor
  1. Hover on Manage Tab
  2. Click on Assignments Tab
  3. Click on Edit Button for "OSS project & documentation" assignment
  4. Select the Topic Tab
  5. Add New Topic or Delete topic using links in the form below


Login as student
  1. Click on OSS project/Writing assignment 2
  2. Click on Signup sheet
  3. The list must be visible, which indicates functionality is as before after refactoring list function.
  • New Tests

Modifications (probably after working on them)

Relevant Links