<?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=Pjain12</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=Pjain12"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Pjain12"/>
	<updated>2026-06-06T14:16:02Z</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_E1676_Role-based_reviewing&amp;diff=106860</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106860"/>
		<updated>2016-12-13T21:49:05Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Sample Test cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility of using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are general three aspects we would do in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a text filed. The instructor also has the power to allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
  &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
[[File:Drawing.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
We have modified following three database tables to support role(duty) based reviewing:&lt;br /&gt;
&lt;br /&gt;
1. assignment_questionnaires&lt;br /&gt;
&lt;br /&gt;
2. assignments&lt;br /&gt;
&lt;br /&gt;
3. teams_users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
1] We have added following fields in '''assignment_questionnaires table'''&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|List of duties that students can choose in the given assignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
2] We have added '''duty_based''', '''multiple_duty_based''' and '''all_duty_name''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|boolean&lt;br /&gt;
|If the assignment's team is duty based, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!allow_duty_share&lt;br /&gt;
|boolean&lt;br /&gt;
|If multiple people could choose one duty in the assignment, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!duty_names&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save all kinds of duties in the assignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
3] We have added '''duty''' into '''teams_users''' table to store the duty.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save this user's duty in this team.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
&lt;br /&gt;
===Controllers===&lt;br /&gt;
 1. expertiza/app/controllers/assignments_controller.rb:&lt;br /&gt;
    def edit&lt;br /&gt;
        a. add &amp;quot;role based assignment&amp;quot; option to review strategy section.&lt;br /&gt;
        b. add roles to current assignment.&lt;br /&gt;
        c. add questionnaires to these roles separately. &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
 2. expertiza/app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
See [[#Design|Database Design]] section above.&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
Below are the view files that we modified &lt;br /&gt;
 1. When logged in as instructor, we modified files below:&lt;br /&gt;
  1.1 Add a &amp;quot;role based&amp;quot; strategy checkbox here: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.2 Add roles input fields if you check the &amp;quot;role based&amp;quot; strategy checkbox: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.3 Create rubric to assign questionnaire based on duties: expertiza-developer/expertiza/app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
     &amp;amp; expertiza-developer/expertiza/app/helpers/assignment_helper.rb&lt;br /&gt;
  &lt;br /&gt;
 2. When logged in as a student, we modified files below:&lt;br /&gt;
  2.1 To show &amp;quot;select duty&amp;quot; and &amp;quot;update duty&amp;quot; option: expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
  2.2 To show the form to select duty: expertiza/app/views/teams_users/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1] View showing newly added checkbox for setting duty based option and allowing duty share&lt;br /&gt;
&lt;br /&gt;
[[File:111.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2] View showing different questionnaire for different teammates based on their duty&lt;br /&gt;
[[File:222.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3] Assign questionnaire to teammates based on their duty &lt;br /&gt;
&lt;br /&gt;
[[File:333.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4] View showing &amp;quot;select duty&amp;quot; link for teammates. Every student can select their duty in the team. &lt;br /&gt;
[[File:444.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:555.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5] After selecting, students can update their duty. Also, they will get the review questionnaire based on duty.&lt;br /&gt;
[[File:666.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6] Review questionnaire based on duty&lt;br /&gt;
&lt;br /&gt;
[[File:777.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
=== Sample Test cases ===&lt;br /&gt;
1. Verify if instructor can select duty option&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;selects duty based option&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;
      check(&amp;quot;duty_based&amp;quot;)&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;
                                duty_based: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
2. Verify if instructor can correctly set the duty&lt;br /&gt;
    it &amp;quot;sets  duty &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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&lt;br /&gt;
      fill_in &amp;quot;assignment_form_assignment_duty_names&amp;quot;, with: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true,&lt;br /&gt;
                                duty_names: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&lt;br /&gt;
                            )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
3. Verify if duty share is allowed&lt;br /&gt;
 &lt;br /&gt;
   it &amp;quot;selects allow duty share option&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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
4. Complete test cases are present in following files:&lt;br /&gt;
   Student test cases:  [[   https://github.com/Expertiza-Final-Project/expertiza/blob/testing/spec/features/duty_student_spec.rb]]&lt;br /&gt;
   Instructor test cases: [[ https://github.com/Expertiza-Final-Project/expertiza/blob/testing/spec/features/assignment_creation_spec.rb]]&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
ScrumRoles [http://scrummethodology.com/the-scrum-team-role]&lt;br /&gt;
&lt;br /&gt;
CapyBara [https://github.com/jnicklas/capybara]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106859</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106859"/>
		<updated>2016-12-13T21:46:52Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Sample Test cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility of using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are general three aspects we would do in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a text filed. The instructor also has the power to allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
  &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
[[File:Drawing.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
We have modified following three database tables to support role(duty) based reviewing:&lt;br /&gt;
&lt;br /&gt;
1. assignment_questionnaires&lt;br /&gt;
&lt;br /&gt;
2. assignments&lt;br /&gt;
&lt;br /&gt;
3. teams_users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
1] We have added following fields in '''assignment_questionnaires table'''&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|List of duties that students can choose in the given assignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
2] We have added '''duty_based''', '''multiple_duty_based''' and '''all_duty_name''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|boolean&lt;br /&gt;
|If the assignment's team is duty based, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!allow_duty_share&lt;br /&gt;
|boolean&lt;br /&gt;
|If multiple people could choose one duty in the assignment, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!duty_names&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save all kinds of duties in the assignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
3] We have added '''duty''' into '''teams_users''' table to store the duty.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save this user's duty in this team.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
&lt;br /&gt;
===Controllers===&lt;br /&gt;
 1. expertiza/app/controllers/assignments_controller.rb:&lt;br /&gt;
    def edit&lt;br /&gt;
        a. add &amp;quot;role based assignment&amp;quot; option to review strategy section.&lt;br /&gt;
        b. add roles to current assignment.&lt;br /&gt;
        c. add questionnaires to these roles separately. &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
 2. expertiza/app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
