<?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=Gsrajadh</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=Gsrajadh"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Gsrajadh"/>
	<updated>2026-09-28T20:52:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;diff=101754</id>
		<title>CSC/ECE 517 Spring 2016 M1601 Implement HTML5 form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;diff=101754"/>
		<updated>2016-04-04T05:09:19Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Later Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''' Implementation of HTML5 form validation in servo'''&lt;br /&gt;
&lt;br /&gt;
Servo is a prototype web browser engine being developed by Mozilla and written in the Rust language. This project implements  [https://en.wikipedia.org/wiki/HTML5 HTML5] validations for servo. The validations are implemented via methods such as &amp;quot;valueMissing&amp;quot; which determine for different elements such a HTMLInput element etc. if it is ok to leave the input blank or if input is required. The code snippets given in this wiki explain how these methods are called in the HTML elements via different enums. The actual code to validate these inputs, will be implemented in the next phase of the project.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The [https://en.wikipedia.org/wiki/HTML5 HTML5]is a markup language used for displaying content on the World Wide Web&lt;br /&gt;
&lt;br /&gt;
HTML5 defines set of specification which users needs to follow to make web pages HTML5 compliant. HTML 5 defines a mechanism by which contents of forms can be validated before user is allowed to submit them. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] currently implements support for few of the form elements. This project is intended to implement client-side validations for these elements and extend the existing form element subset to include additional form elements that will support client side validation.&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. It is written in [https://www.rust-lang.org/ Rust] language. Current browser engines are mostly based on single-threaded model. Although there are some tasks (as decompressing images) which can be done on separate processor cores but most of the work (like interpreting HTML and laying out pages) is single-threaded.&lt;br /&gt;
Motivation behind servo is to create a highly parallel environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source systems programming language developed by Mozilla Research. Rust is designed to provide the same level of performance and power as C++, but without the risk of bugs and security flaws, and also with built-in mechanisms for exploiting multi-core processors.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Write some description here&lt;br /&gt;
&lt;br /&gt;
===Compiling and Building Servo===&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Steps Completed During Last Phase===&lt;br /&gt;
* The first requirement was to uncomment the attributes in ValidityState.weidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs. This facilitates in declaring the methods which we will be using for validation&lt;br /&gt;
* Next, we had to modify the ValidityState constructor to take an &amp;amp;Element argument and store it as element variable of JS&amp;lt;Element&amp;gt; type member in the ValidityState.&lt;br /&gt;
* The changes to the constructor resulted in build errors in following files as the constructor was referred to in these files&lt;br /&gt;
So, the constructors called in these files were modified to send the required extra parameter.&lt;br /&gt;
* Next, we had to add a new enum “ValidityStatus” in ValidityState having each possible validity check in ValidityState. This enum is used to specify the state in order to describe if there is a Value missing or if there is no error and the state is valid&lt;br /&gt;
* Next, we had to define a new trait Validatable having method “is_instance_validatable”. (which takes the new ValidityStatus enum as an argument.)&lt;br /&gt;
* Next, we implemented this trait and the corresponding method in the following files&lt;br /&gt;
* Then, we had to define method as_maybe_validatable in file “element.rs”  which returns an &amp;amp;Validatable value if the element implements the newly defined trait. This is used to check if the element is infact validatable before performing further operations to check the form validations&lt;br /&gt;
* Finally, we added a new html file “form_html5_validations.html” to test the HTML5 validation for the mentioned conditions&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
Our project requirement was to implement client side form validation and extend the supported subset of defined form elements. In order to implement this we were required to implement the following steps:&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
* We were required to compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
* Our next requirement was to uncomment the attributes in ValidityState.webidl and implement appropriate stub methods in validitystate.rs in order to fix build errors&lt;br /&gt;
*We had to make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
* We had to add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
* We had to define a Validatable trait that contains a method which accepts this enum as an argument &lt;br /&gt;
* Implement Validatable trait for the form element types &lt;br /&gt;
* We had to use the newly-added JS&amp;lt;Element&amp;gt; member to call the appropriate new methods in ValidityState&lt;br /&gt;
&lt;br /&gt;
===Later Steps===&lt;br /&gt;
* We have to add a method to HTMLFormElement to statically validate form element constraints &lt;br /&gt;
* Next we need to add a method to HTMLFormElement to interactively validate the constraints of a form element&lt;br /&gt;
* We have to implement the checkValidity API and reportValidity API for HTMLFormElement&lt;br /&gt;
* We have to Implement each validity state by adding support for attributes such as min,max, minlength etc&lt;br /&gt;
* Our last requirement is to modify the form submission algorithm to include constraint validation&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
Blah blah&lt;br /&gt;
===Solution Overview===&lt;br /&gt;
* Create 3 lists 'control', 'invalid_control', 'unhadled_invalid-control'&lt;br /&gt;
* Initialize 'control' with all the submitted elements of the form.&lt;br /&gt;
* For each submitted element, check the elements for constraint validation and if check fails - add that element to 'invalid_control' list. &lt;br /&gt;
* If the 'invalid_control' list is empty return true.&lt;br /&gt;
* For each element in 'invalid_control' list, fire a simple event cancelable at field and if the event was not cancelled - add that element to 'unhadled_invalid-control' list.&lt;br /&gt;
* If the 'unhandled_invalid_control' list is empty return true.&lt;br /&gt;
* Return false along with the 'unhandled_invalid_control' list to the user_agent, which will focus on one or more of the reported issues to user for further action.&lt;br /&gt;
&lt;br /&gt;
* Implements the validation methods in validitystate.rs&lt;br /&gt;
* Each method checks the element submitted to it for a particular constraint like value_missing, range_underflow etc and return false if the constraint check fails.&lt;br /&gt;
* Finally, the submit() method of form submission needs to be updated to invoke the interactive_validation() method. &lt;br /&gt;
&lt;br /&gt;
    method1: checkValidity&lt;br /&gt;
    boolean,list&amp;lt;elements&amp;gt; static_validation(list&amp;lt;elements&amp;gt; control){&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    method2: reportValidity&lt;br /&gt;
    boolean,list&amp;lt;elements&amp;gt; interactive_validation(list&amp;lt;elements&amp;gt; control){&lt;br /&gt;
    	//invoke method 1&lt;br /&gt;
    	status, unhandled_invalid_control = static_validation(control)&lt;br /&gt;
    	&lt;br /&gt;
        if (status==true) &lt;br /&gt;
            return true, empty_list&lt;br /&gt;
    	else &lt;br /&gt;
            return false, unhandled_invalid_control&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
Blah blah&lt;br /&gt;
&lt;br /&gt;
===UML Diagram===&lt;br /&gt;
Blah blah&lt;br /&gt;
&lt;br /&gt;
==='''Design Patterns &amp;amp; OO Practices'''===&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTML Element. We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy. Further design patterns will be used in the next phase of the project, where validation functions will be implemented.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
As of now, front-end UI testing is not possible as this requirement will be completely implemented during subsequent phases. However unit testing can be done by running  following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./mach test-wpt --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There were 11 tests which were failing earlier but now these tests are passing. The expectation for these tests has been changed from FAIL to PASS. Further tests are only required for the next round where we will implement the methods for validation.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
As a result of these initial changes, currently validation of the form elements has a basic implementation of the code required. The enum “ValidityStatus” is used to identify different states for the element. For each element in the form, the flow goes in this manner - First the “as_maybe_validatable” method in the element.rs file is called, which in turn finds out the type of the element and then calls the “is_instance_validatable” method on that element. In next phase of project, actual validation would be performed on list of Validatable elements. The state of the element depending upon the validation checks is one of the possible values in the enum. If the element validates all the possible checks, the state of the element is recorded as valid, else the state is either ValueMissing or one of the remaining enums in ValidityStatus. This state is recorded in the &amp;quot;state&amp;quot; variable in the ValidityState struct.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/stable/book/&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://doc.rust-lang.org/book/&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2015/Mozilla_Refactor_GLES2&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;diff=101753</id>
		<title>CSC/ECE 517 Spring 2016 M1601 Implement HTML5 form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;diff=101753"/>
		<updated>2016-04-04T05:07:53Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''' Implementation of HTML5 form validation in servo'''&lt;br /&gt;
&lt;br /&gt;
Servo is a prototype web browser engine being developed by Mozilla and written in the Rust language. This project implements  [https://en.wikipedia.org/wiki/HTML5 HTML5] validations for servo. The validations are implemented via methods such as &amp;quot;valueMissing&amp;quot; which determine for different elements such a HTMLInput element etc. if it is ok to leave the input blank or if input is required. The code snippets given in this wiki explain how these methods are called in the HTML elements via different enums. The actual code to validate these inputs, will be implemented in the next phase of the project.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The [https://en.wikipedia.org/wiki/HTML5 HTML5]is a markup language used for displaying content on the World Wide Web&lt;br /&gt;
&lt;br /&gt;
HTML5 defines set of specification which users needs to follow to make web pages HTML5 compliant. HTML 5 defines a mechanism by which contents of forms can be validated before user is allowed to submit them. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] currently implements support for few of the form elements. This project is intended to implement client-side validations for these elements and extend the existing form element subset to include additional form elements that will support client side validation.&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. It is written in [https://www.rust-lang.org/ Rust] language. Current browser engines are mostly based on single-threaded model. Although there are some tasks (as decompressing images) which can be done on separate processor cores but most of the work (like interpreting HTML and laying out pages) is single-threaded.&lt;br /&gt;
Motivation behind servo is to create a highly parallel environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source systems programming language developed by Mozilla Research. Rust is designed to provide the same level of performance and power as C++, but without the risk of bugs and security flaws, and also with built-in mechanisms for exploiting multi-core processors.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Write some description here&lt;br /&gt;
&lt;br /&gt;
===Compiling and Building Servo===&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Steps Completed During Last Phase===&lt;br /&gt;
* The first requirement was to uncomment the attributes in ValidityState.weidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs. This facilitates in declaring the methods which we will be using for validation&lt;br /&gt;
* Next, we had to modify the ValidityState constructor to take an &amp;amp;Element argument and store it as element variable of JS&amp;lt;Element&amp;gt; type member in the ValidityState.&lt;br /&gt;
* The changes to the constructor resulted in build errors in following files as the constructor was referred to in these files&lt;br /&gt;
So, the constructors called in these files were modified to send the required extra parameter.&lt;br /&gt;
* Next, we had to add a new enum “ValidityStatus” in ValidityState having each possible validity check in ValidityState. This enum is used to specify the state in order to describe if there is a Value missing or if there is no error and the state is valid&lt;br /&gt;
* Next, we had to define a new trait Validatable having method “is_instance_validatable”. (which takes the new ValidityStatus enum as an argument.)&lt;br /&gt;
* Next, we implemented this trait and the corresponding method in the following files&lt;br /&gt;
* Then, we had to define method as_maybe_validatable in file “element.rs”  which returns an &amp;amp;Validatable value if the element implements the newly defined trait. This is used to check if the element is infact validatable before performing further operations to check the form validations&lt;br /&gt;
* Finally, we added a new html file “form_html5_validations.html” to test the HTML5 validation for the mentioned conditions&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
Our project requirement was to implement client side form validation and extend the supported subset of defined form elements. In order to implement this we were required to implement the following steps:&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
* We were required to compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
* Our next requirement was to uncomment the attributes in ValidityState.webidl and implement appropriate stub methods in validitystate.rs in order to fix build errors&lt;br /&gt;
*We had to make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
* We had to add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
* We had to define a Validatable trait that contains a method which accepts this enum as an argument &lt;br /&gt;
* Implement Validatable trait for the form element types &lt;br /&gt;
* We had to use the newly-added JS&amp;lt;Element&amp;gt; member to call the appropriate new methods in ValidityState&lt;br /&gt;
&lt;br /&gt;
===Later Steps===&lt;br /&gt;
* Add a method to HTMLFormElement to statically validate form element constraints &lt;br /&gt;
* Add a method to HTMLFormElement to interactively validate the constraints of a form element&lt;br /&gt;
* We have to implement the checkValidity API and reportValidity API for HTMLFormElement&lt;br /&gt;
* We have to Implement each validity state by adding support for attributes such as min,max, minlength etc&lt;br /&gt;
* We need to modify the form submission algorithm to include constraint validation&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
Blah blah&lt;br /&gt;
===Solution Overview===&lt;br /&gt;
* Create 3 lists 'control', 'invalid_control', 'unhadled_invalid-control'&lt;br /&gt;
* Initialize 'control' with all the submitted elements of the form.&lt;br /&gt;
* For each submitted element, check the elements for constraint validation and if check fails - add that element to 'invalid_control' list. &lt;br /&gt;
* If the 'invalid_control' list is empty return true.&lt;br /&gt;
* For each element in 'invalid_control' list, fire a simple event cancelable at field and if the event was not cancelled - add that element to 'unhadled_invalid-control' list.&lt;br /&gt;
* If the 'unhandled_invalid_control' list is empty return true.&lt;br /&gt;
* Return false along with the 'unhandled_invalid_control' list to the user_agent, which will focus on one or more of the reported issues to user for further action.&lt;br /&gt;
&lt;br /&gt;
* Implements the validation methods in validitystate.rs&lt;br /&gt;
* Each method checks the element submitted to it for a particular constraint like value_missing, range_underflow etc and return false if the constraint check fails.&lt;br /&gt;
* Finally, the submit() method of form submission needs to be updated to invoke the interactive_validation() method. &lt;br /&gt;
&lt;br /&gt;
    method1: checkValidity&lt;br /&gt;
    boolean,list&amp;lt;elements&amp;gt; static_validation(list&amp;lt;elements&amp;gt; control){&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    method2: reportValidity&lt;br /&gt;
    boolean,list&amp;lt;elements&amp;gt; interactive_validation(list&amp;lt;elements&amp;gt; control){&lt;br /&gt;
    	//invoke method 1&lt;br /&gt;
    	status, unhandled_invalid_control = static_validation(control)&lt;br /&gt;
    	&lt;br /&gt;
        if (status==true) &lt;br /&gt;
            return true, empty_list&lt;br /&gt;
    	else &lt;br /&gt;
            return false, unhandled_invalid_control&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
Blah blah&lt;br /&gt;
&lt;br /&gt;
===UML Diagram===&lt;br /&gt;
Blah blah&lt;br /&gt;
&lt;br /&gt;
==='''Design Patterns &amp;amp; OO Practices'''===&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTML Element. We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy. Further design patterns will be used in the next phase of the project, where validation functions will be implemented.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
As of now, front-end UI testing is not possible as this requirement will be completely implemented during subsequent phases. However unit testing can be done by running  following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./mach test-wpt --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There were 11 tests which were failing earlier but now these tests are passing. The expectation for these tests has been changed from FAIL to PASS. Further tests are only required for the next round where we will implement the methods for validation.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
As a result of these initial changes, currently validation of the form elements has a basic implementation of the code required. The enum “ValidityStatus” is used to identify different states for the element. For each element in the form, the flow goes in this manner - First the “as_maybe_validatable” method in the element.rs file is called, which in turn finds out the type of the element and then calls the “is_instance_validatable” method on that element. In next phase of project, actual validation would be performed on list of Validatable elements. The state of the element depending upon the validation checks is one of the possible values in the enum. If the element validates all the possible checks, the state of the element is recorded as valid, else the state is either ValueMissing or one of the remaining enums in ValidityStatus. This state is recorded in the &amp;quot;state&amp;quot; variable in the ValidityState struct.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/stable/book/&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://doc.rust-lang.org/book/&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2015/Mozilla_Refactor_GLES2&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101385</id>
		<title>CSC/ECE 517 Spring 2016/Functional tests for assignment creation function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101385"/>
		<updated>2016-03-27T15:13:36Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Functional tests for assignment creation function=&lt;br /&gt;
This page outlines the use tests for assignment creation using the Expertiza system&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Structural Overview===&lt;br /&gt;
Assignment creation in Expertiza provides a large number of options for users. Features come at the cost of complexity; this project is focused on creating testing methods to ensure that user interaction with the assignment interface remains stable and reliable.&lt;br /&gt;
&lt;br /&gt;
Assignment creation is available from the Manage -&amp;gt; Assignments drop down on the expertiza site. Once an assignment is created it has 5 tabs for form entry. The remainder of this document will cover testing for each tab in more detail, the tabs are:&lt;br /&gt;
* General&lt;br /&gt;
* Topics&lt;br /&gt;
* Rubrics&lt;br /&gt;
* Review Strategy&lt;br /&gt;
&lt;br /&gt;
Check the panxing01/expertiza repository for the current development files. Currently all tests are run in two files:&lt;br /&gt;
* https://github.com/panxing01/expertiza/blob/master/spec/features/assignment_create_spec.rb&lt;br /&gt;
* https://github.com/panxing01/expertiza/blob/master/spec/features/assignment_interface_spec.rb&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
The Assignment class has many questionnaires throught the AssignmentQuestionnairs class. The Questionnaire class inherits from ActiveRecord::Base and has 8 fields plus primary key and date entries. The fields are:&lt;br /&gt;
* name: The name of the questionnaire row&lt;br /&gt;
* instructor_id: The instuctor key linked to the row&lt;br /&gt;
* private: True if private questionnaire&lt;br /&gt;
* min_question_score&lt;br /&gt;
* max_question_score&lt;br /&gt;
* type: field showing subclass&lt;br /&gt;
* display_type&lt;br /&gt;
* instruction_loc: stores URL for questionnaire instruction&lt;br /&gt;
&lt;br /&gt;
The Questionnaire class has 11 sub-classes. They are:&lt;br /&gt;
* Rubric&lt;br /&gt;
* CourseEvaluationQuestionnaire&lt;br /&gt;
* SurveyQuestionnaire&lt;br /&gt;
* BookmarkRatingQuestionnaire&lt;br /&gt;
* AuthorFeedbackQuestionnaire&lt;br /&gt;
* QuizQuestionnaire&lt;br /&gt;
* GlobalSurveyQuestionnaire&lt;br /&gt;
* Metasurvey&lt;br /&gt;
* ReviewQuestionnaire&lt;br /&gt;
* MetareviewQuestionnaire&lt;br /&gt;
* TeammateReviewQuestionnaire&lt;br /&gt;
&lt;br /&gt;
===Setup===&lt;br /&gt;
To setup functionality testing of assignment creation feature we did the following steps:&lt;br /&gt;
*Created RSpec file in /spec/features/ folder of [https://github.com/expertiza/expertiza Expertiza]&lt;br /&gt;
* Wrote functional tests using [https://github.com/jnicklas/capybara Capybara]&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
In this section, the functional test includes assignment name, course, submission directory, description URL, &amp;quot;Has team?&amp;quot;, &amp;quot;Has quiz?&amp;quot; and &amp;quot;Calibrated peer-review for training&amp;quot;.&lt;br /&gt;
*assignment name&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment name&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment name&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.where(name: &amp;quot;assignment for test&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*course&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can select course&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*submission directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Submission directory&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 2'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Submission directory&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Submission directory:&amp;quot;, with: 'Submission directory for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).directory_path).to eq 'Submission directory for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*description URL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Description URL&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 3'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Description URL&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Description URL:&amp;quot;, with: 'Description URL for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).spec_location).to eq 'Description URL for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has team?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can Has teams and set team number&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 5'&lt;br /&gt;
      find('#team_assignment').set(true)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Maximum number of members per team&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;Show teammate reviews&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 4&lt;br /&gt;
      find('#assignment_form_assignment_show_teammate_reviews').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).show_teammate_reviews).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has quiz?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can save the number of quiz questions&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 &amp;quot;Assignment name:&amp;quot;, with: '11'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      find('#assignment_form_assignment_require_quiz').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      visit '/assignments/2/edit'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Number of Quiz questions&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Calibrated peer-review for training&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set Calibrated peer-view for training&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 4'&lt;br /&gt;
      find('#assignment_form_assignment_is_calibrated').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).is_calibrated).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Topics===&lt;br /&gt;
In this section, functionality of &amp;quot;Edit topics&amp;quot; is thoroughly tested. Below are some of the code snippets of this testing module:&lt;br /&gt;
*Edit topics content&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;is able to see edit topics content correctly&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow topic suggestions from students?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable bidding for topics?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable authors to review others working on same topic?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow reviewer to choose which topic to review?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow participants to create bookmarks? &amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;New topic&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Import Topics&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Back&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Save&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Show/hide teams&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  it &amp;quot;is able to show/hide teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
&lt;br /&gt;
      click_link('Hide all teams')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      click_link(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rubrics===&lt;br /&gt;
Rubrics are arranged into 3 rows of data named &amp;quot;Review&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot;. Each row is handled under separate descriptions in order to allow quick and comprehensive testing for the seperate functions.&lt;br /&gt;
Each row updates using a subclass of the Questionnaire class for dropdown values. Classes used are the ReviewQuestionnaire, AuthorFeedbackQuestionnaire, and the TeammateReviewQuestionnaire respectively.&lt;br /&gt;
&lt;br /&gt;
Testing required creation of the three questionnaire subclasses in order to populate the dropdowns. Basic code layout for testing each value change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe &amp;quot;Edit [subclass] rubric&amp;quot; do&lt;br /&gt;
    it &amp;quot;should update [component]&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;[table row identifier]&amp;quot;) do&lt;br /&gt;
        select &amp;quot;[subclass instance name value]&amp;quot;, :from =&amp;gt; '[form identifier]'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect([questionnaireinstance]).to have_attributes([attrib updated] =&amp;gt; [new value])&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Review Strategy===&lt;br /&gt;
In this module we have tested the functionality of the &amp;quot;Teammate Review&amp;quot; module. Some of the tests are given below:&lt;br /&gt;
*Teammate Review&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update questionnaire&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Notification limit&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update notification limit&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', :with =&amp;gt; '50'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;).first).to have_attributes(:notification_limit =&amp;gt; 50)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
The tests can be run on the terminal using the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec path/to/spec/file.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can check if the functionality of the system is implemented properly seeing if the corresponding tests pass or fail.&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101384</id>
		<title>CSC/ECE 517 Spring 2016/Functional tests for assignment creation function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101384"/>
		<updated>2016-03-27T15:12:30Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Functional tests for assignment creation function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Functional tests for assignment creation function=&lt;br /&gt;
This page outlines the use tests for assignment creation using the Expertiza system&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Structural Overview===&lt;br /&gt;
Assignment creation in Expertiza provides a large number of options for users. Features come at the cost of complexity; this project is focused on creating testing methods to ensure that user interaction with the assignment interface remains stable and reliable.&lt;br /&gt;
&lt;br /&gt;
Assignment creation is available from the Manage -&amp;gt; Assignments drop down on the expertiza site. Once an assignment is created it has 5 tabs for form entry. The remainder of this document will cover testing for each tab in more detail, the tabs are:&lt;br /&gt;
* General&lt;br /&gt;
* Topics&lt;br /&gt;
* Rubrics&lt;br /&gt;
* Review Strategy&lt;br /&gt;
&lt;br /&gt;
Check the panxing01/expertiza repository for the current development files. Currently all tests are run in two files:&lt;br /&gt;
* https://github.com/panxing01/expertiza/blob/master/spec/features/assignment_create_spec.rb&lt;br /&gt;
* https://github.com/panxing01/expertiza/blob/master/spec/features/assignment_interface_spec.rb&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
The Assignment class has many questionnaires throught the AssignmentQuestionnairs class. The Questionnaire class inherits from ActiveRecord::Base and has 8 fields plus primary key and date entries. The fields are:&lt;br /&gt;
* name: The name of the questionnaire row&lt;br /&gt;
* instructor_id: The instuctor key linked to the row&lt;br /&gt;
* private: True if private questionnaire&lt;br /&gt;
* min_question_score&lt;br /&gt;
* max_question_score&lt;br /&gt;
* type: field showing subclass&lt;br /&gt;
* display_type&lt;br /&gt;
* instruction_loc: stores URL for questionnaire instruction&lt;br /&gt;
&lt;br /&gt;
The Questionnaire class has 11 sub-classes. They are:&lt;br /&gt;
* Rubric&lt;br /&gt;
* CourseEvaluationQuestionnaire&lt;br /&gt;
* SurveyQuestionnaire&lt;br /&gt;
* BookmarkRatingQuestionnaire&lt;br /&gt;
* AuthorFeedbackQuestionnaire&lt;br /&gt;
* QuizQuestionnaire&lt;br /&gt;
* GlobalSurveyQuestionnaire&lt;br /&gt;
* Metasurvey&lt;br /&gt;
* ReviewQuestionnaire&lt;br /&gt;
* MetareviewQuestionnaire&lt;br /&gt;
* TeammateReviewQuestionnaire&lt;br /&gt;
&lt;br /&gt;
===Setup===&lt;br /&gt;
To setup functionality testing of assignment creation feature we did the following steps:&lt;br /&gt;
*Created RSpec file in /spec/features/ folder of [https://github.com/expertiza/expertiza Expertiza]&lt;br /&gt;
* Wrote functional tests using Capybara[https://github.com/jnicklas/capybara]&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
In this section, the functional test includes assignment name, course, submission directory, description URL, &amp;quot;Has team?&amp;quot;, &amp;quot;Has quiz?&amp;quot; and &amp;quot;Calibrated peer-review for training&amp;quot;.&lt;br /&gt;
*assignment name&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment name&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment name&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.where(name: &amp;quot;assignment for test&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*course&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can select course&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*submission directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Submission directory&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 2'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Submission directory&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Submission directory:&amp;quot;, with: 'Submission directory for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).directory_path).to eq 'Submission directory for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*description URL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Description URL&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 3'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Description URL&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Description URL:&amp;quot;, with: 'Description URL for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).spec_location).to eq 'Description URL for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has team?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can Has teams and set team number&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 5'&lt;br /&gt;
      find('#team_assignment').set(true)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Maximum number of members per team&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;Show teammate reviews&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 4&lt;br /&gt;
      find('#assignment_form_assignment_show_teammate_reviews').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).show_teammate_reviews).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has quiz?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can save the number of quiz questions&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 &amp;quot;Assignment name:&amp;quot;, with: '11'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      find('#assignment_form_assignment_require_quiz').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      visit '/assignments/2/edit'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Number of Quiz questions&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Calibrated peer-review for training&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set Calibrated peer-view for training&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 4'&lt;br /&gt;
      find('#assignment_form_assignment_is_calibrated').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).is_calibrated).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Topics===&lt;br /&gt;
