Skip to content

Instantly share code, notes, and snippets.

@GirlBossRush
Created March 21, 2012 17:51
Show Gist options
  • Select an option

  • Save GirlBossRush/2150198 to your computer and use it in GitHub Desktop.

Select an option

Save GirlBossRush/2150198 to your computer and use it in GitHub Desktop.
➜ Abriiz-Rails git:(22033381_show_care_giver_access) cuke features/additional_caregiver
Using the default profile...
Loaded
DEPRECATION WARNING: Yajl's JSON gem compatibility API is going to be removed in 2.0
@javascript
Feature: Accepting email invitations for additional caregiver access
Background: # features/additional_caregiver/accept_invitation.feature:3
Given there exists a user "diane" # features/step_definitions/account_steps.rb:39
Given no emails have been sent # features/step_definitions/email_steps.rb:43
Scenario: Hank does not have an account and accepts an invitation # features/additional_caregiver/accept_invitation.feature:7
Given "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hank@example.com |
| Access Level | View only |
| Personal Message | Here you go |
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/invitation_steps.rb:24:in `/^"([^"]*)" has sent the following invitation for "([^"]*)":$/'
features/additional_caregiver/accept_invitation.feature:8:in `Given "diane" has sent the following invitation for "Miguel":'
And I log out # features/step_definitions/login_steps.rb:40
Then "hank@example.com" opens the email # features/step_definitions/email_steps.rb:72
And I should see "Invitation" in the email subject # features/step_definitions/email_steps.rb:88
And I should see "Here you go" in the email body # features/step_definitions/email_steps.rb:96
Given I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
Then I should see "You have been granted sharing access to Miguel's information. Login or create a new account to proceed." # features/step_definitions/web_steps.rb:105
And I should not see "Get connected with abriiz in 5 easy steps" # features/step_definitions/web_steps.rb:129
And I should not see "Group Code" # features/step_definitions/web_steps.rb:129
When I complete the caregiver signup form with: # features/step_definitions/account_steps.rb:21
| *Username | hank |
| *Email Address | hank@example.com |
And I press "Create account" # features/step_definitions/web_steps.rb:52
Then I should see "The default terms and conditions for a code." # features/step_definitions/web_steps.rb:105
When I press "Accept" # features/step_definitions/web_steps.rb:52
Then I should be on the calendar page for "Miguel" # features/step_definitions/web_steps.rb:193
And I should see "Hello, hank" # features/step_definitions/web_steps.rb:105
And I should see "Miguel" in the 1st patient tab and is active # features/step_definitions/calendar_steps.rb:1
And I should see "View only" # features/step_definitions/web_steps.rb:105
And I should see the "Trends" tab for "Miguel" # features/step_definitions/patients_tabs_steps.rb:7
And I should see the "Medications" tab for "Miguel" # features/step_definitions/patients_tabs_steps.rb:7
And I should see the "Settings" tab for "Miguel" # features/step_definitions/patients_tabs_steps.rb:7
And "hank@example.com" should receive an email with subject "Thank you for signing up to use abriiz" # features/step_definitions/email_steps.rb:59
And "hank" should be subscribed with the group code "PACMAN1" # features/step_definitions/account_steps.rb:70
Then I log out # features/step_definitions/login_steps.rb:40
And I am logged in as "diane" # features/step_definitions/login_steps.rb:1
And I should see "Miguel" in the 1st patient tab and is active # features/step_definitions/calendar_steps.rb:1
Scenario: Hank tries to create an account from an invitation without having logged out alerady # features/additional_caregiver/accept_invitation.feature:47
Given I am on the homepage # features/step_definitions/web_steps.rb:44
Given "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hank@example.com |
| Access Level | View only |
| Personal Message | Here you go |
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/invitation_steps.rb:24:in `/^"([^"]*)" has sent the following invitation for "([^"]*)":$/'
features/additional_caregiver/accept_invitation.feature:49:in `Given "diane" has sent the following invitation for "Miguel":'
When "hank@example.com" opens the email # features/step_definitions/email_steps.rb:72
Then I should see "Invitation" in the email subject # features/step_definitions/email_steps.rb:88
And I should see "Here you go" in the email body # features/step_definitions/email_steps.rb:96
When I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
And I should see "You have been granted sharing access to Miguel's information. Login or create a new account to proceed." # features/step_definitions/web_steps.rb:105
And I should not see "Group Code" # features/step_definitions/web_steps.rb:129
When I complete the caregiver signup form with: # features/step_definitions/account_steps.rb:21
| *Username | hank |
| *Email Address | hank@example.com |
And I press "Create account" # features/step_definitions/web_steps.rb:52
Then I should see "The default terms and conditions for a code." # features/step_definitions/web_steps.rb:105
When I press "Accept" # features/step_definitions/web_steps.rb:52
Then I should be on the calendar page for "Miguel" # features/step_definitions/web_steps.rb:193
And I should not see "diane" # features/step_definitions/web_steps.rb:129
And I should see "Hello, hank" # features/step_definitions/web_steps.rb:105
And I should see "Miguel" in the 1st patient tab and is active # features/step_definitions/calendar_steps.rb:1
And "hank@example.com" should receive an email with subject "Thank you for signing up to use abriiz" # features/step_definitions/email_steps.rb:59
And "hank" should be subscribed with the group code "PACMAN1" # features/step_definitions/account_steps.rb:70
Scenario: An invitee accepts an invitation to share access with a patient, and alerady has an account # features/additional_caregiver/accept_invitation.feature:79
Given there exists a user "hank" with patient "Robert" # features/step_definitions/account_steps.rb:43
And no emails have been sent # features/step_definitions/email_steps.rb:43
And "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hank@example.com |
| Access Level | View only |
| Personal Message | Here you go |
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/invitation_steps.rb:24:in `/^"([^"]*)" has sent the following invitation for "([^"]*)":$/'
features/additional_caregiver/accept_invitation.feature:83:in `And "diane" has sent the following invitation for "Miguel":'
When "hank@example.com" opens the email # features/step_definitions/email_steps.rb:72
Then I should see "Invitation" in the email subject # features/step_definitions/email_steps.rb:88
And I should see "Here you go" in the email body # features/step_definitions/email_steps.rb:96
When I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
And I should see "You have been granted sharing access to Miguel's information. Login or create a new account to proceed." # features/step_definitions/web_steps.rb:105
And I should not see "Group Code" # features/step_definitions/web_steps.rb:129
When I log in with: # features/step_definitions/login_steps.rb:11
| Username | hank |
| Password | password |
Then I should be on the calendar page for "Miguel" # features/step_definitions/web_steps.rb:193
And I should not see "diane" # features/step_definitions/web_steps.rb:129
And I should see "Hello, hank" # features/step_definitions/web_steps.rb:105
Then I should see "Miguel" in the 2nd patient tab # features/step_definitions/calendar_steps.rb:1
And "hank" should be subscribed with the group code "PACMAN1" # features/step_definitions/account_steps.rb:70
Scenario: An invitee accepts an invitation twice # features/additional_caregiver/accept_invitation.feature:107
Given there exists a user "hank" with patient "Robert" # features/step_definitions/account_steps.rb:43
And no emails have been sent # features/step_definitions/email_steps.rb:43
And "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hank@example.com |
| Access Level | View only |
| Personal Message | Here you go |
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/invitation_steps.rb:24:in `/^"([^"]*)" has sent the following invitation for "([^"]*)":$/'
features/additional_caregiver/accept_invitation.feature:111:in `And "diane" has sent the following invitation for "Miguel":'
When "hank@example.com" opens the email # features/step_definitions/email_steps.rb:72
And I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
Then I should see "You have been granted sharing access to Miguel's information. Login or create a new account to proceed." # features/step_definitions/web_steps.rb:105
When I log in with: # features/step_definitions/login_steps.rb:11
| Username | hank |
| Password | password |
Then I should be on the calendar page for "Miguel" # features/step_definitions/web_steps.rb:193
And I should not see "diane" # features/step_definitions/web_steps.rb:129
And I should see "Hello, hank" # features/step_definitions/web_steps.rb:105
Then I should see "Miguel" in the 2nd patient tab # features/step_definitions/calendar_steps.rb:1
And "hank" should be subscribed with the group code "PACMAN1" # features/step_definitions/account_steps.rb:70
When I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
Then I should see "The invitation you're trying to use has already been accepted." # features/step_definitions/web_steps.rb:105
Scenario: An invitee accepts an invitation for a patient they've already accepted an invitation for # features/additional_caregiver/accept_invitation.feature:134
Given there exists a user "hank" with patient "Robert" # features/step_definitions/account_steps.rb:43
And no emails have been sent # features/step_definitions/email_steps.rb:43
And "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hank@example.com |
| Access Level | View only |
| Personal Message | Here you go |
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/invitation_steps.rb:24:in `/^"([^"]*)" has sent the following invitation for "([^"]*)":$/'
features/additional_caregiver/accept_invitation.feature:138:in `And "diane" has sent the following invitation for "Miguel":'
And "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hanksotheraddress@example.com |
| Access Level | View only |
| Personal Message | Here you go |
When "hank@example.com" opens the email # features/step_definitions/email_steps.rb:72
And I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
When I log in with: # features/step_definitions/login_steps.rb:11
| Username | hank |
| Password | password |
When "hanksotheraddress@example.com" opens the email # features/step_definitions/email_steps.rb:72
And I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
When I log in with: # features/step_definitions/login_steps.rb:11
| Username | hank |
| Password | password |
Then I should see "Miguel's information is already shared with this account and cannot be added again." # features/step_definitions/web_steps.rb:105
When I log out # features/step_definitions/login_steps.rb:40
When I log in with: # features/step_definitions/login_steps.rb:11
| Username | diane |
| Password | password |
And I follow "Settings" # features/step_definitions/web_steps.rb:56
Then I should see the following invitations: # features/step_definitions/invitation_steps.rb:13
| Recipient | Access Level | Status |
| hank@example.com | View only | ACCEPTED |
| hanksotheraddress@example.com | View only | DUPLICATE |
@javascript
Feature: A user who has been given caregiver access will have varying access to patients depending on their access level
Background: # features/additional_caregiver/access_levels.feature:3
Given there exists a user "diane" with patient "Miguel" # features/step_definitions/account_steps.rb:43
And there exists a user "hank" with patient "Bob" # features/step_definitions/account_steps.rb:43
And no emails have been sent # features/step_definitions/email_steps.rb:43
Scenario: Hank has view access for Miguel # features/additional_caregiver/access_levels.feature:8
When "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hank@example.com |
| Access Level | View only |
| Personal Message | Here you go |
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/invitation_steps.rb:24:in `/^"([^"]*)" has sent the following invitation for "([^"]*)":$/'
features/additional_caregiver/access_levels.feature:9:in `When "diane" has sent the following invitation for "Miguel":'
And "hank@example.com" opens the email # features/step_definitions/email_steps.rb:72
And I should see "Invitation" in the email subject # features/step_definitions/email_steps.rb:88
Then I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
When I am logged in as "hank" # features/step_definitions/login_steps.rb:1
And I should be on the calendar page for "Miguel" # features/step_definitions/web_steps.rb:193
Then I should have view only access for "Miguel" # features/step_definitions/additional_caregiver_steps.rb:1
And I log out # features/step_definitions/login_steps.rb:40
Given I am logged in as "diane" # features/step_definitions/login_steps.rb:1
When I add the following medication: # features/step_definitions/medication_steps.rb:1
| Name | Nuprin |
| Dose 1: | Morning: 5am-10am |
And I add the following doses to the medication "Nuprin": # features/step_definitions/medication_steps.rb:45
| Dose Number | Window | Alarm | Weekday Hour | Weekday Minute | Weekend Hour | Weekend Minute |
| Dose 2: | Midday | On | 12pm | 45 | 11am | 30 |
And I log out # features/step_definitions/login_steps.rb:40
And I am logged in as "hank" # features/step_definitions/login_steps.rb:1
And I follow "Medications" # features/step_definitions/web_steps.rb:56
Then I should see "Dose 1: Morning: 5am-10am" # features/step_definitions/web_steps.rb:105
Then I should see "Alarm: Off" # features/step_definitions/web_steps.rb:105
Then I should not see "Weekdays: 5:00 AM" # features/step_definitions/web_steps.rb:129
Then I should not see "Weekends: 5:00 AM" # features/step_definitions/web_steps.rb:129
Then I should see "Dose 2: Midday: 10am-2pm" # features/step_definitions/web_steps.rb:105
Then I should see "Alarm: On" # features/step_definitions/web_steps.rb:105
Then I should see "Weekdays: 12:45 PM" # features/step_definitions/web_steps.rb:105
Then I should see "Weekends: 11:30 AM" # features/step_definitions/web_steps.rb:105
Scenario: Hank has view and edit access for Miguel # features/additional_caregiver/access_levels.feature:48
When "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hank@example.com |
| Access Level | View and edit |
| Personal Message | Here you go |
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/invitation_steps.rb:24:in `/^"([^"]*)" has sent the following invitation for "([^"]*)":$/'
features/additional_caregiver/access_levels.feature:49:in `When "diane" has sent the following invitation for "Miguel":'
Then "hank@example.com" opens the email # features/step_definitions/email_steps.rb:72
And I should see "Invitation" in the email subject # features/step_definitions/email_steps.rb:88
Then I follow "Accept Invitation" in the email # features/step_definitions/email_steps.rb:166
When I am logged in as "hank" # features/step_definitions/login_steps.rb:1
And I should be on the calendar page for "Miguel" # features/step_definitions/web_steps.rb:193
Then I should have view and edit access for "Miguel" # features/step_definitions/additional_caregiver_steps.rb:30
@javascript
Feature: Diane can see the status of an invitation
Background: # features/additional_caregiver/invitation_status.feature:3
Given there exists a user "diane" # features/step_definitions/account_steps.rb:39
Given no emails have been sent # features/step_definitions/email_steps.rb:43
Scenario: Hank accepts an invitation from Diane # features/additional_caregiver/invitation_status.feature:7
Given I am on the homepage # features/step_definitions/web_steps.rb:44
Given "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | hank@example.com |
| Access Level | View only |
| Personal Message | Here you go |
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/invitation_steps.rb:24:in `/^"([^"]*)" has sent the following invitation for "([^"]*)":$/'
features/additional_caregiver/invitation_status.feature:10:in `Given "diane" has sent the following invitation for "Miguel":'
Given "diane" has sent the following invitation for "Miguel": # features/step_definitions/invitation_steps.rb:18
| Recipient | russel@example.com |
| Access Level | View and edit |
| Personal Message | Here you go |
When I follow "Settings" # features/step_definitions/web_steps.rb:56
Then I should see the following invitations: # features/step_definitions/invitation_steps.rb:13
| Recipient | Access Level | Status |
| hank@example.com | View only | PENDING |
| russel@example.com | View and edit | PENDING |
And I log out # features/step_definitions/login_steps.rb:40
When "hank@example.com" accepts the invitation # features/step_definitions/invitation_steps.rb:32
And I am logged in as "diane" # features/step_definitions/login_steps.rb:1
And I follow "Settings" # features/step_definitions/web_steps.rb:56
Then I should see the following invitations: # features/step_definitions/invitation_steps.rb:13
| Recipient | Access Level | Status |
| hank@example.com | View only | ACCEPTED |
| russel@example.com | View and edit | PENDING |
@javascript
Feature: Inviting another user as an additional caregiver
Background: # features/additional_caregiver/send_invitation.feature:5
Given no emails have been sent # features/step_definitions/email_steps.rb:43
Given there exists a user "diane" # features/step_definitions/account_steps.rb:39
And I am logged in as "diane" # features/step_definitions/login_steps.rb:1
Scenario: Diane sends an invitation to Hank # features/additional_caregiver/send_invitation.feature:10
When I go to the settings page for "Miguel" # features/step_definitions/web_steps.rb:48
And I follow "Give another person access to Miguel's information" # features/step_definitions/web_steps.rb:56
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/web_steps.rb:57:in `/^(?:|I )follow "([^"]*)"$/'
features/additional_caregiver/send_invitation.feature:12:in `And I follow "Give another person access to Miguel's information"'
Then I should be on the share information page for "Miguel" # features/step_definitions/web_steps.rb:193
When I fill in "Email address of person to share access with:" with "hank@example.com" # features/step_definitions/web_steps.rb:60
And I choose "View only" # features/step_definitions/web_steps.rb:97
Then I fill in "Personal message to include in the invitation:" with "You can check up on Miguel's asthma now." # features/step_definitions/web_steps.rb:60
And I follow "Save" # features/step_definitions/web_steps.rb:56
Then I should be on the settings page for "Miguel" # features/step_definitions/web_steps.rb:193
And I should see "Successfully sent sharing invitation to hank@example.com" # features/step_definitions/web_steps.rb:105
And I should see the sharing setting: # features/step_definitions/invitation_steps.rb:1
| Recipient | Access Level | Status |
| hank@example.com | View only | PENDING |
And "hank@example.com" should receive an email # features/step_definitions/email_steps.rb:51
When I open the email # features/step_definitions/email_steps.rb:72
And I should see "abriiz is a platform for managing pediatric asthma through medication reminders, tracking, education and incentives." in the email body # features/step_definitions/email_steps.rb:96
And I should see "Invitation to access abriiz asthma record for Miguel" in the email body # features/step_definitions/email_steps.rb:96
And I should see "You can check up on Miguel's asthma now." in the email body # features/step_definitions/email_steps.rb:96
And I should see "Accept Invitation" in the email body # features/step_definitions/email_steps.rb:96
Scenario: Diane tries to send an invitation without specifying an email address # features/additional_caregiver/send_invitation.feature:31
When I go to the settings page for "Miguel" # features/step_definitions/web_steps.rb:48
And I follow "Give another person access to Miguel's information" # features/step_definitions/web_steps.rb:56
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/web_steps.rb:57:in `/^(?:|I )follow "([^"]*)"$/'
features/additional_caregiver/send_invitation.feature:33:in `And I follow "Give another person access to Miguel's information"'
Then I should be on the share information page for "Miguel" # features/step_definitions/web_steps.rb:193
And I choose "View only" # features/step_definitions/web_steps.rb:97
And I follow "Save" # features/step_definitions/web_steps.rb:56
Then I should see "Email address of person to share access with can't be blank" # features/step_definitions/web_steps.rb:105
Scenario: Diane tries to send an invitation and specifies an invalid email address # features/additional_caregiver/send_invitation.feature:39
When I go to the settings page for "Miguel" # features/step_definitions/web_steps.rb:48
And I follow "Give another person access to Miguel's information" # features/step_definitions/web_steps.rb:56
no link with title, id or text 'Give another person access to Miguel's information' found (Capybara::ElementNotFound)
(eval):2:in `click_link'
./features/step_definitions/web_steps.rb:57:in `/^(?:|I )follow "([^"]*)"$/'
features/additional_caregiver/send_invitation.feature:41:in `And I follow "Give another person access to Miguel's information"'
When I fill in "Email address of person to share access with:" with "hank.com" # features/step_definitions/web_steps.rb:60
Then I should be on the share information page for "Miguel" # features/step_definitions/web_steps.rb:193
And I choose "View only" # features/step_definitions/web_steps.rb:97
And I follow "Save" # features/step_definitions/web_steps.rb:56
Then I should see "Email address of person to share access with must be a valid email address" # features/step_definitions/web_steps.rb:105
Failing Scenarios:
cucumber features/additional_caregiver/accept_invitation.feature:7 # Scenario: Hank does not have an account and accepts an invitation
cucumber features/additional_caregiver/accept_invitation.feature:47 # Scenario: Hank tries to create an account from an invitation without having logged out alerady
cucumber features/additional_caregiver/accept_invitation.feature:79 # Scenario: An invitee accepts an invitation to share access with a patient, and alerady has an account
cucumber features/additional_caregiver/accept_invitation.feature:107 # Scenario: An invitee accepts an invitation twice
cucumber features/additional_caregiver/accept_invitation.feature:134 # Scenario: An invitee accepts an invitation for a patient they've already accepted an invitation for
cucumber features/additional_caregiver/access_levels.feature:8 # Scenario: Hank has view access for Miguel
cucumber features/additional_caregiver/access_levels.feature:48 # Scenario: Hank has view and edit access for Miguel
cucumber features/additional_caregiver/invitation_status.feature:7 # Scenario: Hank accepts an invitation from Diane
cucumber features/additional_caregiver/send_invitation.feature:10 # Scenario: Diane sends an invitation to Hank
cucumber features/additional_caregiver/send_invitation.feature:31 # Scenario: Diane tries to send an invitation without specifying an email address
cucumber features/additional_caregiver/send_invitation.feature:39 # Scenario: Diane tries to send an invitation and specifies an invalid email address
11 scenarios (11 failed)
182 steps (11 failed, 133 skipped, 38 passed)
1m28.528s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment