<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vmuruga</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vmuruga"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vmuruga"/>
	<updated>2026-05-16T07:01:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=106417</id>
		<title>CSC/ECE 517 Fall 2016 E1707: Top trading cycles to exclude previous teammates</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=106417"/>
		<updated>2016-12-03T15:44:38Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: Added testing plan for the top trading cycles functionality&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an open source web platform that enables students and instructors indulge in an enhanced and accelerated peer based learning milieu. It is aided by facilities like submissions of project work and reviews according to instructor approved deadlines, teaming up with other peers for various projects, reviewing other teams' and teammates' work and personalization of a project submission according to the best suited requirements. All these factors make Expertiza a valuable asset for an instructor to guide his students through the course with much more effectual results.&lt;br /&gt;
&lt;br /&gt;
Expertiza source code is built using Ruby on Rails and is available on github with public access enabled repository.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Currently, before the start of an assignment, students can be asked to form teams on their own or teams can be assigned by the instructor. As the main motive is guide students via peer based learning, thus more number of peers the student works with, better learning. So, to enable students find different people for the assignments rather than just team up with same people for every assignment in the current course, students can ask for a team to be randomly allocated by not choosing the team members before hand. After the bidding for the project topics is over, the student is allocated a team. Here, in this case it may be possible that the student is allocated a team member they have previously worked with before. Hence, to enable student circumvent this situation in case he/she prefers different people for the particular, we need to provide an option for the students to choose if they prefer different team members for the assignment before the bidding for the project topics happens.&lt;br /&gt;
&lt;br /&gt;
== Project Outline ==&lt;br /&gt;
The main objective is to give students an option to choose whether or not they want to team up with their previous team members for a particular assignment in the current course.&lt;br /&gt;
&lt;br /&gt;
If they choose the option, then when a student is added to the team, a check is performed if he/she has worked with the student before. If such is the case, then the student is swapped with some other student who hasn't worked with the same person before.&lt;br /&gt;
&lt;br /&gt;
Another point to note is that if the student chooses some person to be on the team who he/she has worked with before, choosing this option would still allow the person to remain in the team.&lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
To implement top trading cycle algorithm, we would be utilizing the web service that is hosted at http://peerlogic.csc.ncsu.edu/intelligent_assignment/swap_team_members. The students, and student history would be provided to the web service and the response from the web service would be utilized to update the teams. The web service is expected to respond back with new team after swapping the team members that have teamed up before.&lt;br /&gt;
As part of the changes, a new flag would be introduced in the teams model. The teams do not want to be changed (swapped) would have to unset the flag. If the flag is unset, the teams would not be send to the web service for the swap operation. &lt;br /&gt;
Only the instructor would see the option of utilizing this feature from the view. The feature would not be present for the students.&lt;br /&gt;
As part of the changes a new method would be added in the lottery controller to implement this functionality. The new method would have the responsibility to utilize the webserver and update the teams according to the web service.&lt;br /&gt;
A new button would be added in the instructor view for the assignments for invoking this new method. &lt;br /&gt;
A new checkbox would be added in the students view for selecting/un-selecting the option of swap.&lt;br /&gt;
&lt;br /&gt;
=== High Level Design ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Populating Data For the Web Service ====&lt;br /&gt;
[[File:GetDataForSwap.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Flow Diagram once the data is populated ==== &lt;br /&gt;
[[File:SendDataToWebService.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Detailed Workflow ===&lt;br /&gt;
&lt;br /&gt;
• The first step is to include a checkbox to provide student with an option to select if he/she want to be assigned new people who were not previously team up with the student.&lt;br /&gt;
&lt;br /&gt;
• An additional flag has to be introduced in the teams table that represents the value of the checkbox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following flow chart diagram describes this scenario at the front end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OODD-FinalDesignDocFlow1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
• After instructor initiates the team creation process, first check is to know whether the team members have already been chosen by the student. If yes, then the team is created as it is with the chosen members.&lt;br /&gt;
&lt;br /&gt;
• If, the student doesn't have all/some team members already selected, a team is created for the student by calling the create teams method in the top trading cycle service.&lt;br /&gt;
&lt;br /&gt;
• After a team is created, the flag is checked if the student wanted new team members for the assignment who were not team up before.&lt;br /&gt;
&lt;br /&gt;
• Then for each team member selected to be on the team, it is checked if the he/she has been teamed up with before. If no, then we move on to the next member.&lt;br /&gt;
&lt;br /&gt;
• If the team member has been teamed up with before, we call the swap method in the top trading cycle service and pass the student's team history. &lt;br /&gt;
&lt;br /&gt;
• Using that information, he/she is swapped with some other team member who hasn't been on the team.&lt;br /&gt;
&lt;br /&gt;
• This process repeats for each member, until we cover all the team members. At the end, we have our team ready.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following flow chart diagram describes this scenario at the back end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OODD-FinalDesignDocFlow2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Files To Be Modified ==&lt;br /&gt;
*app/views/assignments/_reserve_topic.html.erb&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
*app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
1. &amp;quot;To check if team creation will create teams with students having put up with the teammates previously teamed up with&amp;quot;&lt;br /&gt;
:*Set max number of students per team to 3.&lt;br /&gt;
:*Manually make change in DB to make 3 students previously team up with 3 other students.&lt;br /&gt;
:*Have 6 students bid for a topic.&lt;br /&gt;
:*Call the team creation method&lt;br /&gt;
:*Check if any student is paired with a student they had already teamed up with. If no, then this test is a success.&lt;br /&gt;
&lt;br /&gt;
2. &amp;quot;To check if the new team creation algorithm does not allocate more than the max number of people per team&amp;quot;&lt;br /&gt;
:*Set max number of students per team to 2.&lt;br /&gt;
:*Have 6 students bid for a topic.&lt;br /&gt;
:*Call the team creation method.&lt;br /&gt;
:*Check if any team has more than 2 students.&lt;br /&gt;
&lt;br /&gt;
3. &amp;quot;To check if students who have chosen their own team members are not swapped even though they might have worked together before&amp;quot;&lt;br /&gt;
:*Make 2 students teammates. For convenience, let the students be 'A' and 'B'.&lt;br /&gt;
:*Set max number of students per team to 3.&lt;br /&gt;
:*Have a total of 6 students choose topics.&lt;br /&gt;
:*Check that in the team containing the 'A', 'B' is also present.&lt;br /&gt;
&lt;br /&gt;
4. &amp;quot;To check if the new_members flag is not set, then the team members should be the same for that particular assignment&amp;quot;&lt;br /&gt;
:*Make four students, A,B,C and D.&lt;br /&gt;
:*Two teams where created, team A containing A and B, and team B containing C and D for an assignment with maximum team size 2.&lt;br /&gt;
:*Each team had unset the new_members option.&lt;br /&gt;
:*After running the method run_intelligent_assignment, the teams where checked to see if they are still the same.&lt;br /&gt;
&lt;br /&gt;
5. &amp;quot;To verify if the student team history is returned correct: The teamed_students method is invoked there are no previous teammates&amp;quot;&lt;br /&gt;
:*Verify that the returned hash is empty&lt;br /&gt;
&lt;br /&gt;
6. &amp;quot;To verify if the student team history is returned correct: The teamed_students method is invoked when the student has team mates.&amp;quot;&lt;br /&gt;
:*The teamed_students method is invoked with name_required set to true.&lt;br /&gt;
:*Verify that the names of the previous teammates are returned.&lt;br /&gt;
&lt;br /&gt;
7. &amp;quot;To verify if the student team history is returned correct: The teamed_students method is invoked when the student has team mates.&amp;quot; &lt;br /&gt;
:*The teamed_students method is invoked with name_required set to false.&lt;br /&gt;
:*Verify that the user ids of the previous teammates are returned.&lt;br /&gt;
&lt;br /&gt;
8. &amp;quot;To verify if the student team history is returned correct: The teamed_students method is invoked when the student has team mates.&amp;quot;&lt;br /&gt;
:*The teamed_students method is invoked with exclude_assignment_id set to the current assignment id.&lt;br /&gt;
:*Verify that the user ids of team mates in the current assignment ids are not returned.&lt;br /&gt;
&lt;br /&gt;
9. &amp;quot;To verify if the student team history is returned correct: The teamed_students method is invoked when the student has team mates.&amp;quot;&lt;br /&gt;
:*The teamed_students method is invoked with include_assignment_id set to the current assignment id.&lt;br /&gt;
:*Verify that the user ids of team mates in the current assignment ids are only returned.&lt;br /&gt;
&lt;br /&gt;
10. &amp;quot;To verify if the top trading cycles is working correctly&amp;quot;&lt;br /&gt;
:*An assignment is created which implements the intelligent bidding.&lt;br /&gt;
:*4 students are created, of which 2 have an history of an assignment with the other 2(these are mutually exclusive)&lt;br /&gt;
:*The students are added to the assignment.&lt;br /&gt;
:*The students set the preference to be paired with new teammates.&lt;br /&gt;
:*The students prioritize topics. This is the bidding process.&lt;br /&gt;
:*The intelligent assignment is run for this particular assignment.&lt;br /&gt;
:*We expect that the student who have history together not be paired again, even if they have the same priority for the topics.&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=105938</id>
		<title>CSC/ECE 517 Fall 2016 E1707: Top trading cycles to exclude previous teammates</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=105938"/>
		<updated>2016-11-15T07:08:26Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: Adding a few test cases&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an open source web platform that enables students and instructors indulge in an enhanced and accelerated peer based learning milieu. It is aided by facilities like submissions of project work and reviews according to instructor approved deadlines, teaming up with other peers for various projects, reviewing other teams' and teammates' work and personalization of a project submission according to the best suited requirements. All these factors make Expertiza a valuable asset for an instructor to guide his students through the course with much more effectual results.&lt;br /&gt;
&lt;br /&gt;
Expertiza source code is built using Ruby on Rails and is available on github with public access enabled repository.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Currently, before the start of an assignment, students can be asked to form teams on their own or teams can be assigned by the instructor. As the main motive is guide students via peer based learning, thus more number of peers the student works with, better learning. So, to enable students find different people for the assignments rather than just team up with same people for every assignment in the current course, students can ask for a team to be randomly allocated by not choosing the team members before hand. After the bidding for the project topics is over, the student is allocated a team. Here, in this case it may be possible that the student is allocated a team member they have previously worked with before. Hence, to enable student circumvent this situation in case he/she prefers different people for the particular, we need to provide an option for the students to choose if they prefer different team members for the assignment before the bidding for the project topics happens.&lt;br /&gt;
&lt;br /&gt;
== Project Outline ==&lt;br /&gt;
The main objective is to give students an option to choose whether or not they want to team up with their previous team members for a particular assignment in the current course.&lt;br /&gt;
&lt;br /&gt;
If they choose the option, then when a student is added to the team, a check is performed if he/she has worked with the student before. If such is the case, then the student is swapped with some other student who hasn't worked with the same person before.&lt;br /&gt;
&lt;br /&gt;
Another point to note is that if the student chooses some person to be on the team who he/she has worked with before, choosing this option would still allow the person to remain in the team.&lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
To implement top trading cycle algorithm, we would be utilizing the web service that is hosted at http://peerlogic.csc.ncsu.edu/intelligent_assignment/swap_team_members. The students, and student history would be provided to the web service and the response from the web service would be utilized to update the teams. The web service is expected to respond back with new team after swapping the team members that have teamed up before.&lt;br /&gt;
As part of the changes, a new flag would be introduced in the teams model. The teams do not want to be changed (swapped) would have to unset the flag. If the flag is unset, the teams would not be send to the web service for the swap operation. &lt;br /&gt;
Only the instructor would see the option of utilizing this feature from the view. The feature would not be present for the students.&lt;br /&gt;
As part of the changes a new method would be added in the lottery controller to implement this functionality. The new method would have the responsibility to utilize the webserver and update the teams according to the web service.&lt;br /&gt;
A new button would be added in the instructor view for the assignments for invoking this new method. &lt;br /&gt;
A new checkbox would be added in the students view for selecting/un-selecting the option of swap.&lt;br /&gt;
&lt;br /&gt;
=== High Level Design ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Populating Data For the Web Service ====&lt;br /&gt;
[[File:GetDataForSwap.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Flow Diagram once the data is populated ==== &lt;br /&gt;
[[File:SendDataToWebService.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Detailed Workflow ===&lt;br /&gt;
&lt;br /&gt;
• The first step is to include a checkbox to provide student with an option to select if he/she want to be assigned new people who were not previously team up with the student.&lt;br /&gt;
&lt;br /&gt;
• An additional flag has to be introduced in the teams table that represents the value of the checkbox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following flow chart diagram describes this scenario at the front end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OODD-FinalDesignDocFlow1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
• After instructor initiates the team creation process, first check is to know whether the team members have already been chosen by the student. If yes, then the team is created as it is with the chosen members.&lt;br /&gt;
&lt;br /&gt;
• If, the student doesn't have all/some team members already selected, a team is created for the student by calling the create teams method in the top trading cycle service.&lt;br /&gt;
&lt;br /&gt;
• After a team is created, the flag is checked if the student wanted new team members for the assignment who were not team up before.&lt;br /&gt;
&lt;br /&gt;
• Then for each team member selected to be on the team, it is checked if the he/she has been teamed up with before. If no, then we move on to the next member.&lt;br /&gt;
&lt;br /&gt;
• If the team member has been teamed up with before, we call the swap method in the top trading cycle service and pass the student's team history. &lt;br /&gt;
&lt;br /&gt;
• Using that information, he/she is swapped with some other team member who hasn't been on the team.&lt;br /&gt;
&lt;br /&gt;
• This process repeats for each member, until we cover all the team members. At the end, we have our team ready.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following flow chart diagram describes this scenario at the back end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OODD-FinalDesignDocFlow2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Files To Be Modified ==&lt;br /&gt;
*app/views/assignments/_reserve_topic.html.erb&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
*app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
1. &amp;quot;To check if team creation will create teams with students having put up with the teammates previously teamed up with&amp;quot;&lt;br /&gt;
:*Set max number of students per team to 3.&lt;br /&gt;
:*Manually make change in DB to make 3 students previously team up with 3 other students.&lt;br /&gt;
:*Have 6 students bid for a topic.&lt;br /&gt;
:*Call the team creation method&lt;br /&gt;
:*Check if any student is paired with a student they had already teamed up with. If no, then this test is a success.&lt;br /&gt;
&lt;br /&gt;
2. &amp;quot;To check if the new team creation algorithm does not allocate more than the max number of people per team&amp;quot;&lt;br /&gt;
:*Set max number of students per team to 2.&lt;br /&gt;
:*Have 6 students bid for a topic.&lt;br /&gt;
:*Call the team creation method.&lt;br /&gt;
:*Check if any team has more than 2 students.&lt;br /&gt;
&lt;br /&gt;
3. &amp;quot;To check if students who have chosen their own team members are not swapped even though they might have worked together before&amp;quot;&lt;br /&gt;
:*Make 2 students teammates. For convenience, let the students be 'A' and 'B'.&lt;br /&gt;
:*Set max number of students per team to 3.&lt;br /&gt;
:*Have a total of 6 students choose topics.&lt;br /&gt;
:*Check that in the team containing the 'A', 'B' is also present.&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=105372</id>
		<title>CSC/ECE 517 Fall 2016 E1707: Top trading cycles to exclude previous teammates</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=105372"/>
		<updated>2016-11-10T15:50:31Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: Formatting - removed extra bullet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an open source web platform that enables students and instructors indulge in an enhanced and accelerated peer based learning milieu. It is aided by facilities like submissions of project work and reviews according to instructor approved deadlines, teaming up with other peers for various projects, reviewing other teams' and teammates' work and personalization of a project submission according to the best suited requirements. All these factors make Expertiza a valuable asset for an instructor to guide his students through the course with much more effectual results.&lt;br /&gt;
&lt;br /&gt;
Expertiza source code is built using Ruby on Rails and is available on github with public access enabled repository.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Currently, before the start of an assignment, students can be asked to form teams on their own or teams can be assigned by the instructor. As the main motive is guide students via peer based learning, thus more number of peers the student works with, better learning. So, to enable students find different people for the assignments rather than just team up with same people for every assignment in the current course, students can ask for a team to be randomly allocated by not choosing the team members before hand. After the bidding for the project topics is over, the student is allocated a team. Here, in this case it may be possible that the student is allocated a team member they have previously worked with before. Hence, to enable student circumvent this situation in case he/she prefers different people for the particular, we need to provide an option for the students to choose if they prefer different team members for the assignment before the bidding for the project topics happens.&lt;br /&gt;
&lt;br /&gt;
== Project Outline ==&lt;br /&gt;
The main objective is to give students an option to choose whether or not they want to team up with their previous team members for a particular assignment in the current course.&lt;br /&gt;
&lt;br /&gt;
If they choose the option, then when a student is added to the team, a check is performed if he/she has worked with the student before. If such is the case, then the student is swapped with some other student who hasn't worked with the same person before.&lt;br /&gt;
&lt;br /&gt;
Another point to note is that if the student chooses some person to be on the team who he/she has worked with before, choosing this option would still allow the person to remain in the team.&lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
To implement top trading cycle algorithm, we would be utilizing the web service that is hosted at http://peerlogic.csc.ncsu.edu/intelligent_assignment/swap_team_members. The students, and student history would be provided to the web service and the response from the web service would be utilized to update the teams. The web service is expected to respond back with new team after swapping the team members that have teamed up before.&lt;br /&gt;
As part of the changes, a new flag would be introduced in the teams model. The teams do not want to be changed (swapped) would have to unset the flag. If the flag is unset, the teams would not be send to the web service for the swap operation. &lt;br /&gt;
Only the instructor would see the option of utilizing this feature from the view. The feature would not be present for the students.&lt;br /&gt;
As part of the changes a new method would be added in the lottery controller to implement this functionality. The new method would have the responsibility to utilize the webserver and update the teams according to the web service.&lt;br /&gt;
A new button would be added in the instructor view for the assignments for invoking this new method. &lt;br /&gt;
A new checkbox would be added in the students view for selecting/un-selecting the option of swap.&lt;br /&gt;
&lt;br /&gt;
=== High Level Design ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Populating Data For the Web Service ====&lt;br /&gt;
[[File:GetDataForSwap.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Flow Diagram once the data is populated ==== &lt;br /&gt;
[[File:SendDataToWebService.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Detailed Workflow ===&lt;br /&gt;
&lt;br /&gt;
• The first step is to include a checkbox to provide student with an option to select if he/she want to be assigned new people who were not previously team up with the student.&lt;br /&gt;
&lt;br /&gt;
• An additional flag has to be introduced in the teams table that represents the value of the checkbox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following flow chart diagram describes this scenario at the front end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OODD-FinalDesignDocFlow1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
• After instructor initiates the team creation process, first check is to know whether the team members have already been chosen by the student. If yes, then the team is created as it is with the chosen members.&lt;br /&gt;
&lt;br /&gt;
• If, the student doesn't have all/some team members already selected, a team is created for the student by calling the create teams method in the top trading cycle service.&lt;br /&gt;
&lt;br /&gt;
• After a team is created, the flag is checked if the student wanted new team members for the assignment who were not team up before.&lt;br /&gt;
&lt;br /&gt;
• Then for each team member selected to be on the team, it is checked if the he/she has been teamed up with before. If no, then we move on to the next member.&lt;br /&gt;
&lt;br /&gt;
• If the team member has been teamed up with before, we call the swap method in the top trading cycle service and pass the student's team history. &lt;br /&gt;
&lt;br /&gt;
• Using that information, he/she is swapped with some other team member who hasn't been on the team.&lt;br /&gt;
&lt;br /&gt;
• This process repeats for each member, until we cover all the team members. At the end, we have our team ready.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following flow chart diagram describes this scenario at the back end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OODD-FinalDesignDocFlow2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Files To Be Modified ==&lt;br /&gt;
*app/views/assignments/_reserve_topic.html.erb&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
*app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
1. &amp;quot;To check if team creation will create teams with students having put up with the teammates previously teamed up with&amp;quot;&lt;br /&gt;
:*Manually make change in DB to make 3 students previously team up with 3 other students.&lt;br /&gt;
:*Have 6 students bid for a topic.&lt;br /&gt;
:*Call the team creation method&lt;br /&gt;
:*Check if any student is paired with a student they had already teamed up with. If no, then this test is a success.&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=105371</id>
		<title>CSC/ECE 517 Fall 2016 E1707: Top trading cycles to exclude previous teammates</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=105371"/>
		<updated>2016-11-10T15:50:02Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: Adding a test case&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an open source web platform that enables students and instructors indulge in an enhanced and accelerated peer based learning milieu. It is aided by facilities like submissions of project work and reviews according to instructor approved deadlines, teaming up with other peers for various projects, reviewing other teams' and teammates' work and personalization of a project submission according to the best suited requirements. All these factors make Expertiza a valuable asset for an instructor to guide his students through the course with much more effectual results.&lt;br /&gt;
&lt;br /&gt;
Expertiza source code is built using Ruby on Rails and is available on github with public access enabled repository.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Currently, before the start of an assignment, students can be asked to form teams on their own or teams can be assigned by the instructor. As the main motive is guide students via peer based learning, thus more number of peers the student works with, better learning. So, to enable students find different people for the assignments rather than just team up with same people for every assignment in the current course, students can ask for a team to be randomly allocated by not choosing the team members before hand. After the bidding for the project topics is over, the student is allocated a team. Here, in this case it may be possible that the student is allocated a team member they have previously worked with before. Hence, to enable student circumvent this situation in case he/she prefers different people for the particular, we need to provide an option for the students to choose if they prefer different team members for the assignment before the bidding for the project topics happens.&lt;br /&gt;
&lt;br /&gt;
== Project Outline ==&lt;br /&gt;
The main objective is to give students an option to choose whether or not they want to team up with their previous team members for a particular assignment in the current course.&lt;br /&gt;
&lt;br /&gt;
If they choose the option, then when a student is added to the team, a check is performed if he/she has worked with the student before. If such is the case, then the student is swapped with some other student who hasn't worked with the same person before.&lt;br /&gt;
&lt;br /&gt;
Another point to note is that if the student chooses some person to be on the team who he/she has worked with before, choosing this option would still allow the person to remain in the team.&lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
To implement top trading cycle algorithm, we would be utilizing the web service that is hosted at http://peerlogic.csc.ncsu.edu/intelligent_assignment/swap_team_members. The students, and student history would be provided to the web service and the response from the web service would be utilized to update the teams. The web service is expected to respond back with new team after swapping the team members that have teamed up before.&lt;br /&gt;
As part of the changes, a new flag would be introduced in the teams model. The teams do not want to be changed (swapped) would have to unset the flag. If the flag is unset, the teams would not be send to the web service for the swap operation. &lt;br /&gt;
Only the instructor would see the option of utilizing this feature from the view. The feature would not be present for the students.&lt;br /&gt;
As part of the changes a new method would be added in the lottery controller to implement this functionality. The new method would have the responsibility to utilize the webserver and update the teams according to the web service.&lt;br /&gt;
A new button would be added in the instructor view for the assignments for invoking this new method. &lt;br /&gt;
A new checkbox would be added in the students view for selecting/un-selecting the option of swap.&lt;br /&gt;
&lt;br /&gt;
=== High Level Design ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Populating Data For the Web Service ====&lt;br /&gt;
[[File:GetDataForSwap.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Flow Diagram once the data is populated ==== &lt;br /&gt;
[[File:SendDataToWebService.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Detailed Workflow ===&lt;br /&gt;
&lt;br /&gt;
• The first step is to include a checkbox to provide student with an option to select if he/she want to be assigned new people who were not previously team up with the student.&lt;br /&gt;
&lt;br /&gt;
• An additional flag has to be introduced in the teams table that represents the value of the checkbox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following flow chart diagram describes this scenario at the front end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OODD-FinalDesignDocFlow1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
• After instructor initiates the team creation process, first check is to know whether the team members have already been chosen by the student. If yes, then the team is created as it is with the chosen members.&lt;br /&gt;
&lt;br /&gt;
• If, the student doesn't have all/some team members already selected, a team is created for the student by calling the create teams method in the top trading cycle service.&lt;br /&gt;
&lt;br /&gt;
• After a team is created, the flag is checked if the student wanted new team members for the assignment who were not team up before.&lt;br /&gt;
&lt;br /&gt;
• Then for each team member selected to be on the team, it is checked if the he/she has been teamed up with before. If no, then we move on to the next member.&lt;br /&gt;
&lt;br /&gt;
• If the team member has been teamed up with before, we call the swap method in the top trading cycle service and pass the student's team history. &lt;br /&gt;
&lt;br /&gt;
• Using that information, he/she is swapped with some other team member who hasn't been on the team.&lt;br /&gt;
&lt;br /&gt;
• This process repeats for each member, until we cover all the team members. At the end, we have our team ready.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following flow chart diagram describes this scenario at the back end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OODD-FinalDesignDocFlow2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Files To Be Modified ==&lt;br /&gt;
*app/views/assignments/_reserve_topic.html.erb&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
*app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
1. &amp;quot;To check if team creation will create teams with students having put up with the teammates previously teamed up with&amp;quot;&lt;br /&gt;
:*Manually make change in DB to make 3 students previously team up with 3 other students.&lt;br /&gt;
:*Have 6 students bid for a topic.&lt;br /&gt;
:*Call the team creation method&lt;br /&gt;
:*Check if any student is paired with a student they had already teamed up with. If no, then this test is a success.&lt;br /&gt;
:*&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=104959</id>
		<title>CSC/ECE 517 Fall 2016 E1707: Top trading cycles to exclude previous teammates</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1707:_Top_trading_cycles_to_exclude_previous_teammates&amp;diff=104959"/>
		<updated>2016-11-09T20:01:34Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: Added a section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an open source web platform that enables students and instructors indulge in an enhanced and accelerated peer based learning milieu. It is aided by facilities like submissions of project work and reviews according to instructor approved deadlines, teaming up with other peers for various projects, reviewing other teams' and teammates' work and personalization of a project submission according to the best suited requirements. All these factors make Expertiza a valuable asset for an instructor to guide his students through the course with much more effectual results.&lt;br /&gt;
&lt;br /&gt;
Expertiza source code is built using Ruby on Rails and is available on github with public access enabled repository.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Currently, before the start of an assignment, students can be asked to form teams on their own or teams can be assigned by the instructor. As the main motive is guide students via peer based learning, thus more number of peers the student works with, better learning. So, to enable students find different people for the assignments rather than just team up with same people for every assignment in the current course, students can ask for a team to be randomly allocated by not choosing the team members before hand. After the bidding for the project topics is over, the student is allocated a team. Here, in this case it may be possible that the student is allocated a team member they have previously worked with before. Hence, to enable student circumvent this situation in case he/she prefers different people for the particular, we need to provide an option for the students to choose if they prefer different team members for the assignment before the bidding for the project topics happens.&lt;br /&gt;
&lt;br /&gt;
== Project Outline ==&lt;br /&gt;
The main objective is to give students an option to choose whether or not they want to team up with their previous team members for a particular assignment in the current course.&lt;br /&gt;
&lt;br /&gt;
If they choose the option, then when a student is added to the team, a check is performed if he/she has worked with the student before. If such is the case, then the student is swapped with some other student who hasn't worked with the same person before.&lt;br /&gt;
&lt;br /&gt;
Another point to note is that if the student chooses some person to be on the team who he/she has worked with before, choosing this option would still allow the person to remain in the team.&lt;br /&gt;
&lt;br /&gt;
== Files To Be Modified ==&lt;br /&gt;
*app/views/assignments/_reserve_topic.html.erb&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
*app/controllers/lottery_controller.rb&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=104939</id>
		<title>CSC/ECE 517 Fall 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=104939"/>
		<updated>2016-11-09T18:40:18Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: Adding link for final project document&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.example.com link title]==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (Firebrick JS)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Active Job)]]&lt;br /&gt;
==Writing Assignments 2==&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1666. Test team functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1631. Refactoring Bidding Interface]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1671. Unit Tests for participants.rb Hierarchy]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1668.Test e-mailing functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1658. Refractor lottery_controller.rb and write integration tests]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1650. Sort instructor views alphabetically by default]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1645. Refactoring Tree Display Controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1659. Refactor on_the_fly_calc.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1653. Fix and improve rubric criteria]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1642. Refactor review_response_map.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1633. Refactor different question types from quiz feature]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1666. Test team functionality]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1654. Improve_date-picker_and_deadlines]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1652 Fix teammate advertisements and requests to join a team ]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1662. UI issues/fixes]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1673. Refactor question_type.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1675. Timestamp for student file &amp;amp; hyperlink submissions]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1640. Refactor response.rb and response_helper.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1634. Refactor and write unit test of due_date.rb and deadline_helper.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1654._Improve_network_security_features]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1670._Unit_tests_for_answers.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1641. Refactor review_mapping_controller.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1652_Implement_ImageMap_Support_Servo]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1648/Add_past_due_assignment]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1656. Improve imports]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1653_Implement_HTML_form_validation]]&lt;br /&gt;
==Final Project Design Document==&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1696  Improve Self-Review]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1676  Role-based reviewing]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1680. Improve survey functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1693. Drag-and-drop interface for creating rubrics]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1701. Accelerate RSpec testing]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1705. Tracking the time students look at the others' submissions]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1707: Top trading cycles to exclude previous teammates]]&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation&amp;diff=103603</id>
		<title>CSC/ECE 517 Fall 2016/E1664: Feature Test Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation&amp;diff=103603"/>
		<updated>2016-10-29T01:46:35Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: /* Fixes in existing broken Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&lt;br /&gt;
Expertiza is an open source web-based platform for the organizing and management of student project submissions and their evaluation, that supports augmentation of subject knowledge and accelerated learning via peer reviews. The application is meant for two types of users, instructors and students to use the application. Instructor can create and manage a course, enroll students in the course, create, manage and personalize assignments, project submissions and reviews for the particular course. Students can make their project submissions for the assignments allocated to them by their instructors for a course, give peer reviews, teammate reviews, create quizzes for their project reviewers, provide feedbacks and view their grades.&lt;br /&gt;
&lt;br /&gt;
=='''Objective'''==&lt;br /&gt;
Assignment Creation can be done in Expertiza by an instructor for a particular course. Two types of assignments can be created, Private and Public. Further, there are various ways an assignment's attributes can be modified by personalizing reviews, deadlines, teams allocation, rubrics, calibration etc associated with the particular assignment. Each one of these in turn have many other options through which an instructor can be selected and modified. There are many functionalities within assignment creation, thus the main motive for testing of this feature is to ensure that an instructor can create an assignment without any hick-ups with all of its properties intact. And this is&lt;br /&gt;
&lt;br /&gt;
===Files Modified===&lt;br /&gt;
* assignment_creation_spec.rb (Capybara spec file)&lt;br /&gt;
* factories.rb (FactoryGirl's factory file&lt;br /&gt;
&lt;br /&gt;
=='''Feature Testing Tools'''==&lt;br /&gt;
Test cases have been written using RSpec and Capybara. These two combined prove to be an excellent testing tool at the developer's disposal.&lt;br /&gt;
===Rspec===&lt;br /&gt;
RSpec is a very powerful testing tool primarily used Behavior Driven Development (BDD). In RSpec, test cases are written such that they describe the specific functionality in the system being tested and helps user in better visualization of what the test cases are supposed to do.&lt;br /&gt;
===Capybara===&lt;br /&gt;
Capybara is another extremely helpful testing tool specifically used for feature testing. It is a web-based automation framework, and coupled with RSpec allows developer to write the test cases which simulate the whole scenario. It comes with a user friendly DSL as the actions specified are very intuitive and easy to understand and follow.&lt;br /&gt;
&lt;br /&gt;
=='''Test Cases'''==&lt;br /&gt;
&lt;br /&gt;
===Fixes in existing broken Test Cases===&lt;br /&gt;
&lt;br /&gt;
Due to continual development of Expertiza, some of the existing test cases that were implemented with relatively older version of Expertiza were found broken at the starting of the project.&lt;br /&gt;
To make the assignment creation testing complete, and to avoid covering the same scenarios again by adding new working test cases unnecessarily, these test case were fixed. Some of the fixes that were provided as part of this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Some of the functionalities for which the test cases were written have been remodeled so they had to be skipped.&lt;br /&gt;
&lt;br /&gt;
2. Running the test cases were giving an error in the code, when fetching a row from the deadline type table.&lt;br /&gt;
*  We noticed that the structure of the test file was wrong. The code to populate the the &amp;quot;deadline types&amp;quot; did not run, but were supposed to run for each test case. We made this code run for all test cases.&lt;br /&gt;
&lt;br /&gt;
3. Rubrics test cases were searching for links that weren't present on the page. These issues were also fixed.&lt;br /&gt;
&lt;br /&gt;
===Newly Added Test Cases===&lt;br /&gt;
'''''1. Test Assignment Creation'''''&lt;br /&gt;
&lt;br /&gt;
''a. Test Creating public Assignment'': This test will check if public assignments are getting created properly or not with proper attributes. &lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;is able to create a public assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/new?private=0&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_availability_flag&amp;quot;)&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        name: 'public assignment for test',&lt;br /&gt;
        course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
        directory_path: 'testDirectory',&lt;br /&gt;
        spec_location: 'testLocation',&lt;br /&gt;
        microtask: true,&lt;br /&gt;
        is_calibrated: true,&lt;br /&gt;
        availability_flag: false&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''b. Test Creating private Assignment:'' This test will check if private assignments are getting created or not with proper attributes.&lt;br /&gt;
    it &amp;quot;is able to create a private assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/new?private=1&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_availability_flag&amp;quot;)&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        name: 'private assignment for test',&lt;br /&gt;
        course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
        directory_path: 'testDirectory',&lt;br /&gt;
        spec_location: 'testLocation'&lt;br /&gt;
        )&lt;br /&gt;
    end &lt;br /&gt;
 &lt;br /&gt;
''c. Create Assignment for Team '': This test will check the creation of new private assignment for the team. The maximum size of the team is 3 and the test will check if all these features are there or not. &lt;br /&gt;
    it &amp;quot;is able to create with teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 3&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        max_team_size: 3,&lt;br /&gt;
        show_teammate_reviews: true&lt;br /&gt;
        )&lt;br /&gt;
    end &lt;br /&gt;
&lt;br /&gt;
''d. Create Assignment with Quiz:'' This test will check the creation of new private assignment with the quiz. The maximum number of questions in the quiz is 3 and the test will check if all these features are present or not.&lt;br /&gt;
    it &amp;quot;is able to create with quiz&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_require_quiz&amp;quot;)&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      fill_in 'assignment_form_assignment_num_quiz_questions', with: 3&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        num_quiz_questions: 3,&lt;br /&gt;
        require_quiz: true&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''e. Create Assignment with staggered deadline :''&lt;br /&gt;
    it &amp;quot;is able to create with staggered deadline&amp;quot; do&lt;br /&gt;
      skip('skip test on staggered deadline temporarily')&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      begin&lt;br /&gt;
        check(&amp;quot;assignment_form_assignment_staggered_deadline&amp;quot;)&lt;br /&gt;
      rescue&lt;br /&gt;
        return&lt;br /&gt;
      end&lt;br /&gt;
      page.driver.browser.switch_to.alert.accept&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      fill_in 'assignment_form_assignment_days_between_submissions', with: 7&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      pending(%(not sure what's broken here but the error is: #ActionController::RoutingError: No route matches [GET] &lt;br /&gt;
                  &amp;quot;/asset/staggered_deadline_assignment_grap/graph_1.jpg&amp;quot;))&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        staggered_deadline: true&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
   &lt;br /&gt;
''f. Create Assignment with review visible to all reviewers:'' This test will check the creation of new private assignment with review visible to all the reviewers. &lt;br /&gt;
    it &amp;quot;is able to create with review visible to all reviewers&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      #click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
                                name: 'private assignment for test',&lt;br /&gt;
                                course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
                                directory_path: 'testDirectory',&lt;br /&gt;
                                spec_location: 'testLocation')&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''g. Create public micro-task assignment:'' This test will check creation of new public assignment with microtasks. &lt;br /&gt;
   it &amp;quot;is able to create public micro-task assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check('assignment_form_assignment_microtask')&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(microtask: true)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''h. create calibrated public assignment: '' This test will check creation of new calibrated public assignment.&lt;br /&gt;
   it &amp;quot;is able to create calibrated public assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
                                is_calibrated: true)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
'''2. Test General Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Edit assignment available to students: '' This test will edit the existing assignment and enable micro tasks and calibrated options. The test will verify if all these options are updated in the assignment.&lt;br /&gt;
   it &amp;quot;should edit assignment available to students&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          microtask: true,&lt;br /&gt;
          is_calibrated: true,&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''b. Edit number of quizzes available to students: '' This test will check the feature of editing the number of quizzes in the existing assignment. &lt;br /&gt;
   it &amp;quot;should edit quiz number available to students&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_require_quiz&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      fill_in 'assignment_form_assignment_num_quiz_questions', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          num_quiz_questions: 5,&lt;br /&gt;
          require_quiz: true&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''c. Edit number of members per team in an Assignment''&lt;br /&gt;
    it &amp;quot;should edit number of members per team &amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          max_team_size: 5,&lt;br /&gt;
          show_teammate_reviews: true&lt;br /&gt;
        )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
''e. Edit review visible to all other reviewers'''&lt;br /&gt;
    it &amp;quot;should edit review visible to all other reviewers&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check (&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1'&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''f. Should create teammate review row in rubrics''&lt;br /&gt;
   it &amp;quot;should create teammate review row in rubrics&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      click_link 'Rubrics'&lt;br /&gt;
      expect page.should have_css(&amp;quot;table#assignment_questionnaire_table tr&amp;quot;, :count=&amp;gt;4)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''g. Check if checking calibration shows the tab''&lt;br /&gt;
    it &amp;quot;check if checking calibration shows the tab&amp;quot; do&lt;br /&gt;
      uncheck 'assignment_form_assignment_is_calibrated'&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      check 'assignment_form_assignment_is_calibrated'&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(page).to have_selector('#Calibration')&lt;br /&gt;
    end&lt;br /&gt;
 &lt;br /&gt;
'''3. Test Topic Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. edit topics properties - Check all options'' &lt;br /&gt;
   it &amp;quot;can edit topics properties - Check&amp;quot; do&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_allow_suggestions&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_intelligent&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_can_review_same_topic&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_can_choose_topic_to_review&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_use_bookmark&amp;quot;)&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        allow_suggestions: true,&lt;br /&gt;
        is_intelligent: true,&lt;br /&gt;
        can_review_same_topic: true,&lt;br /&gt;
        can_choose_topic_to_review: true,&lt;br /&gt;
        use_bookmark: true&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
          &lt;br /&gt;
''b. edit topics properties- uncheck all options''&lt;br /&gt;
  it &amp;quot;can edit topics properties - unCheck&amp;quot; do&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_allow_suggestions&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_is_intelligent&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_can_review_same_topic&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_can_choose_topic_to_review&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_use_bookmark&amp;quot;)&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        allow_suggestions: false,&lt;br /&gt;
        is_intelligent: false,&lt;br /&gt;
        can_review_same_topic: false,&lt;br /&gt;
        can_choose_topic_to_review: false,&lt;br /&gt;
        use_bookmark: false&lt;br /&gt;
      )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
''c. Add new topic ''&lt;br /&gt;
   it &amp;quot;Add new topic&amp;quot; do&lt;br /&gt;
      click_link 'New topic'&lt;br /&gt;
      click_button 'OK'&lt;br /&gt;
      fill_in 'topic_topic_identifier', with: '1'&lt;br /&gt;
      fill_in 'topic_topic_name', with: 'Test'&lt;br /&gt;
      fill_in 'topic_category', with: 'Test Category'&lt;br /&gt;
      fill_in 'topic_max_choosers', with: 2&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      sign_up_topics = SignUpTopic.where(topic_name: 'Test').first&lt;br /&gt;
      expect(sign_up_topics).to have_attributes(&lt;br /&gt;
        topic_name: 'Test',&lt;br /&gt;
        assignment_id: 1,&lt;br /&gt;
        max_choosers: 2,&lt;br /&gt;
        topic_identifier: '1',&lt;br /&gt;
        category: 'Test Category'&lt;br /&gt;
         )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''d. Delete existing topic ''&lt;br /&gt;
    it &amp;quot;Delete existing topic&amp;quot; do&lt;br /&gt;
      create(:sign_up_topic, assignment_id: @assignment[:id])&lt;br /&gt;
      visit &amp;quot;/assignments/#{@assignment[:id]}/edit&amp;quot;&lt;br /&gt;
      click_link 'Topics'&lt;br /&gt;
      all(:xpath, '//img[@title=&amp;quot;Delete Topic&amp;quot;]')[0].click&lt;br /&gt;
      click_button 'OK'&lt;br /&gt;
      topics_exist = SignUpTopic.count(:all, assignment_id: @assignment[:id])&lt;br /&gt;
      expect(topics_exist).to be_eql 0&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''4. Test Rubrics Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Update review questionnaire rubric''&lt;br /&gt;
    it &amp;quot;updates review questionnaire&amp;quot; do&lt;br /&gt;
          within(:css, &amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          uncheck('dropdown')&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][questionnaire_weight]', with: '50'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', with: '50'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        sleep 1&lt;br /&gt;
        questionnaire = get_questionnaire(&amp;quot;ReviewQuestionnaire2&amp;quot;).first&lt;br /&gt;
        expect(questionnaire).to have_attributes(&lt;br /&gt;
          questionnaire_weight: 50,&lt;br /&gt;
          notification_limit: 50&lt;br /&gt;
        )&lt;br /&gt;
      end&lt;br /&gt;
     &lt;br /&gt;
''b. Update scored question dropdown''&lt;br /&gt;
   it &amp;quot;should update scored question dropdown&amp;quot; do&lt;br /&gt;
        within(&amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        questionnaire = Questionnaire.where(name: &amp;quot;ReviewQuestionnaire2&amp;quot;).first&lt;br /&gt;
        assignment_questionnaire = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first&lt;br /&gt;
        expect(assignment_questionnaire.dropdown).to eq(false)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''c. Updates author feedback questionnaire''&lt;br /&gt;
     it &amp;quot;updates author feedback questionnaire&amp;quot; do&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_AuthorFeedbackQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          uncheck('dropdown')&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][questionnaire_weight]', with: '50'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', with: '50'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        questionnaire = get_questionnaire(&amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;).first&lt;br /&gt;
        expect(questionnaire).to have_attributes(&lt;br /&gt;
          questionnaire_weight: 50,&lt;br /&gt;
          notification_limit: 50&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''5. Test Review Strategy of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Test all auto selects feature'' &lt;br /&gt;
    it &amp;quot;auto selects&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/#{@assignment_id}/edit&amp;quot;&lt;br /&gt;
      find_link('ReviewStrategy').click&lt;br /&gt;
      select &amp;quot;Auto-Selected&amp;quot;, from: 'assignment_form_assignment_review_assignment_strategy'&lt;br /&gt;
      fill_in 'assignment_form_assignment_review_topic_threshold', with: 3&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_reviews_per_submission', with: 10&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        review_assignment_strategy: 'Auto-Selected',&lt;br /&gt;
        review_topic_threshold: 3,&lt;br /&gt;
        max_reviews_per_submission: 10&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''6. Test Due dates tab of assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. loads the due dates page''&lt;br /&gt;
   it &amp;quot;it loads the due dates page&amp;quot; do&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of review rounds&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''b. set the deadline for an assignment review''&lt;br /&gt;
   it &amp;quot;set the deadline for an assignment review&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_rounds_of_reviews', with: '1'&lt;br /&gt;
      fill_in 'datetimepicker_submission_round_1', with: '2017/10/01 12:00'&lt;br /&gt;
      fill_in 'datetimepicker_review_round_1', with: '2017/10/10 12:00'&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      submission_type_id = DeadlineType.where(name: 'submission')[0].id&lt;br /&gt;
      review_type_id = DeadlineType.where(name: 'review')[0].id&lt;br /&gt;
      submission_due_date = DueDate.find(1)&lt;br /&gt;
      review_due_date = DueDate.find(2)&lt;br /&gt;
      expect(submission_due_date).to have_attributes(&lt;br /&gt;
        deadline_type_id: submission_type_id,&lt;br /&gt;
        type: 'AssignmentDueDate'&lt;br /&gt;
      )&lt;br /&gt;
      expect(review_due_date).to have_attributes(&lt;br /&gt;
        deadline_type_id: review_type_id,&lt;br /&gt;
        type: 'AssignmentDueDate'&lt;br /&gt;
      )&lt;br /&gt;
   end  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Test Adding participants by Instructor'''&lt;br /&gt;
&lt;br /&gt;
''a. Add New Participants to assignment ''&lt;br /&gt;
    it &amp;quot;check to see if participants can be added&amp;quot; do&lt;br /&gt;
      student = create(:student)&lt;br /&gt;
      login_as('instructor6')&lt;br /&gt;
      assignment_id = Assignment.where(name: 'participants Assignment')[0].id&lt;br /&gt;
      visit &amp;quot;/participants/list?id=#{assignment_id}&amp;amp;model=Assignment&amp;quot;&lt;br /&gt;
      fill_in 'user_name', with: student.name&lt;br /&gt;
      choose 'user_role_participant'&lt;br /&gt;
      expect {&lt;br /&gt;
        click_button 'Add'&lt;br /&gt;
      }.to change {Participant.count}.by 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''b. Verify assignments assigned to participants''&lt;br /&gt;
   it &amp;quot;should display newly created assignment&amp;quot; do&lt;br /&gt;
      participant = create(:participant)&lt;br /&gt;
      login_as(participant.name)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;participants Assignment&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Check if assignment can be added to a course'''&lt;br /&gt;
 &lt;br /&gt;
 it &amp;quot;check to find if the assignment can be added to a course&amp;quot;, js: true  do&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    create(:course, name: 'Test Course')&lt;br /&gt;
    course_id = Course.where(name: 'test Course')[0].id&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as('instructor6')&lt;br /&gt;
    visit &amp;quot;/assignments/associate_assignment_with_course?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    choose &amp;quot;course_id_#{course_id}&amp;quot;&lt;br /&gt;
    click_button 'Save'&lt;br /&gt;
    assignment_row = Assignment.where(name: 'Test Assignment')[0]&lt;br /&gt;
    expect(assignment_row).to have_attributes(&lt;br /&gt;
      course_id: course_id&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1. Github Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
2. RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
3. Capybara [https://github.com/jnicklas/capybara]&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation&amp;diff=103595</id>
		<title>CSC/ECE 517 Fall 2016/E1664: Feature Test Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation&amp;diff=103595"/>
		<updated>2016-10-29T01:44:34Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&lt;br /&gt;
Expertiza is an open source web-based platform for the organizing and management of student project submissions and their evaluation, that supports augmentation of subject knowledge and accelerated learning via peer reviews. The application is meant for two types of users, instructors and students to use the application. Instructor can create and manage a course, enroll students in the course, create, manage and personalize assignments, project submissions and reviews for the particular course. Students can make their project submissions for the assignments allocated to them by their instructors for a course, give peer reviews, teammate reviews, create quizzes for their project reviewers, provide feedbacks and view their grades.&lt;br /&gt;
&lt;br /&gt;
=='''Objective'''==&lt;br /&gt;
Assignment Creation can be done in Expertiza by an instructor for a particular course. Two types of assignments can be created, Private and Public. Further, there are various ways an assignment's attributes can be modified by personalizing reviews, deadlines, teams allocation, rubrics, calibration etc associated with the particular assignment. Each one of these in turn have many other options through which an instructor can be selected and modified. There are many functionalities within assignment creation, thus the main motive for testing of this feature is to ensure that an instructor can create an assignment without any hick-ups with all of its properties intact. And this is&lt;br /&gt;
&lt;br /&gt;
===Files Modified===&lt;br /&gt;
* assignment_creation_spec.rb (Capybara spec file)&lt;br /&gt;
* factories.rb (FactoryGirl's factory file&lt;br /&gt;
&lt;br /&gt;
=='''Feature Testing Tools'''==&lt;br /&gt;
Test cases have been written using RSpec and Capybara. These two combined prove to be an excellent testing tool at the developer's disposal.&lt;br /&gt;
===Rspec===&lt;br /&gt;
RSpec is a very powerful testing tool primarily used Behavior Driven Development (BDD). In RSpec, test cases are written such that they describe the specific functionality in the system being tested and helps user in better visualization of what the test cases are supposed to do.&lt;br /&gt;
===Capybara===&lt;br /&gt;
Capybara is another extremely helpful testing tool specifically used for feature testing. It is a web-based automation framework, and coupled with RSpec allows developer to write the test cases which simulate the whole scenario. It comes with a user friendly DSL as the actions specified are very intuitive and easy to understand and follow.&lt;br /&gt;
&lt;br /&gt;
=='''Test Cases'''==&lt;br /&gt;
&lt;br /&gt;
===Fixes in existing broken Test Cases===&lt;br /&gt;
&lt;br /&gt;
Due to continual development of Expertiza, some of the existing test cases that were implemented with relatively older version of Expertiza were found broken at the starting of the project.&lt;br /&gt;
To make the assignment creation testing complete, and to avoid covering the same scenarios again by adding new working test cases unnecessarily, these test case were fixed. Some of the fixes that were provided as part of this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Some of the functionalities for which the test cases were written have been remodeled so they had to be skipped.&lt;br /&gt;
&lt;br /&gt;
2. Running the test cases were giving an error in the code, when fetching a row from the deadline type table.&lt;br /&gt;
*  We noticed that the structure of the test file was wrong. The code to populate the the &amp;quot;deadline types&amp;quot; did not run, but were supposed to run for each test case. We made this code run for all test cases.&lt;br /&gt;
&lt;br /&gt;
===Newly Added Test Cases===&lt;br /&gt;
'''''1. Test Assignment Creation'''''&lt;br /&gt;
&lt;br /&gt;
''a. Test Creating public Assignment'': This test will check if public assignments are getting created properly or not with proper attributes. &lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;is able to create a public assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/new?private=0&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_availability_flag&amp;quot;)&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        name: 'public assignment for test',&lt;br /&gt;
        course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
        directory_path: 'testDirectory',&lt;br /&gt;
        spec_location: 'testLocation',&lt;br /&gt;
        microtask: true,&lt;br /&gt;
        is_calibrated: true,&lt;br /&gt;
        availability_flag: false&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''b. Test Creating private Assignment:'' This test will check if private assignments are getting created or not with proper attributes.&lt;br /&gt;
    it &amp;quot;is able to create a private assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/new?private=1&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_availability_flag&amp;quot;)&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        name: 'private assignment for test',&lt;br /&gt;
        course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
        directory_path: 'testDirectory',&lt;br /&gt;
        spec_location: 'testLocation'&lt;br /&gt;
        )&lt;br /&gt;
    end &lt;br /&gt;
 &lt;br /&gt;
''c. Create Assignment for Team '': This test will check the creation of new private assignment for the team. The maximum size of the team is 3 and the test will check if all these features are there or not. &lt;br /&gt;
    it &amp;quot;is able to create with teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 3&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        max_team_size: 3,&lt;br /&gt;
        show_teammate_reviews: true&lt;br /&gt;
        )&lt;br /&gt;
    end &lt;br /&gt;
&lt;br /&gt;
''d. Create Assignment with Quiz:'' This test will check the creation of new private assignment with the quiz. The maximum number of questions in the quiz is 3 and the test will check if all these features are present or not.&lt;br /&gt;
    it &amp;quot;is able to create with quiz&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_require_quiz&amp;quot;)&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      fill_in 'assignment_form_assignment_num_quiz_questions', with: 3&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        num_quiz_questions: 3,&lt;br /&gt;
        require_quiz: true&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''e. Create Assignment with staggered deadline :''&lt;br /&gt;
    it &amp;quot;is able to create with staggered deadline&amp;quot; do&lt;br /&gt;
      skip('skip test on staggered deadline temporarily')&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      begin&lt;br /&gt;
        check(&amp;quot;assignment_form_assignment_staggered_deadline&amp;quot;)&lt;br /&gt;
      rescue&lt;br /&gt;
        return&lt;br /&gt;
      end&lt;br /&gt;
      page.driver.browser.switch_to.alert.accept&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      fill_in 'assignment_form_assignment_days_between_submissions', with: 7&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      pending(%(not sure what's broken here but the error is: #ActionController::RoutingError: No route matches [GET] &lt;br /&gt;
                  &amp;quot;/asset/staggered_deadline_assignment_grap/graph_1.jpg&amp;quot;))&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        staggered_deadline: true&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
   &lt;br /&gt;
''f. Create Assignment with review visible to all reviewers:'' This test will check the creation of new private assignment with review visible to all the reviewers. &lt;br /&gt;
    it &amp;quot;is able to create with review visible to all reviewers&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      #click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
                                name: 'private assignment for test',&lt;br /&gt;
                                course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
                                directory_path: 'testDirectory',&lt;br /&gt;
                                spec_location: 'testLocation')&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''g. Create public micro-task assignment:'' This test will check creation of new public assignment with microtasks. &lt;br /&gt;
   it &amp;quot;is able to create public micro-task assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check('assignment_form_assignment_microtask')&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(microtask: true)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''h. create calibrated public assignment: '' This test will check creation of new calibrated public assignment.&lt;br /&gt;
   it &amp;quot;is able to create calibrated public assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
                                is_calibrated: true)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
'''2. Test General Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Edit assignment available to students: '' This test will edit the existing assignment and enable micro tasks and calibrated options. The test will verify if all these options are updated in the assignment.&lt;br /&gt;
   it &amp;quot;should edit assignment available to students&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          microtask: true,&lt;br /&gt;
          is_calibrated: true,&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''b. Edit number of quizzes available to students: '' This test will check the feature of editing the number of quizzes in the existing assignment. &lt;br /&gt;
   it &amp;quot;should edit quiz number available to students&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_require_quiz&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      fill_in 'assignment_form_assignment_num_quiz_questions', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          num_quiz_questions: 5,&lt;br /&gt;
          require_quiz: true&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''c. Edit number of members per team in an Assignment''&lt;br /&gt;
    it &amp;quot;should edit number of members per team &amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          max_team_size: 5,&lt;br /&gt;
          show_teammate_reviews: true&lt;br /&gt;
        )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
''e. Edit review visible to all other reviewers'''&lt;br /&gt;
    it &amp;quot;should edit review visible to all other reviewers&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check (&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1'&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''f. Should create teammate review row in rubrics''&lt;br /&gt;
   it &amp;quot;should create teammate review row in rubrics&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      click_link 'Rubrics'&lt;br /&gt;
      expect page.should have_css(&amp;quot;table#assignment_questionnaire_table tr&amp;quot;, :count=&amp;gt;4)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''g. Check if checking calibration shows the tab''&lt;br /&gt;
    it &amp;quot;check if checking calibration shows the tab&amp;quot; do&lt;br /&gt;
      uncheck 'assignment_form_assignment_is_calibrated'&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      check 'assignment_form_assignment_is_calibrated'&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(page).to have_selector('#Calibration')&lt;br /&gt;
    end&lt;br /&gt;
 &lt;br /&gt;
'''3. Test Topic Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. edit topics properties - Check all options'' &lt;br /&gt;
   it &amp;quot;can edit topics properties - Check&amp;quot; do&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_allow_suggestions&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_intelligent&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_can_review_same_topic&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_can_choose_topic_to_review&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_use_bookmark&amp;quot;)&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        allow_suggestions: true,&lt;br /&gt;
        is_intelligent: true,&lt;br /&gt;
        can_review_same_topic: true,&lt;br /&gt;
        can_choose_topic_to_review: true,&lt;br /&gt;
        use_bookmark: true&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
          &lt;br /&gt;
''b. edit topics properties- uncheck all options''&lt;br /&gt;
  it &amp;quot;can edit topics properties - unCheck&amp;quot; do&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_allow_suggestions&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_is_intelligent&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_can_review_same_topic&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_can_choose_topic_to_review&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_use_bookmark&amp;quot;)&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        allow_suggestions: false,&lt;br /&gt;
        is_intelligent: false,&lt;br /&gt;
        can_review_same_topic: false,&lt;br /&gt;
        can_choose_topic_to_review: false,&lt;br /&gt;
        use_bookmark: false&lt;br /&gt;
      )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
''c. Add new topic ''&lt;br /&gt;
   it &amp;quot;Add new topic&amp;quot; do&lt;br /&gt;
      click_link 'New topic'&lt;br /&gt;
      click_button 'OK'&lt;br /&gt;
      fill_in 'topic_topic_identifier', with: '1'&lt;br /&gt;
      fill_in 'topic_topic_name', with: 'Test'&lt;br /&gt;
      fill_in 'topic_category', with: 'Test Category'&lt;br /&gt;
      fill_in 'topic_max_choosers', with: 2&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      sign_up_topics = SignUpTopic.where(topic_name: 'Test').first&lt;br /&gt;
      expect(sign_up_topics).to have_attributes(&lt;br /&gt;
        topic_name: 'Test',&lt;br /&gt;
        assignment_id: 1,&lt;br /&gt;
        max_choosers: 2,&lt;br /&gt;
        topic_identifier: '1',&lt;br /&gt;
        category: 'Test Category'&lt;br /&gt;
         )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''d. Delete existing topic ''&lt;br /&gt;
    it &amp;quot;Delete existing topic&amp;quot; do&lt;br /&gt;
      create(:sign_up_topic, assignment_id: @assignment[:id])&lt;br /&gt;
      visit &amp;quot;/assignments/#{@assignment[:id]}/edit&amp;quot;&lt;br /&gt;
      click_link 'Topics'&lt;br /&gt;
      all(:xpath, '//img[@title=&amp;quot;Delete Topic&amp;quot;]')[0].click&lt;br /&gt;
      click_button 'OK'&lt;br /&gt;
      topics_exist = SignUpTopic.count(:all, assignment_id: @assignment[:id])&lt;br /&gt;
      expect(topics_exist).to be_eql 0&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''4. Test Rubrics Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Update review questionnaire rubric''&lt;br /&gt;
    it &amp;quot;updates review questionnaire&amp;quot; do&lt;br /&gt;
          within(:css, &amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          uncheck('dropdown')&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][questionnaire_weight]', with: '50'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', with: '50'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        sleep 1&lt;br /&gt;
        questionnaire = get_questionnaire(&amp;quot;ReviewQuestionnaire2&amp;quot;).first&lt;br /&gt;
        expect(questionnaire).to have_attributes(&lt;br /&gt;
          questionnaire_weight: 50,&lt;br /&gt;
          notification_limit: 50&lt;br /&gt;
        )&lt;br /&gt;
      end&lt;br /&gt;
     &lt;br /&gt;
''b. Update scored question dropdown''&lt;br /&gt;
   it &amp;quot;should update scored question dropdown&amp;quot; do&lt;br /&gt;
        within(&amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        questionnaire = Questionnaire.where(name: &amp;quot;ReviewQuestionnaire2&amp;quot;).first&lt;br /&gt;
        assignment_questionnaire = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first&lt;br /&gt;
        expect(assignment_questionnaire.dropdown).to eq(false)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''c. Updates author feedback questionnaire''&lt;br /&gt;
     it &amp;quot;updates author feedback questionnaire&amp;quot; do&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_AuthorFeedbackQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          uncheck('dropdown')&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][questionnaire_weight]', with: '50'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', with: '50'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        questionnaire = get_questionnaire(&amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;).first&lt;br /&gt;
        expect(questionnaire).to have_attributes(&lt;br /&gt;
          questionnaire_weight: 50,&lt;br /&gt;
          notification_limit: 50&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''5. Test Review Strategy of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Test all auto selects feature'' &lt;br /&gt;
    it &amp;quot;auto selects&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/#{@assignment_id}/edit&amp;quot;&lt;br /&gt;
      find_link('ReviewStrategy').click&lt;br /&gt;
      select &amp;quot;Auto-Selected&amp;quot;, from: 'assignment_form_assignment_review_assignment_strategy'&lt;br /&gt;
      fill_in 'assignment_form_assignment_review_topic_threshold', with: 3&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_reviews_per_submission', with: 10&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        review_assignment_strategy: 'Auto-Selected',&lt;br /&gt;
        review_topic_threshold: 3,&lt;br /&gt;
        max_reviews_per_submission: 10&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''6. Test Due dates tab of assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. loads the due dates page''&lt;br /&gt;
   it &amp;quot;it loads the due dates page&amp;quot; do&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of review rounds&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''b. set the deadline for an assignment review''&lt;br /&gt;
   it &amp;quot;set the deadline for an assignment review&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_rounds_of_reviews', with: '1'&lt;br /&gt;
      fill_in 'datetimepicker_submission_round_1', with: '2017/10/01 12:00'&lt;br /&gt;
      fill_in 'datetimepicker_review_round_1', with: '2017/10/10 12:00'&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      submission_type_id = DeadlineType.where(name: 'submission')[0].id&lt;br /&gt;
      review_type_id = DeadlineType.where(name: 'review')[0].id&lt;br /&gt;
      submission_due_date = DueDate.find(1)&lt;br /&gt;
      review_due_date = DueDate.find(2)&lt;br /&gt;
      expect(submission_due_date).to have_attributes(&lt;br /&gt;
        deadline_type_id: submission_type_id,&lt;br /&gt;
        type: 'AssignmentDueDate'&lt;br /&gt;
      )&lt;br /&gt;
      expect(review_due_date).to have_attributes(&lt;br /&gt;
        deadline_type_id: review_type_id,&lt;br /&gt;
        type: 'AssignmentDueDate'&lt;br /&gt;
      )&lt;br /&gt;
   end  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Test Adding participants by Instructor'''&lt;br /&gt;
&lt;br /&gt;
''a. Add New Participants to assignment ''&lt;br /&gt;
    it &amp;quot;check to see if participants can be added&amp;quot; do&lt;br /&gt;
      student = create(:student)&lt;br /&gt;
      login_as('instructor6')&lt;br /&gt;
      assignment_id = Assignment.where(name: 'participants Assignment')[0].id&lt;br /&gt;
      visit &amp;quot;/participants/list?id=#{assignment_id}&amp;amp;model=Assignment&amp;quot;&lt;br /&gt;
      fill_in 'user_name', with: student.name&lt;br /&gt;
      choose 'user_role_participant'&lt;br /&gt;
      expect {&lt;br /&gt;
        click_button 'Add'&lt;br /&gt;
      }.to change {Participant.count}.by 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''b. Verify assignments assigned to participants''&lt;br /&gt;
   it &amp;quot;should display newly created assignment&amp;quot; do&lt;br /&gt;
      participant = create(:participant)&lt;br /&gt;
      login_as(participant.name)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;participants Assignment&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Check if assignment can be added to a course'''&lt;br /&gt;
 &lt;br /&gt;
 it &amp;quot;check to find if the assignment can be added to a course&amp;quot;, js: true  do&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    create(:course, name: 'Test Course')&lt;br /&gt;
    course_id = Course.where(name: 'test Course')[0].id&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as('instructor6')&lt;br /&gt;
    visit &amp;quot;/assignments/associate_assignment_with_course?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    choose &amp;quot;course_id_#{course_id}&amp;quot;&lt;br /&gt;
    click_button 'Save'&lt;br /&gt;
    assignment_row = Assignment.where(name: 'Test Assignment')[0]&lt;br /&gt;
    expect(assignment_row).to have_attributes(&lt;br /&gt;
      course_id: course_id&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1. Github Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
2. RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
3. Capybara [https://github.com/jnicklas/capybara]&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation&amp;diff=103593</id>
		<title>CSC/ECE 517 Fall 2016/E1664: Feature Test Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation&amp;diff=103593"/>
		<updated>2016-10-29T01:43:54Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: Added Files modified&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&lt;br /&gt;
Expertiza is an open source web-based platform for the organizing and management of student project submissions and their evaluation, that supports augmentation of subject knowledge and accelerated learning via peer reviews. The application is meant for two types of users, instructors and students to use the application. Instructor can create and manage a course, enroll students in the course, create, manage and personalize assignments, project submissions and reviews for the particular course. Students can make their project submissions for the assignments allocated to them by their instructors for a course, give peer reviews, teammate reviews, create quizzes for their project reviewers, provide feedbacks and view their grades.&lt;br /&gt;
&lt;br /&gt;
=='''Objective'''==&lt;br /&gt;
Assignment Creation can be done in Expertiza by an instructor for a particular course. Two types of assignments can be created, Private and Public. Further, there are various ways an assignment's attributes can be modified by personalizing reviews, deadlines, teams allocation, rubrics, calibration etc associated with the particular assignment. Each one of these in turn have many other options through which an instructor can be selected and modified. There are many functionalities within assignment creation, thus the main motive for testing of this feature is to ensure that an instructor can create an assignment without any hick-ups with all of its properties intact. And this is&lt;br /&gt;
&lt;br /&gt;
=='''Feature Testing Tools'''==&lt;br /&gt;
Test cases have been written using RSpec and Capybara. These two combined prove to be an excellent testing tool at the developer's disposal.&lt;br /&gt;
===Rspec===&lt;br /&gt;
RSpec is a very powerful testing tool primarily used Behavior Driven Development (BDD). In RSpec, test cases are written such that they describe the specific functionality in the system being tested and helps user in better visualization of what the test cases are supposed to do.&lt;br /&gt;
===Capybara===&lt;br /&gt;
Capybara is another extremely helpful testing tool specifically used for feature testing. It is a web-based automation framework, and coupled with RSpec allows developer to write the test cases which simulate the whole scenario. It comes with a user friendly DSL as the actions specified are very intuitive and easy to understand and follow.&lt;br /&gt;
&lt;br /&gt;
===Files Modified===&lt;br /&gt;
* assignment_creation_spec.rb (Capybara spec file)&lt;br /&gt;
* factories.rb (FactoryGirl's factory file)&lt;br /&gt;
&lt;br /&gt;
=='''Test Cases'''==&lt;br /&gt;
&lt;br /&gt;
===Fixes in existing broken Test Cases===&lt;br /&gt;
&lt;br /&gt;
Due to continual development of Expertiza, some of the existing test cases that were implemented with relatively older version of Expertiza were found broken at the starting of the project.&lt;br /&gt;
To make the assignment creation testing complete, and to avoid covering the same scenarios again by adding new working test cases unnecessarily, these test case were fixed. Some of the fixes that were provided as part of this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Some of the functionalities for which the test cases were written have been remodeled so they had to be skipped.&lt;br /&gt;
&lt;br /&gt;
2. Running the test cases were giving an error in the code, when fetching a row from the deadline type table.&lt;br /&gt;
*  We noticed that the structure of the test file was wrong. The code to populate the the &amp;quot;deadline types&amp;quot; did not run, but were supposed to run for each test case. We made this code run for all test cases.&lt;br /&gt;
&lt;br /&gt;
===Newly Added Test Cases===&lt;br /&gt;
'''''1. Test Assignment Creation'''''&lt;br /&gt;
&lt;br /&gt;
''a. Test Creating public Assignment'': This test will check if public assignments are getting created properly or not with proper attributes. &lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;is able to create a public assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/new?private=0&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_availability_flag&amp;quot;)&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        name: 'public assignment for test',&lt;br /&gt;
        course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
        directory_path: 'testDirectory',&lt;br /&gt;
        spec_location: 'testLocation',&lt;br /&gt;
        microtask: true,&lt;br /&gt;
        is_calibrated: true,&lt;br /&gt;
        availability_flag: false&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''b. Test Creating private Assignment:'' This test will check if private assignments are getting created or not with proper attributes.&lt;br /&gt;
    it &amp;quot;is able to create a private assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/new?private=1&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_availability_flag&amp;quot;)&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        name: 'private assignment for test',&lt;br /&gt;
        course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
        directory_path: 'testDirectory',&lt;br /&gt;
        spec_location: 'testLocation'&lt;br /&gt;
        )&lt;br /&gt;
    end &lt;br /&gt;
 &lt;br /&gt;
''c. Create Assignment for Team '': This test will check the creation of new private assignment for the team. The maximum size of the team is 3 and the test will check if all these features are there or not. &lt;br /&gt;
    it &amp;quot;is able to create with teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 3&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        max_team_size: 3,&lt;br /&gt;
        show_teammate_reviews: true&lt;br /&gt;
        )&lt;br /&gt;
    end &lt;br /&gt;
&lt;br /&gt;
''d. Create Assignment with Quiz:'' This test will check the creation of new private assignment with the quiz. The maximum number of questions in the quiz is 3 and the test will check if all these features are present or not.&lt;br /&gt;
    it &amp;quot;is able to create with quiz&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_require_quiz&amp;quot;)&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      fill_in 'assignment_form_assignment_num_quiz_questions', with: 3&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        num_quiz_questions: 3,&lt;br /&gt;
        require_quiz: true&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''e. Create Assignment with staggered deadline :''&lt;br /&gt;
    it &amp;quot;is able to create with staggered deadline&amp;quot; do&lt;br /&gt;
      skip('skip test on staggered deadline temporarily')&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      begin&lt;br /&gt;
        check(&amp;quot;assignment_form_assignment_staggered_deadline&amp;quot;)&lt;br /&gt;
      rescue&lt;br /&gt;
        return&lt;br /&gt;
      end&lt;br /&gt;
      page.driver.browser.switch_to.alert.accept&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      fill_in 'assignment_form_assignment_days_between_submissions', with: 7&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      pending(%(not sure what's broken here but the error is: #ActionController::RoutingError: No route matches [GET] &lt;br /&gt;
                  &amp;quot;/asset/staggered_deadline_assignment_grap/graph_1.jpg&amp;quot;))&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        staggered_deadline: true&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
   &lt;br /&gt;
''f. Create Assignment with review visible to all reviewers:'' This test will check the creation of new private assignment with review visible to all the reviewers. &lt;br /&gt;
    it &amp;quot;is able to create with review visible to all reviewers&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      #click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
                                name: 'private assignment for test',&lt;br /&gt;
                                course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
                                directory_path: 'testDirectory',&lt;br /&gt;
                                spec_location: 'testLocation')&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''g. Create public micro-task assignment:'' This test will check creation of new public assignment with microtasks. &lt;br /&gt;
   it &amp;quot;is able to create public micro-task assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check('assignment_form_assignment_microtask')&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(microtask: true)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''h. create calibrated public assignment: '' This test will check creation of new calibrated public assignment.&lt;br /&gt;
   it &amp;quot;is able to create calibrated public assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
                                is_calibrated: true)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
'''2. Test General Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Edit assignment available to students: '' This test will edit the existing assignment and enable micro tasks and calibrated options. The test will verify if all these options are updated in the assignment.&lt;br /&gt;
   it &amp;quot;should edit assignment available to students&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          microtask: true,&lt;br /&gt;
          is_calibrated: true,&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''b. Edit number of quizzes available to students: '' This test will check the feature of editing the number of quizzes in the existing assignment. &lt;br /&gt;
   it &amp;quot;should edit quiz number available to students&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_require_quiz&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      fill_in 'assignment_form_assignment_num_quiz_questions', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          num_quiz_questions: 5,&lt;br /&gt;
          require_quiz: true&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''c. Edit number of members per team in an Assignment''&lt;br /&gt;
    it &amp;quot;should edit number of members per team &amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          max_team_size: 5,&lt;br /&gt;
          show_teammate_reviews: true&lt;br /&gt;
        )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
''e. Edit review visible to all other reviewers'''&lt;br /&gt;
    it &amp;quot;should edit review visible to all other reviewers&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check (&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1'&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''f. Should create teammate review row in rubrics''&lt;br /&gt;
   it &amp;quot;should create teammate review row in rubrics&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      click_link 'Rubrics'&lt;br /&gt;
      expect page.should have_css(&amp;quot;table#assignment_questionnaire_table tr&amp;quot;, :count=&amp;gt;4)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''g. Check if checking calibration shows the tab''&lt;br /&gt;
    it &amp;quot;check if checking calibration shows the tab&amp;quot; do&lt;br /&gt;
      uncheck 'assignment_form_assignment_is_calibrated'&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      check 'assignment_form_assignment_is_calibrated'&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(page).to have_selector('#Calibration')&lt;br /&gt;
    end&lt;br /&gt;
 &lt;br /&gt;
'''3. Test Topic Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. edit topics properties - Check all options'' &lt;br /&gt;
   it &amp;quot;can edit topics properties - Check&amp;quot; do&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_allow_suggestions&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_intelligent&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_can_review_same_topic&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_can_choose_topic_to_review&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_use_bookmark&amp;quot;)&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        allow_suggestions: true,&lt;br /&gt;
        is_intelligent: true,&lt;br /&gt;
        can_review_same_topic: true,&lt;br /&gt;
        can_choose_topic_to_review: true,&lt;br /&gt;
        use_bookmark: true&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
          &lt;br /&gt;
''b. edit topics properties- uncheck all options''&lt;br /&gt;
  it &amp;quot;can edit topics properties - unCheck&amp;quot; do&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_allow_suggestions&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_is_intelligent&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_can_review_same_topic&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_can_choose_topic_to_review&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_use_bookmark&amp;quot;)&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        allow_suggestions: false,&lt;br /&gt;
        is_intelligent: false,&lt;br /&gt;
        can_review_same_topic: false,&lt;br /&gt;
        can_choose_topic_to_review: false,&lt;br /&gt;
        use_bookmark: false&lt;br /&gt;
      )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
''c. Add new topic ''&lt;br /&gt;
   it &amp;quot;Add new topic&amp;quot; do&lt;br /&gt;
      click_link 'New topic'&lt;br /&gt;
      click_button 'OK'&lt;br /&gt;
      fill_in 'topic_topic_identifier', with: '1'&lt;br /&gt;
      fill_in 'topic_topic_name', with: 'Test'&lt;br /&gt;
      fill_in 'topic_category', with: 'Test Category'&lt;br /&gt;
      fill_in 'topic_max_choosers', with: 2&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      sign_up_topics = SignUpTopic.where(topic_name: 'Test').first&lt;br /&gt;
      expect(sign_up_topics).to have_attributes(&lt;br /&gt;
        topic_name: 'Test',&lt;br /&gt;
        assignment_id: 1,&lt;br /&gt;
        max_choosers: 2,&lt;br /&gt;
        topic_identifier: '1',&lt;br /&gt;
        category: 'Test Category'&lt;br /&gt;
         )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''d. Delete existing topic ''&lt;br /&gt;
    it &amp;quot;Delete existing topic&amp;quot; do&lt;br /&gt;
      create(:sign_up_topic, assignment_id: @assignment[:id])&lt;br /&gt;
      visit &amp;quot;/assignments/#{@assignment[:id]}/edit&amp;quot;&lt;br /&gt;
      click_link 'Topics'&lt;br /&gt;
      all(:xpath, '//img[@title=&amp;quot;Delete Topic&amp;quot;]')[0].click&lt;br /&gt;
      click_button 'OK'&lt;br /&gt;
      topics_exist = SignUpTopic.count(:all, assignment_id: @assignment[:id])&lt;br /&gt;
      expect(topics_exist).to be_eql 0&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''4. Test Rubrics Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Update review questionnaire rubric''&lt;br /&gt;
    it &amp;quot;updates review questionnaire&amp;quot; do&lt;br /&gt;
          within(:css, &amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          uncheck('dropdown')&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][questionnaire_weight]', with: '50'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', with: '50'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        sleep 1&lt;br /&gt;
        questionnaire = get_questionnaire(&amp;quot;ReviewQuestionnaire2&amp;quot;).first&lt;br /&gt;
        expect(questionnaire).to have_attributes(&lt;br /&gt;
          questionnaire_weight: 50,&lt;br /&gt;
          notification_limit: 50&lt;br /&gt;
        )&lt;br /&gt;
      end&lt;br /&gt;
     &lt;br /&gt;
''b. Update scored question dropdown''&lt;br /&gt;
   it &amp;quot;should update scored question dropdown&amp;quot; do&lt;br /&gt;
        within(&amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        questionnaire = Questionnaire.where(name: &amp;quot;ReviewQuestionnaire2&amp;quot;).first&lt;br /&gt;
        assignment_questionnaire = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first&lt;br /&gt;
        expect(assignment_questionnaire.dropdown).to eq(false)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''c. Updates author feedback questionnaire''&lt;br /&gt;
     it &amp;quot;updates author feedback questionnaire&amp;quot; do&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_AuthorFeedbackQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          uncheck('dropdown')&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][questionnaire_weight]', with: '50'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', with: '50'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        questionnaire = get_questionnaire(&amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;).first&lt;br /&gt;
        expect(questionnaire).to have_attributes(&lt;br /&gt;
          questionnaire_weight: 50,&lt;br /&gt;
          notification_limit: 50&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''5. Test Review Strategy of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Test all auto selects feature'' &lt;br /&gt;
    it &amp;quot;auto selects&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/#{@assignment_id}/edit&amp;quot;&lt;br /&gt;
      find_link('ReviewStrategy').click&lt;br /&gt;
      select &amp;quot;Auto-Selected&amp;quot;, from: 'assignment_form_assignment_review_assignment_strategy'&lt;br /&gt;
      fill_in 'assignment_form_assignment_review_topic_threshold', with: 3&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_reviews_per_submission', with: 10&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        review_assignment_strategy: 'Auto-Selected',&lt;br /&gt;
        review_topic_threshold: 3,&lt;br /&gt;
        max_reviews_per_submission: 10&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''6. Test Due dates tab of assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. loads the due dates page''&lt;br /&gt;
   it &amp;quot;it loads the due dates page&amp;quot; do&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of review rounds&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''b. set the deadline for an assignment review''&lt;br /&gt;
   it &amp;quot;set the deadline for an assignment review&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_rounds_of_reviews', with: '1'&lt;br /&gt;
      fill_in 'datetimepicker_submission_round_1', with: '2017/10/01 12:00'&lt;br /&gt;
      fill_in 'datetimepicker_review_round_1', with: '2017/10/10 12:00'&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      submission_type_id = DeadlineType.where(name: 'submission')[0].id&lt;br /&gt;
      review_type_id = DeadlineType.where(name: 'review')[0].id&lt;br /&gt;
      submission_due_date = DueDate.find(1)&lt;br /&gt;
      review_due_date = DueDate.find(2)&lt;br /&gt;
      expect(submission_due_date).to have_attributes(&lt;br /&gt;
        deadline_type_id: submission_type_id,&lt;br /&gt;
        type: 'AssignmentDueDate'&lt;br /&gt;
      )&lt;br /&gt;
      expect(review_due_date).to have_attributes(&lt;br /&gt;
        deadline_type_id: review_type_id,&lt;br /&gt;
        type: 'AssignmentDueDate'&lt;br /&gt;
      )&lt;br /&gt;
   end  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Test Adding participants by Instructor'''&lt;br /&gt;
&lt;br /&gt;
''a. Add New Participants to assignment ''&lt;br /&gt;
    it &amp;quot;check to see if participants can be added&amp;quot; do&lt;br /&gt;
      student = create(:student)&lt;br /&gt;
      login_as('instructor6')&lt;br /&gt;
      assignment_id = Assignment.where(name: 'participants Assignment')[0].id&lt;br /&gt;
      visit &amp;quot;/participants/list?id=#{assignment_id}&amp;amp;model=Assignment&amp;quot;&lt;br /&gt;
      fill_in 'user_name', with: student.name&lt;br /&gt;
      choose 'user_role_participant'&lt;br /&gt;
      expect {&lt;br /&gt;
        click_button 'Add'&lt;br /&gt;
      }.to change {Participant.count}.by 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''b. Verify assignments assigned to participants''&lt;br /&gt;
   it &amp;quot;should display newly created assignment&amp;quot; do&lt;br /&gt;
      participant = create(:participant)&lt;br /&gt;
      login_as(participant.name)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;participants Assignment&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Check if assignment can be added to a course'''&lt;br /&gt;
 &lt;br /&gt;
 it &amp;quot;check to find if the assignment can be added to a course&amp;quot;, js: true  do&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    create(:course, name: 'Test Course')&lt;br /&gt;
    course_id = Course.where(name: 'test Course')[0].id&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as('instructor6')&lt;br /&gt;
    visit &amp;quot;/assignments/associate_assignment_with_course?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    choose &amp;quot;course_id_#{course_id}&amp;quot;&lt;br /&gt;
    click_button 'Save'&lt;br /&gt;
    assignment_row = Assignment.where(name: 'Test Assignment')[0]&lt;br /&gt;
    expect(assignment_row).to have_attributes(&lt;br /&gt;
      course_id: course_id&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1. Github Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
2. RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
3. Capybara [https://github.com/jnicklas/capybara]&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation&amp;diff=103578</id>
		<title>CSC/ECE 517 Fall 2016/E1664: Feature Test Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation&amp;diff=103578"/>
		<updated>2016-10-29T01:32:46Z</updated>

		<summary type="html">&lt;p&gt;Vmuruga: /* Fixes in existing broken Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&lt;br /&gt;
Expertiza is an open source web-based platform for the organizing and management of student project submissions and their evaluation, that supports augmentation of subject knowledge and accelerated learning via peer reviews. The application is meant for two types of users, instructors and students to use the application. Instructor can create and manage a course, enroll students in the course, create, manage and personalize assignments, project submissions and reviews for the particular course. Students can make their project submissions for the assignments allocated to them by their instructors for a course, give peer reviews, teammate reviews, create quizzes for their project reviewers, provide feedbacks and view their grades.&lt;br /&gt;
&lt;br /&gt;
=='''Objective'''==&lt;br /&gt;
Assignment Creation can be done in Expertiza by an instructor for a particular course. Two types of assignments can be created, Private and Public. Further, there are various ways an assignment's attributes can be modified by personalizing reviews, deadlines, teams allocation, rubrics, calibration etc associated with the particular assignment. Each one of these in turn have many other options through which an instructor can be selected and modified. There are many functionalities within assignment creation, thus the main motive for testing of this feature is to ensure that an instructor can create an assignment without any hick-ups with all of its properties intact. And this is&lt;br /&gt;
&lt;br /&gt;
=='''Feature Testing Tools'''==&lt;br /&gt;
Test cases have been written using RSpec and Capybara. These two combined prove to be an excellent testing tool at the developer's disposal.&lt;br /&gt;
===Rspec===&lt;br /&gt;
RSpec is a very powerful testing tool primarily used Behavior Driven Development (BDD). In RSpec, test cases are written such that they describe the specific functionality in the system being tested and helps user in better visualization of what the test cases are supposed to do.&lt;br /&gt;
===Capybara===&lt;br /&gt;
Capybara is another extremely helpful testing tool specifically used for feature testing. It is a web-based automation framework, and coupled with RSpec allows developer to write the test cases which simulate the whole scenario. It comes with a user friendly DSL as the actions specified are very intuitive and easy to understand and follow.&lt;br /&gt;
&lt;br /&gt;
=='''Test Cases'''==&lt;br /&gt;
&lt;br /&gt;
===Fixes in existing broken Test Cases===&lt;br /&gt;
&lt;br /&gt;
Due to continual development of Expertiza, some of the existing test cases that were implemented with relatively older version of Expertiza were found broken at the starting of the project.&lt;br /&gt;
To make the assignment creation testing complete, and to avoid covering the same scenarios again by adding new working test cases unnecessarily, these test case were fixed. Some of the fixes that were provided as part of this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Some of the functionalities for which the test cases were written have been remodeled so they had to be skipped.&lt;br /&gt;
&lt;br /&gt;
2. Running the test cases were giving an error in the code, when fetching a row from the deadline type table.&lt;br /&gt;
*  We noticed that the structure of the test file was wrong. The code to populate the the &amp;quot;deadline types&amp;quot; did not run, but were supposed to run for each test case. We made this code run for all test cases.&lt;br /&gt;
&lt;br /&gt;
===Newly Added Test Cases===&lt;br /&gt;
'''''1. Test Assignment Creation'''''&lt;br /&gt;
&lt;br /&gt;
''a. Test Creating public Assignment''&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;is able to create a public assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/new?private=0&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_availability_flag&amp;quot;)&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        name: 'public assignment for test',&lt;br /&gt;
        course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
        directory_path: 'testDirectory',&lt;br /&gt;
        spec_location: 'testLocation',&lt;br /&gt;
        microtask: true,&lt;br /&gt;
        is_calibrated: true,&lt;br /&gt;
        availability_flag: false&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''b. Test Creating private Assignment''&lt;br /&gt;
    it &amp;quot;is able to create a private assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/new?private=1&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_availability_flag&amp;quot;)&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        name: 'private assignment for test',&lt;br /&gt;
        course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
        directory_path: 'testDirectory',&lt;br /&gt;
        spec_location: 'testLocation'&lt;br /&gt;
        )&lt;br /&gt;
    end &lt;br /&gt;
 &lt;br /&gt;
''c. Create Assignment for Team ''&lt;br /&gt;
    it &amp;quot;is able to create with teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 3&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        max_team_size: 3,&lt;br /&gt;
        show_teammate_reviews: true&lt;br /&gt;
        )&lt;br /&gt;
    end &lt;br /&gt;
&lt;br /&gt;
''d. Create Assignment with Quiz''&lt;br /&gt;
    it &amp;quot;is able to create with quiz&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_require_quiz&amp;quot;)&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      fill_in 'assignment_form_assignment_num_quiz_questions', with: 3&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        num_quiz_questions: 3,&lt;br /&gt;
        require_quiz: true&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''e. Create Assignment with staggered deadline ''&lt;br /&gt;
    it &amp;quot;is able to create with staggered deadline&amp;quot; do&lt;br /&gt;
      skip('skip test on staggered deadline temporarily')&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      begin&lt;br /&gt;
        check(&amp;quot;assignment_form_assignment_staggered_deadline&amp;quot;)&lt;br /&gt;
      rescue&lt;br /&gt;
        return&lt;br /&gt;
      end&lt;br /&gt;
      page.driver.browser.switch_to.alert.accept&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      fill_in 'assignment_form_assignment_days_between_submissions', with: 7&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      pending(%(not sure what's broken here but the error is: #ActionController::RoutingError: No route matches [GET] &lt;br /&gt;
                  &amp;quot;/asset/staggered_deadline_assignment_grap/graph_1.jpg&amp;quot;))&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        staggered_deadline: true&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
   &lt;br /&gt;
''f. Create Assignment with review visible to all reviewers''&lt;br /&gt;
    it &amp;quot;is able to create with review visible to all reviewers&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'private assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'&lt;br /&gt;
      check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      expect(page).to have_select(&amp;quot;assignment_form[assignment][reputation_algorithm]&amp;quot;, options: ['--', 'Hamer', 'Lauw'])&lt;br /&gt;
      #click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'private assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
                                name: 'private assignment for test',&lt;br /&gt;
                                course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
                                directory_path: 'testDirectory',&lt;br /&gt;
                                spec_location: 'testLocation')&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''g. Create public micro-task assignment''&lt;br /&gt;
   it &amp;quot;is able to create public micro-task assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check('assignment_form_assignment_microtask')&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(microtask: true)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''h. create calibrated public assignment ''&lt;br /&gt;
   it &amp;quot;is able to create calibrated public assignment&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'public assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
                                is_calibrated: true)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
'''2. Test General Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Edit assignment available to students''&lt;br /&gt;
   it &amp;quot;should edit assignment available to students&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_microtask&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_calibrated&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          microtask: true,&lt;br /&gt;
          is_calibrated: true,&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''b. Edit number of quizzes available to students''&lt;br /&gt;
   it &amp;quot;should edit quiz number available to students&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_require_quiz&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      fill_in 'assignment_form_assignment_num_quiz_questions', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          num_quiz_questions: 5,&lt;br /&gt;
          require_quiz: true&lt;br /&gt;
      )&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''c. Edit number of members per team in an Assignment''&lt;br /&gt;
    it &amp;quot;should edit number of members per team &amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1',&lt;br /&gt;
          max_team_size: 5,&lt;br /&gt;
          show_teammate_reviews: true&lt;br /&gt;
        )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
''e. Edit review visible to all other reviewers'''&lt;br /&gt;
    it &amp;quot;should edit review visible to all other reviewers&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check (&amp;quot;assignment_form_assignment_reviews_visible_to_all&amp;quot;)&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'edit assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
          name: 'edit assignment for test',&lt;br /&gt;
          course_id: Course.find_by_name('Course 2')[:id],&lt;br /&gt;
          directory_path: 'testDirectory1',&lt;br /&gt;
          spec_location: 'testLocation1'&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''f. Should create teammate review row in rubrics''&lt;br /&gt;
   it &amp;quot;should create teammate review row in rubrics&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_name', with: 'edit assignment for test'&lt;br /&gt;
      select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
      fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory1'&lt;br /&gt;
      fill_in 'assignment_form_assignment_spec_location', with: 'testLocation1'&lt;br /&gt;
      check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_show_teammate_reviews&amp;quot;)&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 5&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      click_link 'Rubrics'&lt;br /&gt;
      expect page.should have_css(&amp;quot;table#assignment_questionnaire_table tr&amp;quot;, :count=&amp;gt;4)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''g. Check if checking calibration shows the tab''&lt;br /&gt;
    it &amp;quot;check if checking calibration shows the tab&amp;quot; do&lt;br /&gt;
      uncheck 'assignment_form_assignment_is_calibrated'&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      check 'assignment_form_assignment_is_calibrated'&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(page).to have_selector('#Calibration')&lt;br /&gt;
    end&lt;br /&gt;
 &lt;br /&gt;
'''3. Test Topic Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. edit topics properties - Check all options'' &lt;br /&gt;
   it &amp;quot;can edit topics properties - Check&amp;quot; do&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_allow_suggestions&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_is_intelligent&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_can_review_same_topic&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_can_choose_topic_to_review&amp;quot;)&lt;br /&gt;
      check(&amp;quot;assignment_form_assignment_use_bookmark&amp;quot;)&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        allow_suggestions: true,&lt;br /&gt;
        is_intelligent: true,&lt;br /&gt;
        can_review_same_topic: true,&lt;br /&gt;
        can_choose_topic_to_review: true,&lt;br /&gt;
        use_bookmark: true&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
          &lt;br /&gt;
''b. edit topics properties- uncheck all options''&lt;br /&gt;
  it &amp;quot;can edit topics properties - unCheck&amp;quot; do&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_allow_suggestions&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_is_intelligent&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_can_review_same_topic&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_can_choose_topic_to_review&amp;quot;)&lt;br /&gt;
      uncheck(&amp;quot;assignment_form_assignment_use_bookmark&amp;quot;)&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        allow_suggestions: false,&lt;br /&gt;
        is_intelligent: false,&lt;br /&gt;
        can_review_same_topic: false,&lt;br /&gt;
        can_choose_topic_to_review: false,&lt;br /&gt;
        use_bookmark: false&lt;br /&gt;
      )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
''c. Add new topic ''&lt;br /&gt;
   it &amp;quot;Add new topic&amp;quot; do&lt;br /&gt;
      click_link 'New topic'&lt;br /&gt;
      click_button 'OK'&lt;br /&gt;
      fill_in 'topic_topic_identifier', with: '1'&lt;br /&gt;
      fill_in 'topic_topic_name', with: 'Test'&lt;br /&gt;
      fill_in 'topic_category', with: 'Test Category'&lt;br /&gt;
      fill_in 'topic_max_choosers', with: 2&lt;br /&gt;
      click_button 'Create'&lt;br /&gt;
      sign_up_topics = SignUpTopic.where(topic_name: 'Test').first&lt;br /&gt;
      expect(sign_up_topics).to have_attributes(&lt;br /&gt;
        topic_name: 'Test',&lt;br /&gt;
        assignment_id: 1,&lt;br /&gt;
        max_choosers: 2,&lt;br /&gt;
        topic_identifier: '1',&lt;br /&gt;
        category: 'Test Category'&lt;br /&gt;
         )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''d. Delete existing topic ''&lt;br /&gt;
    it &amp;quot;Delete existing topic&amp;quot; do&lt;br /&gt;
      create(:sign_up_topic, assignment_id: @assignment[:id])&lt;br /&gt;
      visit &amp;quot;/assignments/#{@assignment[:id]}/edit&amp;quot;&lt;br /&gt;
      click_link 'Topics'&lt;br /&gt;
      all(:xpath, '//img[@title=&amp;quot;Delete Topic&amp;quot;]')[0].click&lt;br /&gt;
      click_button 'OK'&lt;br /&gt;
      topics_exist = SignUpTopic.count(:all, assignment_id: @assignment[:id])&lt;br /&gt;
      expect(topics_exist).to be_eql 0&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''4. Test Rubrics Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Update review questionnaire rubric''&lt;br /&gt;
    it &amp;quot;updates review questionnaire&amp;quot; do&lt;br /&gt;
          within(:css, &amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          uncheck('dropdown')&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][questionnaire_weight]', with: '50'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', with: '50'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        sleep 1&lt;br /&gt;
        questionnaire = get_questionnaire(&amp;quot;ReviewQuestionnaire2&amp;quot;).first&lt;br /&gt;
        expect(questionnaire).to have_attributes(&lt;br /&gt;
          questionnaire_weight: 50,&lt;br /&gt;
          notification_limit: 50&lt;br /&gt;
        )&lt;br /&gt;
      end&lt;br /&gt;
     &lt;br /&gt;
''b. Update scored question dropdown''&lt;br /&gt;
   it &amp;quot;should update scored question dropdown&amp;quot; do&lt;br /&gt;
        within(&amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        questionnaire = Questionnaire.where(name: &amp;quot;ReviewQuestionnaire2&amp;quot;).first&lt;br /&gt;
        assignment_questionnaire = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first&lt;br /&gt;
        expect(assignment_questionnaire.dropdown).to eq(false)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''c. Updates author feedback questionnaire''&lt;br /&gt;
     it &amp;quot;updates author feedback questionnaire&amp;quot; do&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_AuthorFeedbackQuestionnaire&amp;quot;) do&lt;br /&gt;
          select &amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
          uncheck('dropdown')&lt;br /&gt;
          select &amp;quot;Scale&amp;quot;, from: 'assignment_form[assignment_questionnaire][][dropdown]'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][questionnaire_weight]', with: '50'&lt;br /&gt;
          fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', with: '50'&lt;br /&gt;
        end&lt;br /&gt;
        click_button 'Save'&lt;br /&gt;
        questionnaire = get_questionnaire(&amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;).first&lt;br /&gt;
        expect(questionnaire).to have_attributes(&lt;br /&gt;
          questionnaire_weight: 50,&lt;br /&gt;
          notification_limit: 50&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''5. Test Review Strategy of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. Test all auto selects feature'' &lt;br /&gt;
    it &amp;quot;auto selects&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit &amp;quot;/assignments/#{@assignment_id}/edit&amp;quot;&lt;br /&gt;
      find_link('ReviewStrategy').click&lt;br /&gt;
      select &amp;quot;Auto-Selected&amp;quot;, from: 'assignment_form_assignment_review_assignment_strategy'&lt;br /&gt;
      fill_in 'assignment_form_assignment_review_topic_threshold', with: 3&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_reviews_per_submission', with: 10&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      assignment = Assignment.where(name: 'public assignment for test').first&lt;br /&gt;
      expect(assignment).to have_attributes(&lt;br /&gt;
        review_assignment_strategy: 'Auto-Selected',&lt;br /&gt;
        review_topic_threshold: 3,&lt;br /&gt;
        max_reviews_per_submission: 10&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
'''6. Test Due dates tab of assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
''a. loads the due dates page''&lt;br /&gt;
   it &amp;quot;it loads the due dates page&amp;quot; do&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of review rounds&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
''b. set the deadline for an assignment review''&lt;br /&gt;
   it &amp;quot;set the deadline for an assignment review&amp;quot; do&lt;br /&gt;
      fill_in 'assignment_form_assignment_rounds_of_reviews', with: '1'&lt;br /&gt;
      fill_in 'datetimepicker_submission_round_1', with: '2017/10/01 12:00'&lt;br /&gt;
      fill_in 'datetimepicker_review_round_1', with: '2017/10/10 12:00'&lt;br /&gt;
      click_button 'submit_btn'&lt;br /&gt;
      submission_type_id = DeadlineType.where(name: 'submission')[0].id&lt;br /&gt;
      review_type_id = DeadlineType.where(name: 'review')[0].id&lt;br /&gt;
      submission_due_date = DueDate.find(1)&lt;br /&gt;
      review_due_date = DueDate.find(2)&lt;br /&gt;
      expect(submission_due_date).to have_attributes(&lt;br /&gt;
        deadline_type_id: submission_type_id,&lt;br /&gt;
        type: 'AssignmentDueDate'&lt;br /&gt;
      )&lt;br /&gt;
      expect(review_due_date).to have_attributes(&lt;br /&gt;
        deadline_type_id: review_type_id,&lt;br /&gt;
        type: 'AssignmentDueDate'&lt;br /&gt;
      )&lt;br /&gt;
   end  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Test Adding participants by Instructor'''&lt;br /&gt;
&lt;br /&gt;
''a. Add New Participants to assignment ''&lt;br /&gt;
    it &amp;quot;check to see if participants can be added&amp;quot; do&lt;br /&gt;
      student = create(:student)&lt;br /&gt;
      login_as('instructor6')&lt;br /&gt;
      assignment_id = Assignment.where(name: 'participants Assignment')[0].id&lt;br /&gt;
      visit &amp;quot;/participants/list?id=#{assignment_id}&amp;amp;model=Assignment&amp;quot;&lt;br /&gt;
      fill_in 'user_name', with: student.name&lt;br /&gt;
      choose 'user_role_participant'&lt;br /&gt;
      expect {&lt;br /&gt;
        click_button 'Add'&lt;br /&gt;
      }.to change {Participant.count}.by 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
''b. Verify assignments assigned to participants''&lt;br /&gt;
   it &amp;quot;should display newly created assignment&amp;quot; do&lt;br /&gt;
      participant = create(:participant)&lt;br /&gt;
      login_as(participant.name)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;participants Assignment&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Check if assignment can be added to a course'''&lt;br /&gt;
 &lt;br /&gt;
 it &amp;quot;check to find if the assignment can be added to a course&amp;quot;, js: true  do&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    create(:course, name: 'Test Course')&lt;br /&gt;
    course_id = Course.where(name: 'test Course')[0].id&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as('instructor6')&lt;br /&gt;
    visit &amp;quot;/assignments/associate_assignment_with_course?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    choose &amp;quot;course_id_#{course_id}&amp;quot;&lt;br /&gt;
    click_button 'Save'&lt;br /&gt;
    assignment_row = Assignment.where(name: 'Test Assignment')[0]&lt;br /&gt;
    expect(assignment_row).to have_attributes(&lt;br /&gt;
      course_id: course_id&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1. Github Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
2. RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
3. Capybara [https://github.com/jnicklas/capybara]&lt;/div&gt;</summary>
		<author><name>Vmuruga</name></author>
	</entry>
</feed>