In this section, functionality of &amp;quot;Edit topics&amp;quot; is thoroughly tested. Below are some of the code snippets of this testing module:&lt;br /&gt;
*Edit topics content&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;is able to see edit topics content correctly&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow topic suggestions from students?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable bidding for topics?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable authors to review others working on same topic?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow reviewer to choose which topic to review?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow participants to create bookmarks? &amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;New topic&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Import Topics&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Back&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Save&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Show/hide teams&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  it &amp;quot;is able to show/hide teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
&lt;br /&gt;
      click_link('Hide all teams')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      click_link(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rubrics===&lt;br /&gt;
Rubrics are arranged into 3 rows of data named &amp;quot;Review&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot;. Each row is handled under separate descriptions in order to allow quick and comprehensive testing for the seperate functions.&lt;br /&gt;
Each row updates using a subclass of the Questionnaire class for dropdown values. Classes used are the ReviewQuestionnaire, AuthorFeedbackQuestionnaire, and the TeammateReviewQuestionnaire respectively.&lt;br /&gt;
&lt;br /&gt;
Testing required creation of the three questionnaire subclasses in order to populate the dropdowns. Basic code layout for testing each value change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe &amp;quot;Edit [subclass] rubric&amp;quot; do&lt;br /&gt;
    it &amp;quot;should update [component]&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;[table row identifier]&amp;quot;) do&lt;br /&gt;
        select &amp;quot;[subclass instance name value]&amp;quot;, :from =&amp;gt; '[form identifier]'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect([questionnaireinstance]).to have_attributes([attrib updated] =&amp;gt; [new value])&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Review Strategy===&lt;br /&gt;
