CSC/ECE 517 Spring 2016 E1624 Compose functional tests for Suggest topics of student functionality: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 25: Line 25:
For better illustration, we captured some UI screenshots for steps accordingly.  
For better illustration, we captured some UI screenshots for steps accordingly.  
===Flow of suggest topic function===
===Flow of suggest topic function===
====Step 1 Add a course====
====Step 1 Use Instructor to add a course====
First of all, we need to login with the instructor account (''instructor6'' here), in order to create a course for further test steps.
First step is to login with the instructor account (''instructor6'' here), in order to create a course for further test steps.
In this step, we need to step whether the instructor can add a course with topic suggestion enabled. [[File:Example.jpg]]


====Step 2 Add student to the course====
====Step 2 Add student to the course====


====Step 3====
====Step 3====

Revision as of 15:00, 4 April 2016

This wiki page is for the description of changes made under E1624 Final project design assignment for Spring 2016, CSC/ECE 517.


Problem Statement

What it does

Suggested topic functionality is designed for students to suggest topics they interested in. An assignment can be set up to allow students to suggest topics at the discretion of the instructor. Then, students can suggest topics, and add related descriptions. The proposer can state that (s)he wants to work on the suggested topic. When the instructor approves a suggested topic, if the proposer wanted to work on it, it is assigned to the proposer. Otherwise, it is placed on the signup sheet for anyone to reserve. The purpose of suggested topic is to make the writing assignment more personalized.

What’s wrong with it

Currently, there is no functional test for student's topic suggestion function.

What needs to be done

  • Understand the flow of the suggested topic function.
  • Do not use the development DB, otherwise your tests will not pass on TravisCI.
  • Create RSpec file in /spec/features/ folder.
  • Use fixtures to create the assignment record and any other records such as participant records in test DB.
  • Use Capybara to write functional tests for these three scenarios.
    • One team is on the waitlist. They sent a suggestion for new topic and they want to choose their suggested topic. After their suggested topic is approved, they should leave the waitlist and hold their suggested topic;
    • One team is holding a topic. They sent a suggestion for new topic and they want to choose their suggested topic. After their suggested topic is approved and they choose to switch to suggested topic, they will hold suggested topic and their old topic will be released. And if another team is in waitlist of that old topic, that team should hold the old topic now;
    • One team is holding a topic. They sent a suggestion for new topic and they do not want to work on their suggested topic. After their suggested topic is approved and they choose to public suggested topic, they will still hold their old topic. Their suggested topic will be added in sign-up sheet.
  • Create multiple tests to check valid and invalid cases.


Design of solution

To test the functionality of student's suggest topic, we plan to use Capybara to write the test code for each step listed below with branches for all three different cases. For better illustration, we captured some UI screenshots for steps accordingly.

Flow of suggest topic function

Step 1 Use Instructor to add a course

First step is to login with the instructor account (instructor6 here), in order to create a course for further test steps. In this step, we need to step whether the instructor can add a course with topic suggestion enabled.

Step 2 Add student to the course

Step 3