Logo: Relish

  1. Sign in

Project: Lombard

User abilities

In order to restrict access based upon user role
As an user depending upon my role
I should be able to only perform those actions assigned to me

Background Color Survey
Given
the following patients:
subject_id dob
Joe Jones 2/4/1967
And
the survey
  survey "Colors" do
    section "Colors" do
      question_1 "What is your favorite color?", :pick => :one, :custom_class => "column span-12"
      answer "red"
      answer "blue"
      answer "green"
      answer :other

      q_2b "Choose the colors you don't like", :pick => :any, :custom_class => "column span-12 last"
      a_1 "orange"
      a_2 "purple"
      a_3 "brown"
      a :omit
    end
  end
Scenarios
  • @javascript
  • @allow-rescue
Clinician and Physician abilities
Given
I am signed in as a clinician
And
I am on the newpatient page
And
I fill in "Subject ID" with "Joe"
And
I press "Find Patient"
And
I follow "Joe Jones"
When
I press "Colors"
Then
I should see "Colors"
When
I choose "red"
And
I choose "blue"
And
I check "orange"
And
I check "brown"
And
I press "Click here to finish"
Then
I should see "Completed survey"
And
I should see "View Results"
When
I sign out
And
I am signed in as a physician
And
I am on the newpatient page
And
I fill in "Subject ID" with "Joe"
And
I press "Find Patient"
And
I follow "Joe Jones"
Then
I should see "Colors"
When
I follow "Colors"
Then
I should see "Viewing: Colors for Joe Jones"

Last published over 5 years ago by wminsinger.