In this module we have tested the functionality of the &amp;quot;Teammate Review&amp;quot; module. Some of the tests are given below:&lt;br /&gt;
*Teammate Review&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update questionnaire&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Notification limit&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update notification limit&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', :with =&amp;gt; '50'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;).first).to have_attributes(:notification_limit =&amp;gt; 50)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
The tests can be run on the terminal using the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec path/to/spec/file.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can check if the functionality of the system is implemented properly seeing if the corresponding tests pass or fail.&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101367</id>
		<title>CSC/ECE 517 Spring 2016/Functional tests for assignment creation function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101367"/>
		<updated>2016-03-25T01:10:33Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Functional tests for assignment creation function=&lt;br /&gt;
This page outlines the use tests for assignment creation using the Expertiza system&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Structural Overview===&lt;br /&gt;
Assignment creation in Expertiza provides a large number of options for users. Features come at the cost of complexity; this project is focused on creating testing methods to ensure that user interaction with the assignment interface remains stable and reliable.&lt;br /&gt;
&lt;br /&gt;
Assignment creation is available from the Manage -&amp;gt; Assignments drop down on the expertiza site. Once an assignment is created it has 5 tabs for form entry. The remainder of this document will cover testing for each tab in more detail, the tabs are:&lt;br /&gt;
* General&lt;br /&gt;
* Topics&lt;br /&gt;
* Rubrics&lt;br /&gt;
* Review Strategy&lt;br /&gt;
&lt;br /&gt;
===Setup===&lt;br /&gt;
To setup functionality testing of assignment creation feature we did the following steps:&lt;br /&gt;
*Created RSpec file in /spec/features/ folder of [https://github.com/expertiza/expertiza Expertiza]&lt;br /&gt;
* Wrote functional tests using Capybara&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
In this section, the functional test includes assignment name, course, submission directory, description URL, &amp;quot;Has team?&amp;quot;, &amp;quot;Has quiz?&amp;quot; and &amp;quot;Calibrated peer-review for training&amp;quot;.&lt;br /&gt;
*assignment name&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment name&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment name&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.where(name: &amp;quot;assignment for test&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*course&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can select course&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*submission directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Submission directory&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 2'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Submission directory&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Submission directory:&amp;quot;, with: 'Submission directory for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).directory_path).to eq 'Submission directory for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*description URL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Description URL&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 3'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Description URL&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Description URL:&amp;quot;, with: 'Description URL for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).spec_location).to eq 'Description URL for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has team?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can Has teams and set team number&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 5'&lt;br /&gt;
      find('#team_assignment').set(true)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Maximum number of members per team&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;Show teammate reviews&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 4&lt;br /&gt;
      find('#assignment_form_assignment_show_teammate_reviews').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).show_teammate_reviews).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has quiz?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can save the number of quiz questions&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 &amp;quot;Assignment name:&amp;quot;, with: '11'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      find('#assignment_form_assignment_require_quiz').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      visit '/assignments/2/edit'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Number of Quiz questions&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Calibrated peer-review for training&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set Calibrated peer-view for training&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 4'&lt;br /&gt;
      find('#assignment_form_assignment_is_calibrated').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).is_calibrated).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Topics===&lt;br /&gt;
