To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorProcedure form creation
As a clinician
I want to enter procedure information on behalf of a patient
So that the patient can be tracked
- Scenarios
-
- Basic questions
- Default answers
- Quiz time
- Custom css class
- A pick one question with an option for other
- Repeater with a dropdown
- A pick one question with an option for other
- Checkboxes with text area
- Basic questions
-
- Given
-
the following patients:
subject_id dob 12345 2/4/1967 - And
-
the survey
survey "Angioplasty" do section "Colors" do label "You with the sad eyes don't be discouraged" question_1 "What is your favorite color?", :pick => :one answer "red" answer "blue" answer "green" answer :other q_2b "Choose the colors you don't like", :pick => :any a_1 "orange" a_2 "purple" a_3 "brown" a :omit end end
- And
- I am signed in as a clinician
- And
- I am on the newpatient page
- And
- I fill in "Subject ID" with "123"
- And
- I press "Find Patient"
- And
- I follow "12345"
- When
- I press "Angioplasty"
- Then
- I should see "You with the sad eyes don't be discouraged"
- And
- I choose "red"
- And
- I choose "blue"
- And
- I check "orange"
- And
- I check "brown"
- And
- I press "Click here to finish"
- Then
-
there should be 1 response set with 3 responses with:
answer blue orange brown
- Default answers
-
- Given
-
the survey
survey "Foodie" do section "Foods" do question_1 "What is your favorite food?" answer "food", :string, :default_value => "beef" end section "Section 2" do end section "Section 3" do end end
- When
- I start the "Foodie" survey
- And
- I press "Section 3"
- And
- I press "Click here to finish"
- Then
-
there should be 1 response set with 1 responses with:
string_value beef - Then
- the survey should now be complete
- When
- I start the "Foodie" survey
- And
- I fill in "food" with "chicken"
- And
- I press "Foods"
- And
- I press "Section 3"
- And
- I press "Click here to finish"
- Then
-
there should be 2 response set with 2 responses with:
string_value chicken
- Quiz time
-
- Given
-
the survey
survey "Meat" do section "Best" do question_1 "What is the best meat?", :pick => :one, :correct => "oink" a_oink "bacon" a_tweet "chicken" a_moo "beef" end end
- Then
- question "1" should have correct answer "oink"
- Custom css class
-
- Given
-
the survey
survey "Television" do section "First" do q "What is your favorite show?" a :string, :custom_class => "my_custom_class" q "What is your favorite state?" a :string end end
- When
- I start the "Television" survey
- Then
- the element "input[type='text']:first" should have the class "my_custom_class"
- A pick one question with an option for other
-
- Given
-
the survey
survey "Foodalicious" do section "Foods" do q "What is the best meat?", :pick => :one a "bacon" a "chicken" a "beef" a "other", :string end end
- When
- I start the "Foodalicious" survey
- Then
- I choose "bacon"
- And
- I press "Click here to finish"
- Then
-
there should be 1 response set with 1 response with:
bacon
- Repeater with a dropdown
-
- Given
-
the survey
survey "Movies" do section "Preferences" do repeater "What are you favorite genres?" do q "Make", :pick => :one, :display_type => :dropdown a "Action" a "Comedy" a "Mystery" end end end
- When
- I start the "Movies" survey
- Then
- a dropdown should exist with the options "Action, Comedy, Mystery"
- A pick one question with an option for other
-
- Given
-
the survey
survey "Foodies" do section "Foods" do q "What is the best meat?", :pick => :one a "bacon" a "chicken" a "beef" a "other", :string end end
- When
- I start the "Foodies" survey
- Then
- I choose "other"
- And
- I fill in "other" with "shrimp"
- And
- I press "Click here to finish"
- Then
-
there should be 1 response set with 1 response with:
shrimp
- Checkboxes with text area
-
- Given
-
the survey
survey "Websites" do section "Search engines" do q "Have you ever used the following services?", :pick => :any a "Yellowpages.com|Describe your experience", :text a "Google.com|Describe your experience", :text a "Bing.com|Describe your experience", :text end end
- When
- I start the "Websites" survey
- Then
- there should be 3 checkboxes
- And
- there should be 3 text areas
Last published almost 7 years ago by wminsinger.