See [[#Design|Database Design]] section above.&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
Below are the view files that we modified &lt;br /&gt;
 1. When logged in as instructor, we modified files below:&lt;br /&gt;
  1.1 Add a &amp;quot;role based&amp;quot; strategy checkbox here: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.2 Add roles input fields if you check the &amp;quot;role based&amp;quot; strategy checkbox: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.3 Create rubric to assign questionnaire based on duties: expertiza-developer/expertiza/app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
     &amp;amp; expertiza-developer/expertiza/app/helpers/assignment_helper.rb&lt;br /&gt;
  &lt;br /&gt;
 2. When logged in as a student, we modified files below:&lt;br /&gt;
  2.1 To show &amp;quot;select duty&amp;quot; and &amp;quot;update duty&amp;quot; option: expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
  2.2 To show the form to select duty: expertiza/app/views/teams_users/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1] View showing newly added checkbox for setting duty based option and allowing duty share&lt;br /&gt;
&lt;br /&gt;
[[File:111.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2] View showing different questionnaire for different teammates based on their duty&lt;br /&gt;
[[File:222.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3] Assign questionnaire to teammates based on their duty &lt;br /&gt;
&lt;br /&gt;
[[File:333.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4] View showing &amp;quot;select duty&amp;quot; link for teammates. Every student can select their duty in the team. &lt;br /&gt;
[[File:444.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:555.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5] After selecting, students can update their duty. Also, they will get the review questionnaire based on duty.&lt;br /&gt;
[[File:666.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6] Review questionnaire based on duty&lt;br /&gt;
&lt;br /&gt;
[[File:777.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
=== Sample Test cases ===&lt;br /&gt;
1. Verify if instructor can select duty option&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;selects duty based option&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;
      check(&amp;quot;duty_based&amp;quot;)&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;
                                duty_based: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
2. Verify if instructor can correctly set the duty&lt;br /&gt;
    it &amp;quot;sets  duty &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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&lt;br /&gt;
      fill_in &amp;quot;assignment_form_assignment_duty_names&amp;quot;, with: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true,&lt;br /&gt;
                                duty_names: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&lt;br /&gt;
                            )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
3. Verify if duty share is allowed&lt;br /&gt;
 &lt;br /&gt;
   it &amp;quot;selects allow duty share option&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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
4. Complete test cases are present in following files:&lt;br /&gt;
   Student test cases:  [[   https://github.com/Expertiza-Final-Project/expertiza/blob/testing/spec/features/duty_student_spec.rb]]&lt;br /&gt;
   Instructor test cases: [https://github.com/Expertiza-Final-Project/expertiza/blob/testing/spec/features/assignment_creation_spec.rb&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
ScrumRoles [http://scrummethodology.com/the-scrum-team-role]&lt;br /&gt;
&lt;br /&gt;
CapyBara [https://github.com/jnicklas/capybara]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106850</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106850"/>
		<updated>2016-12-13T18:32:47Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Testing Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility of using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are general three aspects we would do in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a text filed. The instructor also has the power to allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
  &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
[[File:Drawing.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
We have modified following three database tables to support role(duty) based reviewing:&lt;br /&gt;
&lt;br /&gt;
1. assignment_questionnaires&lt;br /&gt;
&lt;br /&gt;
2. assignments&lt;br /&gt;
&lt;br /&gt;
3. teams_users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
1] We have added following fields in '''assignment_questionnaires table'''&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|List of duties that students can choose in the given assignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
2] We have added '''duty_based''', '''multiple_duty_based''' and '''all_duty_name''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|boolean&lt;br /&gt;
|If the assignment's team is duty based, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!allow_duty_share&lt;br /&gt;
|boolean&lt;br /&gt;
|If multiple people could choose one duty in the assignment, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!duty_names&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save all kinds of duties in the assignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
3] We have added '''duty''' into '''teams_users''' table to store the duty.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save this user's duty in this team.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
&lt;br /&gt;
===Controllers===&lt;br /&gt;
 1. expertiza/app/controllers/assignments_controller.rb:&lt;br /&gt;
    def edit&lt;br /&gt;
        a. add &amp;quot;role based assignment&amp;quot; option to review strategy section.&lt;br /&gt;
        b. add roles to current assignment.&lt;br /&gt;
        c. add questionnaires to these roles separately. &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
 2. expertiza/app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
See [[#Design|Database Design]] section above.&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
Below are the view files that we modified &lt;br /&gt;
 1. When logged in as instructor, we modified files below:&lt;br /&gt;
  1.1 Add a &amp;quot;role based&amp;quot; strategy checkbox here: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.2 Add roles input fields if you check the &amp;quot;role based&amp;quot; strategy checkbox: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.3 Create rubric to assign questionnaire based on duties: expertiza-developer/expertiza/app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
     &amp;amp; expertiza-developer/expertiza/app/helpers/assignment_helper.rb&lt;br /&gt;
  &lt;br /&gt;
 2. When logged in as a student, we modified files below:&lt;br /&gt;
  2.1 To show &amp;quot;select duty&amp;quot; and &amp;quot;update duty&amp;quot; option: expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
  2.2 To show the form to select duty: expertiza/app/views/teams_users/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1]View showing newly added checkbox for setting duty based option and allowing duty share&lt;br /&gt;
&lt;br /&gt;
[[File:111.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2]View showing different questionnaire for different teammates based on their duty&lt;br /&gt;
[[File:222.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3]Assign questionnaire to teammates based on their duty &lt;br /&gt;
&lt;br /&gt;
[[File:333.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4]View showing &amp;quot;select duty&amp;quot; link for teammates. Every student can select their duty in the team. &lt;br /&gt;
[[File:444.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:555.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5]After selecting, students can update their duty. Also, they will get the review questionnaire based on duty.&lt;br /&gt;
[[File:666.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6]Review questionnaire based on duty&lt;br /&gt;
&lt;br /&gt;
[[File:777.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
=== Sample Test cases ===&lt;br /&gt;
1. Verify if instructor can select duty option&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;selects duty based option&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;
      check(&amp;quot;duty_based&amp;quot;)&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;
                                duty_based: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
2. Verify if instructor can correctly set the duty&lt;br /&gt;
    it &amp;quot;sets  duty &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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&lt;br /&gt;
      fill_in &amp;quot;assignment_form_assignment_duty_names&amp;quot;, with: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true,&lt;br /&gt;
                                duty_names: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&lt;br /&gt;
                            )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
3. Veify if duty share is allowed&lt;br /&gt;
 &lt;br /&gt;
   it &amp;quot;selects allow duty share option&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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
ScrumRoles [http://scrummethodology.com/the-scrum-team-role]&lt;br /&gt;
&lt;br /&gt;
CapyBara [https://github.com/jnicklas/capybara]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106849</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106849"/>
		<updated>2016-12-13T18:32:18Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility of using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are general three aspects we would do in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a text filed. The instructor also has the power to allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
  &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
[[File:Drawing.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
We have modified following three database tables to support role(duty) based reviewing:&lt;br /&gt;
&lt;br /&gt;
1. assignment_questionnaires&lt;br /&gt;
&lt;br /&gt;
2. assignments&lt;br /&gt;
&lt;br /&gt;
3. teams_users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
1] We have added following fields in '''assignment_questionnaires table'''&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|List of duties that students can choose in the given assignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
2] We have added '''duty_based''', '''multiple_duty_based''' and '''all_duty_name''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|boolean&lt;br /&gt;
|If the assignment's team is duty based, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!allow_duty_share&lt;br /&gt;
|boolean&lt;br /&gt;
|If multiple people could choose one duty in the assignment, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!duty_names&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save all kinds of duties in the assignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
3] We have added '''duty''' into '''teams_users''' table to store the duty.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save this user's duty in this team.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
&lt;br /&gt;
===Controllers===&lt;br /&gt;
 1. expertiza/app/controllers/assignments_controller.rb:&lt;br /&gt;
    def edit&lt;br /&gt;
        a. add &amp;quot;role based assignment&amp;quot; option to review strategy section.&lt;br /&gt;
        b. add roles to current assignment.&lt;br /&gt;
        c. add questionnaires to these roles separately. &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
 2. expertiza/app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
See [[#Design|Database Design]] section above.&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
Below are the view files that we modified &lt;br /&gt;
 1. When logged in as instructor, we modified files below:&lt;br /&gt;
  1.1 Add a &amp;quot;role based&amp;quot; strategy checkbox here: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.2 Add roles input fields if you check the &amp;quot;role based&amp;quot; strategy checkbox: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.3 Create rubric to assign questionnaire based on duties: expertiza-developer/expertiza/app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
     &amp;amp; expertiza-developer/expertiza/app/helpers/assignment_helper.rb&lt;br /&gt;
  &lt;br /&gt;
 2. When logged in as a student, we modified files below:&lt;br /&gt;
  2.1 To show &amp;quot;select duty&amp;quot; and &amp;quot;update duty&amp;quot; option: expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
  2.2 To show the form to select duty: expertiza/app/views/teams_users/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1]View showing newly added checkbox for setting duty based option and allowing duty share&lt;br /&gt;
&lt;br /&gt;
[[File:111.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2]View showing different questionnaire for different teammates based on their duty&lt;br /&gt;
[[File:222.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3]Assign questionnaire to teammates based on their duty &lt;br /&gt;
&lt;br /&gt;
[[File:333.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4]View showing &amp;quot;select duty&amp;quot; link for teammates. Every student can select their duty in the team. &lt;br /&gt;
[[File:444.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:555.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5]After selecting, students can update their duty. Also, they will get the review questionnaire based on duty.&lt;br /&gt;
[[File:666.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6]Review questionnaire based on duty&lt;br /&gt;
&lt;br /&gt;
[[File:777.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
=== Sample Test cases ===&lt;br /&gt;
1. Verify if instructor can select duty option&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;selects duty based option&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;
      check(&amp;quot;duty_based&amp;quot;)&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;
                                duty_based: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
2. Verify if instructor can correctly set the duty&lt;br /&gt;
    it &amp;quot;sets  duty &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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&lt;br /&gt;
      fill_in &amp;quot;assignment_form_assignment_duty_names&amp;quot;, with: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true,&lt;br /&gt;
                                duty_names: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&lt;br /&gt;
                            )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
3. Veify if duty share is allowed&lt;br /&gt;
 &lt;br /&gt;
   it &amp;quot;selects allow duty share option&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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
ScrumRoles [http://scrummethodology.com/the-scrum-team-role]&lt;br /&gt;
&lt;br /&gt;
CapyBara [https://github.com/jnicklas/capybara]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106848</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106848"/>
		<updated>2016-12-13T18:31:43Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Views */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility of using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are general three aspects we would do in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a text filed. The instructor also has the power to allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
  &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
[[File:Drawing.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
We have modified following three database tables to support role(duty) based reviewing:&lt;br /&gt;
&lt;br /&gt;
1. assignment_questionnaires&lt;br /&gt;
&lt;br /&gt;
2. assignments&lt;br /&gt;
&lt;br /&gt;
3. teams_users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
1] We have added following fields in '''assignment_questionnaires table'''&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|List of duties that students can choose in the given assignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
2] We have added '''duty_based''', '''multiple_duty_based''' and '''all_duty_name''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|boolean&lt;br /&gt;
|If the assignment's team is duty based, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!allow_duty_share&lt;br /&gt;
|boolean&lt;br /&gt;
|If multiple people could choose one duty in the assignment, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!duty_names&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save all kinds of duties in the assignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
3] We have added '''duty''' into '''teams_users''' table to store the duty.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save this user's duty in this team.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
&lt;br /&gt;
===Controllers===&lt;br /&gt;
 1. expertiza/app/controllers/assignments_controller.rb:&lt;br /&gt;
    def edit&lt;br /&gt;
        a. add &amp;quot;role based assignment&amp;quot; option to review strategy section.&lt;br /&gt;
        b. add roles to current assignment.&lt;br /&gt;
        c. add questionnaires to these roles separately. &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
 2. expertiza/app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
See [[#Design|Database Design]] section above.&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
Below are the view files that we modified &lt;br /&gt;
 1. When logged in as instructor, we modified files below:&lt;br /&gt;
  1.1 Add a &amp;quot;role based&amp;quot; strategy checkbox here: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.2 Add roles input fields if you check the &amp;quot;role based&amp;quot; strategy checkbox: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.3 Create rubric to assign questionnaire based on duties: expertiza-developer/expertiza/app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
     &amp;amp; expertiza-developer/expertiza/app/helpers/assignment_helper.rb&lt;br /&gt;
  &lt;br /&gt;
 2. When logged in as a student, we modified files below:&lt;br /&gt;
  2.1 To show &amp;quot;select duty&amp;quot; and &amp;quot;update duty&amp;quot; option: expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
  2.2 To show the form to select duty: expertiza/app/views/teams_users/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1]View showing newly added checkbox for setting duty based option and allowing duty share&lt;br /&gt;
&lt;br /&gt;
[[File:111.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2]View showing different questionnaire for different teammates based on their duty&lt;br /&gt;
[[File:222.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3]Assign questionnaire to teammates based on their duty &lt;br /&gt;
&lt;br /&gt;
[[File:333.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4]View showing &amp;quot;select duty&amp;quot; link for teammates. Every student can select their duty in the team. &lt;br /&gt;
[[File:444.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:555.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5]After selecting, students can update their duty. Also, they will get the review questionnaire based on duty.&lt;br /&gt;
[[File:666.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6]Review questionnaire based on duty&lt;br /&gt;
&lt;br /&gt;
[[File:777.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
=== Sample Test cases ===&lt;br /&gt;
1. Verify if instructor can select duty option&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;selects duty based option&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;
      check(&amp;quot;duty_based&amp;quot;)&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;
                                duty_based: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
2. Verify if instructor can correctly set the duty&lt;br /&gt;
    it &amp;quot;sets  duty &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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&lt;br /&gt;
      fill_in &amp;quot;assignment_form_assignment_duty_names&amp;quot;, with: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true,&lt;br /&gt;
                                duty_names: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&lt;br /&gt;
                            )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
3. Veify if duty share is allowed&lt;br /&gt;
 &lt;br /&gt;
   it &amp;quot;selects allow duty share option&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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
ScrumRoles [http://scrummethodology.com/the-scrum-team-role]&lt;br /&gt;
&lt;br /&gt;
CapyBara [https://github.com/jnicklas/capybara]&lt;br /&gt;
&lt;br /&gt;
FactoryGirl [https://github.com/thoughtbot/factory_girl]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106847</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106847"/>
		<updated>2016-12-13T18:22:12Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Testing Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility of using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are general three aspects we would do in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a text filed. The instructor also has the power to allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
  &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
[[File:Drawing.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
We have modified following three database tables to support role(duty) based reviewing:&lt;br /&gt;
&lt;br /&gt;
1. assignment_questionnaires&lt;br /&gt;
&lt;br /&gt;
2. assignments&lt;br /&gt;
&lt;br /&gt;
3. teams_users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
1] We have added following fields in '''assignment_questionnaires table'''&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|List of duties that students can choose in the given assignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
2] We have added '''duty_based''', '''multiple_duty_based''' and '''all_duty_name''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|boolean&lt;br /&gt;
|If the assignment's team is duty based, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!allow_duty_share&lt;br /&gt;
|boolean&lt;br /&gt;
|If multiple people could choose one duty in the assignment, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!duty_names&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save all kinds of duties in the assignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
3] We have added '''duty''' into '''teams_users''' table to store the duty.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save this user's duty in this team.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
&lt;br /&gt;
===Controllers===&lt;br /&gt;
 1. expertiza/app/controllers/assignments_controller.rb:&lt;br /&gt;
    def edit&lt;br /&gt;
        a. add &amp;quot;role based assignment&amp;quot; option to review strategy section.&lt;br /&gt;
        b. add roles to current assignment.&lt;br /&gt;
        c. add questionnaires to these roles separately. &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
 2. expertiza/app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
See [[#Design|Database Design]] section above.&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
Below are the view files that we modified &lt;br /&gt;
 1. When logged in as instructor, we modified files below:&lt;br /&gt;
  1.1 Add a &amp;quot;role based&amp;quot; strategy checkbox here: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.2 Add roles input fields if you check the &amp;quot;role based&amp;quot; strategy checkbox: expertiza/app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
  1.3 Create rubric to assign questionnaire based on duties: expertiza-developer/expertiza/app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
     &amp;amp; expertiza-developer/expertiza/app/helpers/assignment_helper.rb&lt;br /&gt;
  &lt;br /&gt;
 2. When logged in as a student, we modified files below:&lt;br /&gt;
  2.1 To show &amp;quot;select duty&amp;quot; and &amp;quot;update duty&amp;quot; option: expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
  2.2 To show the form to select duty: expertiza/app/views/teams_users/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:111.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:222.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:333.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:444.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:555.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:666.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:777.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
=== Sample Test cases ===&lt;br /&gt;
1. Verify if instructor can select duty option&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;selects duty based option&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;
      check(&amp;quot;duty_based&amp;quot;)&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;
                                duty_based: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
2. Verify if instructor can correctly set the duty&lt;br /&gt;
    it &amp;quot;sets  duty &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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&lt;br /&gt;
      fill_in &amp;quot;assignment_form_assignment_duty_names&amp;quot;, with: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true,&lt;br /&gt;
                                duty_names: &amp;quot;developer, tester, analyst, writer, systest&amp;quot;&lt;br /&gt;
                            )&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
3. Veify if duty share is allowed&lt;br /&gt;
 &lt;br /&gt;
   it &amp;quot;selects allow duty share option&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;
      check(&amp;quot;duty_based&amp;quot;)&lt;br /&gt;
      check(&amp;quot;allow_duty_share&amp;quot;)&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;
                                duty_based: true,&lt;br /&gt;
                                allow_duty_share: true&lt;br /&gt;
                            )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
ScrumRoles [http://scrummethodology.com/the-scrum-team-role]&lt;br /&gt;
&lt;br /&gt;
CapyBara [https://github.com/jnicklas/capybara]&lt;br /&gt;
&lt;br /&gt;
FactoryGirl [https://github.com/thoughtbot/factory_girl]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106293</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106293"/>
		<updated>2016-12-03T02:33:36Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Database Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The purpose or the rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are general three aspects we would do in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a text filed. The instructor also has the power to allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
  &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
[[File:Drawing.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
We have modified following three database tables to support role(duty) based reviewing:&lt;br /&gt;
&lt;br /&gt;
1. assignment_questionnaires&lt;br /&gt;
&lt;br /&gt;
2. assignments&lt;br /&gt;
&lt;br /&gt;
3. teams_users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
1] We have added following fields in '''assignment_questionnaires table'''&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|List of duties that students can choose in the given assignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
2] We have added '''duty_based''', '''multiple_duty_based''' and '''all_duty_name''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|boolean&lt;br /&gt;
|If the assignment's team is duty based, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!allow_duty_share&lt;br /&gt;
|boolean&lt;br /&gt;
|If multiple people could choose one duty in the assignment, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!duty_names&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save all kinds of duties in the assignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
3] We have added '''duty''' into '''teams_users''' table to store the duty.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save this user's duty in this team.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
&lt;br /&gt;
===Controllers===&lt;br /&gt;
 1. expertiza/app/controllers/assignments_controller.rb:&lt;br /&gt;
    def edit&lt;br /&gt;
        a. add &amp;quot;role based assignment&amp;quot; option to review strategy section.&lt;br /&gt;
        b. add roles to current assignment.&lt;br /&gt;
        c. add questionnaires to these roles separately. &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
 2. expertiza/app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
See [[#Design|Database Design]] section above.&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
Below arethe files that we modified &lt;br /&gt;
 1. When logged in as instructor, we modified below files&lt;br /&gt;
  1.1 expertiza/app/views/assignments/edit/_review_strategy.html.erb &lt;br /&gt;
  1.1. add a &amp;quot;role based&amp;quot; strategy checkbox here.&lt;br /&gt;
  1.2. add roles input fields if you check the &amp;quot;role based&amp;quot; strategy checkbox.&lt;br /&gt;
  1.32 . expertiza/app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
    /app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
 &lt;br /&gt;
 2. When logged in as a student, we modified below files:&lt;br /&gt;
  2.1 To show &amp;quot;select duty&amp;quot; and &amp;quot;update duty&amp;quot; option: expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
  2.2 To show the form to select duty: expertiza/app/views/teams_users/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:review_strategy.png]]&lt;br /&gt;
[[File:rubric_questionnaire.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
ScrumRoles [http://scrummethodology.com/the-scrum-team-role]&lt;br /&gt;
&lt;br /&gt;
CapyBara [https://github.com/jnicklas/capybara]&lt;br /&gt;
&lt;br /&gt;
FactoryGirl [https://github.com/thoughtbot/factory_girl]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106284</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=106284"/>
		<updated>2016-12-03T02:11:00Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Views */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The purpose or the rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are general three aspects we would do in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a text filed. The instructor also has the power to allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
  &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
[[File:Drawing.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We would create a new table called '''assignment_duties'''.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!assignment_id&lt;br /&gt;
|int(11)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|int(11)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!questionnaire_id&lt;br /&gt;
|int(11)&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_based''', '''multiple_duty_based''' and '''all_duty_name''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|boolean&lt;br /&gt;
|If the assignment's team is duty based, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!allow_duty_share&lt;br /&gt;
|boolean&lt;br /&gt;
|If multiple people could choose one duty in the assignment, it should be '''true'''. If not, it should be '''false'''.&lt;br /&gt;
|-&lt;br /&gt;
!duty_names&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save all kinds of duties in the assignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty''' into '''teams_users''' table to store the duty.&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|It would save this user's duty in this team.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
&lt;br /&gt;
===Controllers===&lt;br /&gt;
 1. expertiza/app/controllers/assignments_controller.rb:&lt;br /&gt;
    def edit&lt;br /&gt;
        a. add &amp;quot;role based assignment&amp;quot; option to review strategy section.&lt;br /&gt;
        b. add roles to current assignment.&lt;br /&gt;
        c. add questionnaires to these roles separately. &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
 2. expertiza/app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
See [[#Design|Database Design]] section above.&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
Below arethe files that we modified &lt;br /&gt;
 1. When logged in as instructor, we modified below files&lt;br /&gt;
  1.1 expertiza/app/views/assignments/edit/_review_strategy.html.erb &lt;br /&gt;
  1.1. add a &amp;quot;role based&amp;quot; strategy checkbox here.&lt;br /&gt;
  1.2. add roles input fields if you check the &amp;quot;role based&amp;quot; strategy checkbox.&lt;br /&gt;
  1.32 . expertiza/app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
    /app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
 &lt;br /&gt;
 2. When logged in as a student, we modified below files:&lt;br /&gt;
  2.1 To show &amp;quot;select duty&amp;quot; and &amp;quot;update duty&amp;quot; option: expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
  2.2 To show the form to select duty: expertiza/app/views/teams_users/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:review_strategy.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;br /&gt;
&lt;br /&gt;
ScrumRoles [http://scrummethodology.com/the-scrum-team-role]&lt;br /&gt;
&lt;br /&gt;
CapyBara [https://github.com/jnicklas/capybara]&lt;br /&gt;
&lt;br /&gt;
FactoryGirl [https://github.com/thoughtbot/factory_girl]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=104907</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=104907"/>
		<updated>2016-11-09T06:39:02Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The purpose or the rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are generally three aspects we would accomplish in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a test filed. The instructor also has the power the allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
&lt;br /&gt;
 [[File:Picture4.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_name''' into '''teams_users''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|text&lt;br /&gt;
|student's duty in team&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_based''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|int(11)&lt;br /&gt;
|If the assignment's team is duty based, it should be '''1'''. If not, it should be '''0'''.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_belong''' into '''questions''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_belong&lt;br /&gt;
|text&lt;br /&gt;
|It stores which duty the question belongs to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Expertiza[https://github.com/expertiza/expertiza]&lt;br /&gt;
&lt;br /&gt;
RSpec [http://rspec.info/]&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=104906</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=104906"/>
		<updated>2016-11-09T06:34:13Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Testing Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The purpose or the rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are generally three aspects we would accomplish in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a test filed. The instructor also has the power the allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
&lt;br /&gt;
 [[File:Picture4.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_name''' into '''teams_users''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|text&lt;br /&gt;
|student's duty in team&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_based''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|int(11)&lt;br /&gt;
|If the assignment's team is duty based, it should be '''1'''. If not, it should be '''0'''.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_belong''' into '''questions''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_belong&lt;br /&gt;
|text&lt;br /&gt;
|It stores which duty the question belongs to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=104905</id>
		<title>CSC/ECE 517 Fall 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1676_Role-based_reviewing&amp;diff=104905"/>
		<updated>2016-11-09T06:30:49Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Testing Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose   ==&lt;br /&gt;
In the current version of Expertiza, members among a team can evaluate each other’s contribution and give appropriate scores based on the same questionnaire. However, in the lifetime of software development, members in a team often take on different roles whose works content are vastly differentiated. Like in an agile development environment, such as Scrum, there are typically [http://scrummethodology.com/the-scrum-team-role/ seven roles group members] can take: software engineer, architect, programmer, analyst, QA expert, tester and UI designers . Job description and evaluation entailed are vastly varied among these roles, thus a generic assessment rubric cannot hold reasonably.&lt;br /&gt;
&lt;br /&gt;
The purpose or the rationale of our project is that we want to give project members the option to evaluate each other's work based on the specific role or duty they take in the development process. This can ensure a reasonable assessment for different duties and can also help to improve the utility using members-reviewing in the whole reviewing process.&lt;br /&gt;
&lt;br /&gt;
== Task Description==&lt;br /&gt;
Task Description:&lt;br /&gt;
There are generally three aspects we would accomplish in order to achieve the Role-based reviewing function. &lt;br /&gt;
&lt;br /&gt;
1) A new option (check box) would be added to the Review Strategy tab from the instructor view when he creates a new assignment.  What’s more, the instructor can create different roles or duties available for the assignment by typing into a test filed. The instructor also has the power the allow multiple members to choose for the same duty.&lt;br /&gt;
&lt;br /&gt;
2) In the Rubrics tab from the instructor view, New rubric would be generated by creating different questionnaires for different roles when adding new assignment.&lt;br /&gt;
&lt;br /&gt;
3) A new option (drop box) would be added to the “Your team” page from the student view when an assignment was created to be role-based reviewing. Student can choose their roles or duties from the drop box which were generated by the instructor for this specific assignment. When the instructor enabled the multiple selection option, different members in the team can choose same duties for this assignment.&lt;br /&gt;
&lt;br /&gt;
Tasks can be viewed more clearly by the graph below:&lt;br /&gt;
&lt;br /&gt;
 [[File:Picture4.png]]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_name''' into '''teams_users''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_name&lt;br /&gt;
|text&lt;br /&gt;
|student's duty in team&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_based''' into '''assignments''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_based&lt;br /&gt;
|int(11)&lt;br /&gt;
|If the assignment's team is duty based, it should be '''1'''. If not, it should be '''0'''.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
We should add '''duty_belong''' into '''questions''' table to store the duty name&lt;br /&gt;
!Field Name !!Type !!Description&lt;br /&gt;
|-&lt;br /&gt;
!duty_belong&lt;br /&gt;
|text&lt;br /&gt;
|It stores which duty the question belongs to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104904</id>
		<title>CSC/ECE 517 Spring 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104904"/>
		<updated>2016-11-09T06:09:34Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Task Description==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purpose   ==&lt;br /&gt;
&lt;br /&gt;
===Rationale of using Scrum &amp;amp; Role based reviewing ===&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files to be modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Reviewer&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104903</id>
		<title>CSC/ECE 517 Spring 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104903"/>
		<updated>2016-11-09T06:06:01Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Testing Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Task Description==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purpose   ==&lt;br /&gt;
&lt;br /&gt;
===Rationale of using Scrum &amp;amp; Role based reviewing ===&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files to be modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
In our project, we are providing an option of adding duty for different team members in an assignment and giving review options based on their duty. We will add following functionalities:&lt;br /&gt;
1. How instructor create assignment with duties/roles&lt;br /&gt;
2. How students take duties from a given list of duties&lt;br /&gt;
3. How teammate evaluation rubric assign different review questionnaire based on duty.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
UI will be tested manually. First, we will test creating an assignment as an instructor with different duties and assign different review questionnaires to each duty. Then we will login in as a student and take a duty from given list of duties. We will try covering all edge case scenarios in test cases section.&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
Following will be the test cases:&lt;br /&gt;
&lt;br /&gt;
1. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  1.a] While creating an assignment, in the Review Strategy tab provide the list of roles/duties possible for teammates. There will be one text box to add      &lt;br /&gt;
       duty. To add more duties click on &amp;quot;add more&amp;quot;. &lt;br /&gt;
  1.b] Mark the check box that says multiple team members can have the same duty.&lt;br /&gt;
  1.c] Go to the Rubrics tab and select different questionnaires for different duty.    &lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page and should be able to select any duty. Multiple students &lt;br /&gt;
  should be able to select same duty.&lt;br /&gt;
&lt;br /&gt;
2. Login in as an Instructor:&lt;br /&gt;
&lt;br /&gt;
  2.a] Repeat steps 1.a and 1.b &lt;br /&gt;
  2.b] This time do not mark the check box that says &amp;quot;multiple team members can have the same duty&amp;quot;.&lt;br /&gt;
  After creating this assignment students should be able to see different duties in &amp;quot;Your Team&amp;quot; page. This time student should not be able to select a duty if &lt;br /&gt;
  it was already selected.&lt;br /&gt;
&lt;br /&gt;
3. Login in as a Student&lt;br /&gt;
&lt;br /&gt;
   When you login in as a student you should be able to pick different duties assigned by the instructor. If multiple members are not allowed to have same duty &lt;br /&gt;
   then you should not be able to pick a duty if it was already selected by some other member.&lt;br /&gt;
&lt;br /&gt;
4. Login in as a Review&lt;br /&gt;
&lt;br /&gt;
   When you login in as a reviewer you should get the questionnaire based on your duty. For example, if you are a software engineer you should get the review &lt;br /&gt;
   questionnaire assigned to software engineer. &lt;br /&gt;
&lt;br /&gt;
   Different roles will be assigned different questionnaires for review.&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
For functional testing, we will use RSpec. It uses Behavior Driven Development (BDD) for testing functionality of the system. It provides way to describe specific functionality of the system being tested and helps in better visualization of test cases.&lt;br /&gt;
&lt;br /&gt;
=== Capybara ===&lt;br /&gt;
We will use Capybara  for automating the manual test cases. It is a web-based automation framework and coupled with RSpec. It allow developers to write the test cases which simulate the whole scenario of manual testing.&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
We will use Factory Girl for creating data factory. Factory Girl is a Ruby Gem that allow users to create templates for valid and re-usable objects. It allows more customization when user instantiate the objects and it aims to ensure that user have a valid object to work with.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104724</id>
		<title>CSC/ECE 517 Spring 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104724"/>
		<updated>2016-11-08T19:28:42Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Updates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Task Description==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purpose   ==&lt;br /&gt;
&lt;br /&gt;
===Rationale of using Scrum &amp;amp; Role based reviewing ===&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files to be modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Running RSpec===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Cases===&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104723</id>
		<title>CSC/ECE 517 Spring 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104723"/>
		<updated>2016-11-08T19:28:10Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Task Description==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purpose   ==&lt;br /&gt;
&lt;br /&gt;
===Rationale of using Scrum &amp;amp; Role based reviewing ===&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Running RSpec===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Cases===&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104722</id>
		<title>CSC/ECE 517 Spring 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104722"/>
		<updated>2016-11-08T19:25:15Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Testing Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Task Description==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purpose   ==&lt;br /&gt;
&lt;br /&gt;
===Rationale of using Scrum &amp;amp; Role based reviewing ===&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Running RSpec===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Cases===&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104721</id>
		<title>CSC/ECE 517 Spring 2016 E1676 Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_E1676_Role-based_reviewing&amp;diff=104721"/>
		<updated>2016-11-08T19:24:29Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Testing Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Task Description==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purpose   ==&lt;br /&gt;
&lt;br /&gt;
===Rationale of using Scrum &amp;amp; Role based reviewing ===&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Database Design ===&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
&lt;br /&gt;
Below are the key files modified:&lt;br /&gt;
===Controllers===&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
=== UI Testing ====&lt;br /&gt;
&lt;br /&gt;
=== Test Cases ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Factory Girl===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Running RSpec===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Cases===&lt;/div&gt;</summary>
		<author><name>Pjain12</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=104612</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=104612"/>
		<updated>2016-11-05T03:06:46Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: &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;
===1. 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;
===2. Modified and 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 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;
''f. 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;
''g. 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: ''This test will check the feature of editing the maximum number of members in a team for 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: ''This test will verify the feature of adding/removing review visible to all the reviewers for an assignment.&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: '' This test will verify that adding teams and team members in an assignment will create one more row of teammate review 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 :'' This test will check feature of adding new topic for an assignment.&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: ''This test will check feature of deleting new topic for an assignment.&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: '' This function will test if deadlines are getting assigned properly or not for the 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: '' This test will verify if an instructor is able to assign new participants to an 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: ''This test will verify if assignments are properly assigned to participants. Participants should be able to see newly assigned assignment in their page.&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: ''' It will check an assignment can be added to the course&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;
=='''Test the new code'''==&lt;br /&gt;
We have uploaded video showing how the tests are run and their result.&lt;br /&gt;
If user wants to test the newly added feature test, please clone the master branch of our git repository &lt;br /&gt;
and perform following steps:&lt;br /&gt;
&lt;br /&gt;
1. git clone http://github.com/dbzvishal/expertiza/&lt;br /&gt;
&lt;br /&gt;
2. cd expertiza&lt;br /&gt;
&lt;br /&gt;
3. rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
Activated github repository in travis. Whenever we push changes in our repository, travis will start building and run all test cases.&lt;br /&gt;
At the end, it will give the final result consisting of the number of test cases passed and failed and the overall build result.&lt;br /&gt;
Travis result&lt;br /&gt;
[https://travis-ci.org/Jainpriyal/expertiza]&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>Pjain12</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=103633</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=103633"/>
		<updated>2016-10-29T02:00:11Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Newly Added 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;
===1. 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;
===2. Modified and 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 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;
''f. 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;
''g. 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: ''This test will check the feature of editing the maximum number of members in a team for 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: ''This test will verify the feature of adding/removing review visible to all the reviewers for an assignment.&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: '' This test will verify that adding teams and team members in an assignment will create one more row of teammate review 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 :'' This test will check feature of adding new topic for an assignment.&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: ''This test will check feature of deleting new topic for an assignment.&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: '' This function will test if deadlines are getting assigned properly or not for the 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: '' This test will verify if an instructor is able to assign new participants to an 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: ''This test will verify if assignments are properly assigned to participants. Participants should be able to see newly assigned assignment in their page.&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: ''' It will check an assignment can be added to the course&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;
Activated github repository in travis. Whenever we push changes in our repository, travis will start building and run all test cases.&lt;br /&gt;
At the end, it will give the final result consisting of the number of test cases passed and failed and the overall build result.&lt;br /&gt;
Travis result&lt;br /&gt;
[https://travis-ci.org/Jainpriyal/expertiza]&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>Pjain12</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=103632</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=103632"/>
		<updated>2016-10-29T01:59:48Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* 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;
===1. 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 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;
''f. 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;
''g. 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: ''This test will check the feature of editing the maximum number of members in a team for 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: ''This test will verify the feature of adding/removing review visible to all the reviewers for an assignment.&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: '' This test will verify that adding teams and team members in an assignment will create one more row of teammate review 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 :'' This test will check feature of adding new topic for an assignment.&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: ''This test will check feature of deleting new topic for an assignment.&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: '' This function will test if deadlines are getting assigned properly or not for the 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: '' This test will verify if an instructor is able to assign new participants to an 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: ''This test will verify if assignments are properly assigned to participants. Participants should be able to see newly assigned assignment in their page.&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: ''' It will check an assignment can be added to the course&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;
Activated github repository in travis. Whenever we push changes in our repository, travis will start building and run all test cases.&lt;br /&gt;
At the end, it will give the final result consisting of the number of test cases passed and failed and the overall build result.&lt;br /&gt;
Travis result&lt;br /&gt;
[https://travis-ci.org/Jainpriyal/expertiza]&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>Pjain12</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=103630</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=103630"/>
		<updated>2016-10-29T01:58:39Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Automated Execution via Travis */&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 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;
''f. 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;
''g. 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: ''This test will check the feature of editing the maximum number of members in a team for 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: ''This test will verify the feature of adding/removing review visible to all the reviewers for an assignment.&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: '' This test will verify that adding teams and team members in an assignment will create one more row of teammate review 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 :'' This test will check feature of adding new topic for an assignment.&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: ''This test will check feature of deleting new topic for an assignment.&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: '' This function will test if deadlines are getting assigned properly or not for the 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: '' This test will verify if an instructor is able to assign new participants to an 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: ''This test will verify if assignments are properly assigned to participants. Participants should be able to see newly assigned assignment in their page.&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: ''' It will check an assignment can be added to the course&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;
Activated github repository in travis. Whenever we push changes in our repository, travis will start building and run all test cases.&lt;br /&gt;
At the end, it will give the final result consisting of the number of test cases passed and failed and the overall build result.&lt;br /&gt;
Travis result&lt;br /&gt;
[https://travis-ci.org/Jainpriyal/expertiza]&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>Pjain12</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=103628</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=103628"/>
		<updated>2016-10-29T01:57:54Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Automated Execution via Travis */&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 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;
''f. 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;
''g. 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: ''This test will check the feature of editing the maximum number of members in a team for 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: ''This test will verify the feature of adding/removing review visible to all the reviewers for an assignment.&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: '' This test will verify that adding teams and team members in an assignment will create one more row of teammate review 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 :'' This test will check feature of adding new topic for an assignment.&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: ''This test will check feature of deleting new topic for an assignment.&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: '' This function will test if deadlines are getting assigned properly or not for the 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: '' This test will verify if an instructor is able to assign new participants to an 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: ''This test will verify if assignments are properly assigned to participants. Participants should be able to see newly assigned assignment in their page.&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: ''' It will check an assignment can be added to the course&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;
Activated github repository in travis. Whenever we push changes in our repository, travis will start building and run all test cases.&lt;br /&gt;
At the end, it will give the final result consisting of the number of test cases passed and failed and the overall build result.&lt;br /&gt;
Travis result&lt;br /&gt;
[[https://travis-ci.org/Jainpriyal/expertiza]]&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>Pjain12</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=103627</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=103627"/>
		<updated>2016-10-29T01:57:31Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Automated Execution via Travis */&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 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;
''f. 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;
''g. 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: ''This test will check the feature of editing the maximum number of members in a team for 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: ''This test will verify the feature of adding/removing review visible to all the reviewers for an assignment.&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: '' This test will verify that adding teams and team members in an assignment will create one more row of teammate review 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 :'' This test will check feature of adding new topic for an assignment.&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: ''This test will check feature of deleting new topic for an assignment.&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: '' This function will test if deadlines are getting assigned properly or not for the 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: '' This test will verify if an instructor is able to assign new participants to an 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: ''This test will verify if assignments are properly assigned to participants. Participants should be able to see newly assigned assignment in their page.&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: ''' It will check an assignment can be added to the course&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;
Activated github repository in travis. Whenever we push changes in our repository, travis will start building and run all test cases.&lt;br /&gt;
At the end, it will give the final result consisting of the number of test cases passed and failed and the overall build result.&lt;br /&gt;
Travis result&lt;br /&gt;
[https://travis-ci.org/Jainpriyal/expertiza]&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>Pjain12</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=103625</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=103625"/>
		<updated>2016-10-29T01:56:46Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Automated Execution via Travis */&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: ''This test will check the feature of editing the maximum number of members in a team for 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: ''This test will verify the feature of adding/removing review visible to all the reviewers for an assignment.&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: '' This test will verify that adding teams and team members in an assignment will create one more row of teammate review 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 :'' This test will check feature of adding new topic for an assignment.&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: ''This test will check feature of deleting new topic for an assignment.&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: '' This function will test if deadlines are getting assigned properly or not for the 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: '' This test will verify if an instructor is able to assign new participants to an 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: ''This test will verify if assignments are properly assigned to participants. Participants should be able to see newly assigned assignment in their page.&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: ''' It will check an assignment can be added to the course&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;
Activated github repository in travis. Whenever we push changes in our repository, travis will start building and run all test cases.&lt;br /&gt;
At the end, it will give the final result consisting of the number of test cases passed and failed and the overall build result.&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>Pjain12</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=103618</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=103618"/>
		<updated>2016-10-29T01:53:27Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Newly Added 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: ''This test will check the feature of editing the maximum number of members in a team for 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: ''This test will verify the feature of adding/removing review visible to all the reviewers for an assignment.&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: '' This test will verify that adding teams and team members in an assignment will create one more row of teammate review 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 :'' This test will check feature of adding new topic for an assignment.&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: ''This test will check feature of deleting new topic for an assignment.&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: '' This function will test if deadlines are getting assigned properly or not for the 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: '' This test will verify if an instructor is able to assign new participants to an 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: ''This test will verify if assignments are properly assigned to participants. Participants should be able to see newly assigned assignment in their page.&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: ''' It will check an assignment can be added to the course&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>Pjain12</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=103581</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=103581"/>
		<updated>2016-10-29T01:33:50Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Newly Added 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'': 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>Pjain12</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=103449</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=103449"/>
		<updated>2016-10-29T00:38:38Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&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;
===Error in 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;/div&gt;</summary>
		<author><name>Pjain12</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=103443</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=103443"/>
		<updated>2016-10-29T00:35:06Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Newly Added Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&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;
===Existing 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;/div&gt;</summary>
		<author><name>Pjain12</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=103309</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=103309"/>
		<updated>2016-10-28T23:35:47Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Newly Added Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&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;
&lt;br /&gt;
===Rspec===&lt;br /&gt;
&lt;br /&gt;
===Capybara===&lt;br /&gt;
&lt;br /&gt;
=='''Test Cases'''==&lt;br /&gt;
&lt;br /&gt;
===Existing 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;
 &lt;br /&gt;
 ''c. Create Assignment for Team ''&lt;br /&gt;
 ''d. Create Assignment with Quiz''&lt;br /&gt;
 ''e. Create Assignment with staggered deadline ''&lt;br /&gt;
 ''f. Create Assignment with review visible to all reviewers''&lt;br /&gt;
 ''g. Create public micro-task assignment''&lt;br /&gt;
 ''h. create calibrated public assignment ''&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;
 ''b. Edit number of quizzes available to students''&lt;br /&gt;
 ''c. Edit number of members per team in an Assignment''&lt;br /&gt;
 ''d. Edit number of members per team ''&lt;br /&gt;
 ''e. Edit review visible to all other reviewers'''&lt;br /&gt;
 ''f. Should create teammate review row in rubrics''&lt;br /&gt;
 ''g. Check if checking calibration shows the tab''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Test Topic Tab of Assignment Creation'''&lt;br /&gt;
  ''a. edit topics properties''&lt;br /&gt;
  ''b. edit topics properties''&lt;br /&gt;
  ''c. Add new topic ''&lt;br /&gt;
  ''d. Delete existing topic ''&lt;br /&gt;
&lt;br /&gt;
'''4. Test Rubrics Tab of Assignment Creation'''&lt;br /&gt;
 ''a. Update review questionnaire rubric''&lt;br /&gt;
 ''b. Update scored question dropdown''&lt;br /&gt;
 ''c. Updates author feedback questionnaire''&lt;br /&gt;
 ''d. Update scored question dropdown''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Test Review Strategy of Assignment Creation'''&lt;br /&gt;
 ''a. Test all auto selects feature''&lt;br /&gt;
&lt;br /&gt;
'''6. Test Due dates tab of assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''7. Test Adding participants by Instructor'''&lt;br /&gt;
 ''a. Add New Participants to assignment ''&lt;br /&gt;
 ''b. Verify assignments assigned to participants''&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;/div&gt;</summary>
		<author><name>Pjain12</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=103296</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=103296"/>
		<updated>2016-10-28T23:27:32Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Newly Added Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&lt;br /&gt;
&lt;br /&gt;
=='''Objective'''==&lt;br /&gt;
Assignment Creation can be done by in Expertiza 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;
&lt;br /&gt;
===Rspec===&lt;br /&gt;
&lt;br /&gt;
===Capybara===&lt;br /&gt;
&lt;br /&gt;
=='''Test Cases'''==&lt;br /&gt;
&lt;br /&gt;
===Existing 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;
 ''b. Test Creating private Assignment''&lt;br /&gt;
 &lt;br /&gt;
 ''c. Create Assignment for Team ''&lt;br /&gt;
 ''d. Create Assignment with Quiz''&lt;br /&gt;
 ''e. Create Assignment with staggered deadline ''&lt;br /&gt;
 ''f. Create Assignment with review visible to all reviewers''&lt;br /&gt;
 ''g. Create public micro-task assignment''&lt;br /&gt;
 ''h. create calibrated public assignment ''&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;
 ''b. Edit number of quizzes available to students''&lt;br /&gt;
 ''c. Edit number of members per team in an Assignment''&lt;br /&gt;
 ''d. Edit number of members per team ''&lt;br /&gt;
 ''e. Edit review visible to all other reviewers'''&lt;br /&gt;
 ''f. Should create teammate review row in rubrics''&lt;br /&gt;
 ''g. Check if checking calibration shows the tab''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Test Topic Tab of Assignment Creation'''&lt;br /&gt;
  ''a. edit topics properties''&lt;br /&gt;
  ''b. edit topics properties''&lt;br /&gt;
  ''c. Add new topic ''&lt;br /&gt;
  ''d. Delete existing topic ''&lt;br /&gt;
&lt;br /&gt;
'''4. Test Rubrics Tab of Assignment Creation'''&lt;br /&gt;
 ''a. Update review questionnaire rubric''&lt;br /&gt;
 ''b. Update scored question dropdown''&lt;br /&gt;
 ''c. Updates author feedback questionnaire''&lt;br /&gt;
 ''d. Update scored question dropdown''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Test Review Strategy of Assignment Creation'''&lt;br /&gt;
 ''a. Test all auto selects feature''&lt;br /&gt;
&lt;br /&gt;
'''6. Test Due dates tab of assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''7. Test Adding participants by Instructor'''&lt;br /&gt;
 ''a. Add New Participants to assignment ''&lt;br /&gt;
 ''b. Verify assignments assigned to participants''&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;/div&gt;</summary>
		<author><name>Pjain12</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=103272</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=103272"/>
		<updated>2016-10-28T23:16:18Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Newly Added Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&lt;br /&gt;
&lt;br /&gt;
=='''Objective'''==&lt;br /&gt;
&lt;br /&gt;
=='''Feature Testing Tools'''==&lt;br /&gt;
&lt;br /&gt;
===Rspec===&lt;br /&gt;
&lt;br /&gt;
===Capybara===&lt;br /&gt;
&lt;br /&gt;
=='''Test Cases'''==&lt;br /&gt;
&lt;br /&gt;
===Existing 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;
 ''b. Test Creating private Assignment''&lt;br /&gt;
 &lt;br /&gt;
 ''c. Create Assignment for Team ''&lt;br /&gt;
 ''d. Create Assignment with Quiz''&lt;br /&gt;
 ''e. Create Assignment with staggered deadline ''&lt;br /&gt;
 ''f. Create Assignment with review visible to all reviewers''&lt;br /&gt;
 ''g. Create public micro-task assignment''&lt;br /&gt;
 ''h. create calibrated public assignment ''&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;
 ''b. Edit number of quizzes available to students''&lt;br /&gt;
 ''c. Edit number of members per team in an Assignment''&lt;br /&gt;
 ''d. Edit number of members per team ''&lt;br /&gt;
 ''e. Edit review visible to all other reviewers'''&lt;br /&gt;
 ''f. Should create teammate review row in rubrics''&lt;br /&gt;
 ''g. Check if checking calibration shows the tab''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Test Topic Tab of Assignment Creation'''&lt;br /&gt;
  ''a. edit topics properties''&lt;br /&gt;
  ''b. edit topics properties''&lt;br /&gt;
  ''c. Add new topic ''&lt;br /&gt;
  ''d. Delete existing topic ''&lt;br /&gt;
&lt;br /&gt;
'''4. Test Rubrics Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''5. Test Review Strategy of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''6. Test Due dates tab of assignment Creation'''&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;
 ''b. Verify assignments assigned to participants''&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;/div&gt;</summary>
		<author><name>Pjain12</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=103165</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=103165"/>
		<updated>2016-10-28T22:13:47Z</updated>

		<summary type="html">&lt;p&gt;Pjain12: /* Newly Added Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Background'''==&lt;br /&gt;
&lt;br /&gt;
=='''Objective'''==&lt;br /&gt;
&lt;br /&gt;
=='''Feature Testing Tools'''==&lt;br /&gt;
&lt;br /&gt;
===Rspec===&lt;br /&gt;
&lt;br /&gt;
===Capybara===&lt;br /&gt;
&lt;br /&gt;
=='''Test Cases'''==&lt;br /&gt;
&lt;br /&gt;
===Existing 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;
'''2. Test General Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''3. Test Topic Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''4. Test Rubrics Tab of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''5. Test Review Strategy of Assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''6. Test Due dates tab of assignment Creation'''&lt;br /&gt;
&lt;br /&gt;
'''7. Test Adding participants by Instructor'''&lt;br /&gt;
&lt;br /&gt;
=='''Automated Execution via Travis'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;/div&gt;</summary>
		<author><name>Pjain12</name></author>
	</entry>
</feed>