In this section, functionality of &amp;quot;Edit topics&amp;quot; is thoroughly tested. Below are some of the code snippets of this testing module:&lt;br /&gt;
*Edit topics content&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;is able to see edit topics content correctly&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow topic suggestions from students?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable bidding for topics?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable authors to review others working on same topic?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow reviewer to choose which topic to review?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow participants to create bookmarks? &amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;New topic&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Import Topics&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Back&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Save&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Show/hide teams&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  it &amp;quot;is able to show/hide teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
&lt;br /&gt;
      click_link('Hide all teams')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      click_link(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rubrics===&lt;br /&gt;
Rubrics are arranged into 3 rows of data named &amp;quot;Review&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot;. Each row is handled under separate descriptions in order to allow quick and comprehensive testing for the seperate functions.&lt;br /&gt;
Each row updates a subclass of the Questionnaire class. The Active Record hierarchy is:&lt;br /&gt;
* Questionnaire&lt;br /&gt;
** ReviewQuestionnaire&lt;br /&gt;
** AuthorFeedbackQuestionnaire&lt;br /&gt;
** TeammateReviewQuestionaire&lt;br /&gt;
&lt;br /&gt;
The Questionnaire class is connected to the Assignment class via the AssignmentQuestionnaire class. &lt;br /&gt;
&lt;br /&gt;
===Review Strategy===&lt;br /&gt;
In this module we have tested the functionality of the &amp;quot;Teammate Review&amp;quot; module. Some of the tests are given below:&lt;br /&gt;
*Teammate Review&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update questionnaire&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Notification limit&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update notification limit&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', :with =&amp;gt; '50'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;).first).to have_attributes(:notification_limit =&amp;gt; 50)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101366</id>
		<title>CSC/ECE 517 Spring 2016/Functional tests for assignment creation function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101366"/>
		<updated>2016-03-25T01:07:22Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Functional tests for assignment creation function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Functional tests for assignment creation function=&lt;br /&gt;
This page outlines the use tests for assignment creation using the Expertiza system&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Structural Overview===&lt;br /&gt;
Assignment creation in Expertiza provides a large number of options for users. Features come at the cost of complexity; this project is focused on creating testing methods to ensure that user interaction with the assignment interface remains stable and reliable.&lt;br /&gt;
&lt;br /&gt;
Assignment creation is available from the Manage -&amp;gt; Assignments drop down on the expertiza site. Once an assignment is created it has 5 tabs for form entry. The remainder of this document will cover testing for each tab in more detail, the tabs are:&lt;br /&gt;
* General&lt;br /&gt;
* Topics&lt;br /&gt;
* Rubrics&lt;br /&gt;
* Review Strategy&lt;br /&gt;
&lt;br /&gt;
===Setup===&lt;br /&gt;
To setup functionality testing of assignment creation feature we did the following steps:&lt;br /&gt;
*Created RSpec file in /spec/features/ folder of https://github.com/expertiza/expertiza&lt;br /&gt;
* Wrote functional tests using Capybara&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
In this section, the functional test includes assignment name, course, submission directory, description URL, &amp;quot;Has team?&amp;quot;, &amp;quot;Has quiz?&amp;quot; and &amp;quot;Calibrated peer-review for training&amp;quot;.&lt;br /&gt;
*assignment name&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment name&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment name&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.where(name: &amp;quot;assignment for test&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*course&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can select course&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*submission directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Submission directory&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 2'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Submission directory&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Submission directory:&amp;quot;, with: 'Submission directory for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).directory_path).to eq 'Submission directory for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*description URL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Description URL&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 3'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Description URL&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Description URL:&amp;quot;, with: 'Description URL for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).spec_location).to eq 'Description URL for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has team?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can Has teams and set team number&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 5'&lt;br /&gt;
      find('#team_assignment').set(true)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Maximum number of members per team&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;Show teammate reviews&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 4&lt;br /&gt;
      find('#assignment_form_assignment_show_teammate_reviews').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).show_teammate_reviews).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has quiz?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can save the number of quiz questions&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 &amp;quot;Assignment name:&amp;quot;, with: '11'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      find('#assignment_form_assignment_require_quiz').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      visit '/assignments/2/edit'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Number of Quiz questions&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Calibrated peer-review for training&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set Calibrated peer-view for training&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 4'&lt;br /&gt;
      find('#assignment_form_assignment_is_calibrated').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).is_calibrated).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Topics===&lt;br /&gt;
