CSC/ECE 517 Fall 2015/oss E1556 CHM: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
=== Test1 ===
=== Test1 ===
=== Test2 ===
=== Test2 ===
=== Test2 ===
=== Test3 ===
The third test is similar to the second one. Team no.23781 and assignment no.711 are chosen for this test again.
First, student no.5404 login to the system, visit the assignment page, and make a topic suggestion. In the suggestion, instead of choosing “yes” in signup preference, the student chooses “no” in order not to use the suggested topic.
<pre>
visit 'content_pages/view'
fill_in "User Name", with: "student5404"
fill_in "Password", with: "password"
click_button "SIGN IN"
 
visit '/suggestion/new?id=711'
fill_in 'suggestion_title',  with: 'test title'
fill_in 'suggestion_description',  with: 'test description'
select 'No', from: "suggestion_signup_preference"
click_button "Submit"
 
click_link "Logout"
</pre>
After the suggestion is made, login as an instructor, find the assignment, and approve the suggestion.
<pre>
visit 'content_pages/view'
fill_in "User Name", with: 'instructor6'
fill_in "Password", with: 'password'
click_button "SIGN IN"
 
num = Suggestion.last.id
path = "/suggestion/" + num.to_s
visit path
click_button "Approve suggestion"
 
click_link "Logout"
</pre>
In the final step, we check if the new topic is shown in the topic list, then login as student no.5401 again, check if they still hold their old topic.
<pre>
visit 'content_pages/view'
fill_in "User Name", with: 'student5404'
fill_in "Password", with: 'password'
click_button "SIGN IN"
 
visit '/sign_up_sheet/list?assignment_id=711'
expect(page).to have_content('Your topic(s): Amazon S3 and Rails')
click_link "Logout"
 
visit 'content_pages/view'
fill_in "User Name", with: 'instructor6'
fill_in "Password", with: 'password'
click_button "SIGN IN"
 
visit "/assignments/711/edit#tabs-2"
expect(page).to have_content("Amazon S3 and Rails")
expect(page).to have_content("test title")
</pre>
=== Result ===
=== Result ===

Revision as of 16:50, 30 October 2015

E1556. Refactoring SuggestionController.rb

Project description

Expertiza

Optimization

Syntax

Refator

Test

Rspec

Test1

Test2

Test3

The third test is similar to the second one. Team no.23781 and assignment no.711 are chosen for this test again. First, student no.5404 login to the system, visit the assignment page, and make a topic suggestion. In the suggestion, instead of choosing “yes” in signup preference, the student chooses “no” in order not to use the suggested topic.

visit 'content_pages/view'
fill_in "User Name", with: "student5404"
fill_in "Password", with: "password"
click_button "SIGN IN"
  
visit '/suggestion/new?id=711'
fill_in 'suggestion_title',  with: 'test title'
fill_in 'suggestion_description',  with: 'test description'
select 'No', from: "suggestion_signup_preference"
click_button "Submit"
  
click_link "Logout"

After the suggestion is made, login as an instructor, find the assignment, and approve the suggestion.

visit 'content_pages/view'
fill_in "User Name", with: 'instructor6'
fill_in "Password", with: 'password'
click_button "SIGN IN"

num = Suggestion.last.id
path = "/suggestion/" + num.to_s
visit path
click_button "Approve suggestion"

click_link "Logout"

In the final step, we check if the new topic is shown in the topic list, then login as student no.5401 again, check if they still hold their old topic.

visit 'content_pages/view'
fill_in "User Name", with: 'student5404'
fill_in "Password", with: 'password'
click_button "SIGN IN"
  
visit '/sign_up_sheet/list?assignment_id=711'
expect(page).to have_content('Your topic(s): Amazon S3 and Rails')
click_link "Logout"

visit 'content_pages/view'
fill_in "User Name", with: 'instructor6'
fill_in "Password", with: 'password'
click_button "SIGN IN"

visit "/assignments/711/edit#tabs-2"
expect(page).to have_content("Amazon S3 and Rails")
expect(page).to have_content("test title")

Result