In this section, functionality of &amp;quot;Edit topics&amp;quot; is thoroughly tested. Below are some of the code snippets of this testing module:&lt;br /&gt;
*Edit topics content&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;is able to see edit topics content correctly&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow topic suggestions from students?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable bidding for topics?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable authors to review others working on same topic?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow reviewer to choose which topic to review?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow participants to create bookmarks? &amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;New topic&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Import Topics&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Back&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Save&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Show/hide teams&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  it &amp;quot;is able to show/hide teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
&lt;br /&gt;
      click_link('Hide all teams')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      click_link(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rubrics===&lt;br /&gt;
Rubrics are arranged into 3 rows of data named &amp;quot;Review&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot;. Each row is handled under separate descriptions in order to allow quick and comprehensive testing for the seperate functions.&lt;br /&gt;
Each row updates a subclass of the Questionnaire class. The Active Record hierarchy is:&lt;br /&gt;
* Questionnaire&lt;br /&gt;
** ReviewQuestionnaire&lt;br /&gt;
** AuthorFeedbackQuestionnaire&lt;br /&gt;
** TeammateReviewQuestionaire&lt;br /&gt;
&lt;br /&gt;
The Questionnaire class is connected to the Assignment class via the AssignmentQuestionnaire class. &lt;br /&gt;
&lt;br /&gt;
===Review Strategy===&lt;br /&gt;
In this module we have tested the functionality of the &amp;quot;Teammate Review&amp;quot; module. Some of the tests are given below:&lt;br /&gt;
*Teammate Review&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update questionnaire&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Notification limit&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update notification limit&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', :with =&amp;gt; '50'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;).first).to have_attributes(:notification_limit =&amp;gt; 50)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101365</id>
		<title>CSC/ECE 517 Spring 2016/Functional tests for assignment creation function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101365"/>
		<updated>2016-03-25T01:03:33Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Due dates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Functional tests for assignment creation function=&lt;br /&gt;
This page outlines the use tests for assignment creation using the Expertiza system&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Structural Overview===&lt;br /&gt;
Assignment creation in Expertiza provides a large number of options for users. Features come at the cost of complexity; this project is focused on creating testing methods to ensure that user interaction with the assignment interface remains stable and reliable.&lt;br /&gt;
&lt;br /&gt;
Assignment creation is available from the Manage -&amp;gt; Assignments drop down on the expertiza site. Once an assignment is created it has 5 tabs for form entry. The remainder of this document will cover testing for each tab in more detail, the tabs are:&lt;br /&gt;
* General&lt;br /&gt;
* Topics&lt;br /&gt;
* Rubrics&lt;br /&gt;
* Review Strategy&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
In this section, the functional test includes assignment name, course, submission directory, description URL, &amp;quot;Has team?&amp;quot;, &amp;quot;Has quiz?&amp;quot; and &amp;quot;Calibrated peer-review for training&amp;quot;.&lt;br /&gt;
*assignment name&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment name&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment name&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.where(name: &amp;quot;assignment for test&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*course&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can select course&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*submission directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Submission directory&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 2'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Submission directory&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Submission directory:&amp;quot;, with: 'Submission directory for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).directory_path).to eq 'Submission directory for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*description URL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Description URL&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 3'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Description URL&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Description URL:&amp;quot;, with: 'Description URL for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).spec_location).to eq 'Description URL for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has team?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can Has teams and set team number&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 5'&lt;br /&gt;
      find('#team_assignment').set(true)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Maximum number of members per team&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;Show teammate reviews&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 4&lt;br /&gt;
      find('#assignment_form_assignment_show_teammate_reviews').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).show_teammate_reviews).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has quiz?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can save the number of quiz questions&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 &amp;quot;Assignment name:&amp;quot;, with: '11'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      find('#assignment_form_assignment_require_quiz').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      visit '/assignments/2/edit'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Number of Quiz questions&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Calibrated peer-review for training&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set Calibrated peer-view for training&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 4'&lt;br /&gt;
      find('#assignment_form_assignment_is_calibrated').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).is_calibrated).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Topics===&lt;br /&gt;
In this section, functionality of &amp;quot;Edit topics&amp;quot; is thoroughly tested. Below are some of the code snippets of this testing module:&lt;br /&gt;
*Edit topics content&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;is able to see edit topics content correctly&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow topic suggestions from students?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable bidding for topics?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable authors to review others working on same topic?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow reviewer to choose which topic to review?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow participants to create bookmarks? &amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;New topic&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Import Topics&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Back&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Save&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Show/hide teams&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  it &amp;quot;is able to show/hide teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
&lt;br /&gt;
      click_link('Hide all teams')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      click_link(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rubrics===&lt;br /&gt;
Rubrics are arranged into 3 rows of data named &amp;quot;Review&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot;. Each row is handled under separate descriptions in order to allow quick and comprehensive testing for the seperate functions.&lt;br /&gt;
Each row updates a subclass of the Questionnaire class. The Active Record hierarchy is:&lt;br /&gt;
* Questionnaire&lt;br /&gt;
** ReviewQuestionnaire&lt;br /&gt;
** AuthorFeedbackQuestionnaire&lt;br /&gt;
** TeammateReviewQuestionaire&lt;br /&gt;
&lt;br /&gt;
The Questionnaire class is connected to the Assignment class via the AssignmentQuestionnaire class. &lt;br /&gt;
&lt;br /&gt;
===Review Strategy===&lt;br /&gt;
In this module we have tested the functionality of the &amp;quot;Teammate Review&amp;quot; module. Some of the tests are given below:&lt;br /&gt;
*Teammate Review&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update questionnaire&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Notification limit&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;should update notification limit&amp;quot;, js: true do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/1/edit'&lt;br /&gt;
      find_link('Rubrics').click&lt;br /&gt;
      within(&amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
        select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, :from =&amp;gt; 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        fill_in 'assignment_form[assignment_questionnaire][][notification_limit]', :with =&amp;gt; '50'&lt;br /&gt;
      end&lt;br /&gt;
      click_button 'Save'&lt;br /&gt;
      expect(get_questionnaire(&amp;quot;TeammateReviewQuestionnaire2&amp;quot;).first).to have_attributes(:notification_limit =&amp;gt; 50)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101364</id>
		<title>CSC/ECE 517 Spring 2016/Functional tests for assignment creation function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101364"/>
		<updated>2016-03-25T01:00:18Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Functional tests for assignment creation function=&lt;br /&gt;
This page outlines the use tests for assignment creation using the Expertiza system&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Structural Overview===&lt;br /&gt;
Assignment creation in Expertiza provides a large number of options for users. Features come at the cost of complexity; this project is focused on creating testing methods to ensure that user interaction with the assignment interface remains stable and reliable.&lt;br /&gt;
&lt;br /&gt;
Assignment creation is available from the Manage -&amp;gt; Assignments drop down on the expertiza site. Once an assignment is created it has 5 tabs for form entry. The remainder of this document will cover testing for each tab in more detail, the tabs are:&lt;br /&gt;
* General&lt;br /&gt;
* Topics&lt;br /&gt;
* Rubrics&lt;br /&gt;
* Review Strategy&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
In this section, the functional test includes assignment name, course, submission directory, description URL, &amp;quot;Has team?&amp;quot;, &amp;quot;Has quiz?&amp;quot; and &amp;quot;Calibrated peer-review for training&amp;quot;.&lt;br /&gt;
*assignment name&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment name&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment name&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.where(name: &amp;quot;assignment for test&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*course&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can select course&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*submission directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Submission directory&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 2'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Submission directory&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Submission directory:&amp;quot;, with: 'Submission directory for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).directory_path).to eq 'Submission directory for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*description URL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Description URL&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 3'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Description URL&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Description URL:&amp;quot;, with: 'Description URL for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).spec_location).to eq 'Description URL for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has team?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can Has teams and set team number&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 5'&lt;br /&gt;
      find('#team_assignment').set(true)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Maximum number of members per team&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;Show teammate reviews&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 4&lt;br /&gt;
      find('#assignment_form_assignment_show_teammate_reviews').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).show_teammate_reviews).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has quiz?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can save the number of quiz questions&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 &amp;quot;Assignment name:&amp;quot;, with: '11'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      find('#assignment_form_assignment_require_quiz').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      visit '/assignments/2/edit'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Number of Quiz questions&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Calibrated peer-review for training&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set Calibrated peer-view for training&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 4'&lt;br /&gt;
      find('#assignment_form_assignment_is_calibrated').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).is_calibrated).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Topics===&lt;br /&gt;
In this section, functionality of &amp;quot;Edit topics&amp;quot; is thoroughly tested. Below are some of the code snippets of this testing module:&lt;br /&gt;
*Edit topics content&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;is able to see edit topics content correctly&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow topic suggestions from students?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable bidding for topics?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Enable authors to review others working on same topic?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow reviewer to choose which topic to review?&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Allow participants to create bookmarks? &amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;New topic&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Import Topics&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Back&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Save&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Show/hide teams&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  it &amp;quot;is able to show/hide teams&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit 'assignments/1/edit#tab-2'&lt;br /&gt;
&lt;br /&gt;
      click_link('Hide all teams')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      click_link(&amp;quot;Show all teams&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Hide all teams&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rubrics===&lt;br /&gt;
Rubrics are arranged into 3 rows of data named &amp;quot;Review&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot;. Each row is handled under separate descriptions in order to allow quick and comprehensive testing for the seperate functions.&lt;br /&gt;
Each row updates a subclass of the Questionnaire class. The Active Record hierarchy is:&lt;br /&gt;
* Questionnaire&lt;br /&gt;
** ReviewQuestionnaire&lt;br /&gt;
** AuthorFeedbackQuestionnaire&lt;br /&gt;
** TeammateReviewQuestionaire&lt;br /&gt;
&lt;br /&gt;
The Questionnaire class is connected to the Assignment class via the AssignmentQuestionnaire class. &lt;br /&gt;
&lt;br /&gt;
===Due dates===&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101363</id>
		<title>CSC/ECE 517 Spring 2016/Functional tests for assignment creation function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101363"/>
		<updated>2016-03-25T00:57:52Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Functional tests for assignment creation function=&lt;br /&gt;
This page outlines the use tests for assignment creation using the Expertiza system&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Structural Overview===&lt;br /&gt;
Assignment creation in Expertiza provides a large number of options for users. Features come at the cost of complexity; this project is focused on creating testing methods to ensure that user interaction with the assignment interface remains stable and reliable.&lt;br /&gt;
&lt;br /&gt;
Assignment creation is available from the Manage -&amp;gt; Assignments drop down on the expertiza site. Once an assignment is created it has 5 tabs for form entry. The remainder of this document will cover testing for each tab in more detail, the tabs are:&lt;br /&gt;
* General&lt;br /&gt;
* Topics&lt;br /&gt;
* Rubrics&lt;br /&gt;
* Review Strategy&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
In this section, the functional test includes assignment name, course, submission directory, description URL, &amp;quot;Has team?&amp;quot;, &amp;quot;Has quiz?&amp;quot; and &amp;quot;Calibrated peer-review for training&amp;quot;.&lt;br /&gt;
*assignment name&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment name&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment name&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.where(name: &amp;quot;assignment for test&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*course&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can select course&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*submission directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Submission directory&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 2'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Submission directory&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Submission directory:&amp;quot;, with: 'Submission directory for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).directory_path).to eq 'Submission directory for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*description URL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Description URL&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 3'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Description URL&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Description URL:&amp;quot;, with: 'Description URL for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).spec_location).to eq 'Description URL for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has team?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can Has teams and set team number&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 5'&lt;br /&gt;
      find('#team_assignment').set(true)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Maximum number of members per team&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;Show teammate reviews&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 4&lt;br /&gt;
      find('#assignment_form_assignment_show_teammate_reviews').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).show_teammate_reviews).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has quiz?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can save the number of quiz questions&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 &amp;quot;Assignment name:&amp;quot;, with: '11'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      find('#assignment_form_assignment_require_quiz').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      visit '/assignments/2/edit'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Number of Quiz questions&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Calibrated peer-review for training&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set Calibrated peer-view for training&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 4'&lt;br /&gt;
      find('#assignment_form_assignment_is_calibrated').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).is_calibrated).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Topics===&lt;br /&gt;
In this section, functionality of &amp;quot;Edit topics&amp;quot; is thoroughly tested. Below are some of the code snippets of this testing module:&lt;br /&gt;
&lt;br /&gt;
===Rubrics===&lt;br /&gt;
Rubrics are arranged into 3 rows of data named &amp;quot;Review&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot;. Each row is handled under separate descriptions in order to allow quick and comprehensive testing for the seperate functions.&lt;br /&gt;
Each row updates a subclass of the Questionnaire class. The Active Record hierarchy is:&lt;br /&gt;
* Questionnaire&lt;br /&gt;
** ReviewQuestionnaire&lt;br /&gt;
** AuthorFeedbackQuestionnaire&lt;br /&gt;
** TeammateReviewQuestionaire&lt;br /&gt;
&lt;br /&gt;
The Questionnaire class is connected to the Assignment class via the AssignmentQuestionnaire class. &lt;br /&gt;
&lt;br /&gt;
===Due dates===&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101362</id>
		<title>CSC/ECE 517 Spring 2016/Functional tests for assignment creation function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Functional_tests_for_assignment_creation_function&amp;diff=101362"/>
		<updated>2016-03-25T00:56:00Z</updated>

		<summary type="html">&lt;p&gt;Gsrajadh: /* Structural Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Functional tests for assignment creation function=&lt;br /&gt;
This page outlines the use tests for assignment creation using the Expertiza system&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Structural Overview===&lt;br /&gt;
Assignment creation in Expertiza provides a large number of options for users. Features come at the cost of complexity; this project is focused on creating testing methods to ensure that user interaction with the assignment interface remains stable and reliable.&lt;br /&gt;
&lt;br /&gt;
Assignment creation is available from the Manage -&amp;gt; Assignments drop down on the expertiza site. Once an assignment is created it has 5 tabs for form entry. The remainder of this document will cover testing for each tab in more detail, the tabs are:&lt;br /&gt;
* General&lt;br /&gt;
* Topics&lt;br /&gt;
* Rubrics&lt;br /&gt;
* Review Strategy&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
In this section, the functional test includes assignment name, course, submission directory, description URL, &amp;quot;Has team?&amp;quot;, &amp;quot;Has quiz?&amp;quot; and &amp;quot;Calibrated peer-review for training&amp;quot;.&lt;br /&gt;
*assignment name&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment name&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment name&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.where(name: &amp;quot;assignment for test&amp;quot;)).to exist&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*course&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can select course&amp;quot; do&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      visit '/assignments/new?private=0'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*submission directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Submission directory&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 2'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Submission directory&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Submission directory:&amp;quot;, with: 'Submission directory for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).directory_path).to eq 'Submission directory for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*description URL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set assginment Description URL&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 3'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Description URL&amp;quot;&lt;br /&gt;
      fill_in &amp;quot;Description URL:&amp;quot;, with: 'Description URL for test'&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).spec_location).to eq 'Description URL for test'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has team?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can Has teams and set team number&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 5'&lt;br /&gt;
      find('#team_assignment').set(true)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Maximum number of members per team&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;Show teammate reviews&amp;quot;&lt;br /&gt;
      fill_in 'assignment_form_assignment_max_team_size', with: 4&lt;br /&gt;
      find('#assignment_form_assignment_show_teammate_reviews').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).show_teammate_reviews).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Has quiz?&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can save the number of quiz questions&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 &amp;quot;Assignment name:&amp;quot;, with: '11'&lt;br /&gt;
      select('5', :from =&amp;gt; 'assignment_form_assignment_course_id')&lt;br /&gt;
      find('#assignment_form_assignment_require_quiz').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      visit '/assignments/2/edit'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Number of Quiz questions&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&amp;quot;Calibrated peer-review for training&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    it &amp;quot;can set Calibrated peer-view for training&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 &amp;quot;Assignment name:&amp;quot;, with: 'assignment for test 4'&lt;br /&gt;
      find('#assignment_form_assignment_is_calibrated').set(true)&lt;br /&gt;
      click_button &amp;quot;Create&amp;quot;&lt;br /&gt;
      expect(Assignment.find(2).is_calibrated).to eq true&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Topics===&lt;br /&gt;
&lt;br /&gt;
===Rubrics===&lt;br /&gt;
Rubrics are arranged into 3 rows of data named &amp;quot;Review&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot;. Each row is handled under separate descriptions in order to allow quick and comprehensive testing for the seperate functions.&lt;br /&gt;
Each row updates a subclass of the Questionnaire class. The Active Record hierarchy is:&lt;br /&gt;
* Questionnaire&lt;br /&gt;
** ReviewQuestionnaire&lt;br /&gt;
** AuthorFeedbackQuestionnaire&lt;br /&gt;
** TeammateReviewQuestionaire&lt;br /&gt;
&lt;br /&gt;
The Questionnaire class is connected to the Assignment class via the AssignmentQuestionnaire class. &lt;br /&gt;
&lt;br /&gt;
===Due dates===&lt;/div&gt;</summary>
		<author><name>Gsrajadh</name></author>
	</entry>
</feed>