accepts_invitation.feature 1.73 KB
Newer Older
1 2
@javascript
Feature: invitation acceptance
3
    Scenario: accept invitation from admin
4 5
      Given I have been invited by an admin
      And I am on my acceptance form page
6
      And I fill in the following:
7 8
        | user_username              | ohai           |
        | user_email                 | woot@sweet.com |
9
        | user_password         | secret         |
10
        | user_password_confirmation | secret         |
11
      And I press "Create my account"
12
      Then I should be on the getting started page
13
      And I should see "Well, hello there!"
14 15
      And I fill in the following:
        | profile_first_name | O             |
16

danielgrippi's avatar
danielgrippi committed
17 18
      And I preemptively confirm the alert
      And I follow "awesome_button"
19
      Then I should be on the multi page
20 21 22 23

    Scenario: accept invitation from user
      Given I have been invited by a user
      And I am on my acceptance form page
24
      And I fill in the following:
25 26
        | user_username              | ohai           |
        | user_email                 | woot@sweet.com |
27
        | user_password         | secret         |
28
        | user_password_confirmation | secret         |
29
      And I press "Create my account"
30
      Then I should be on the getting started page
31
      And I should see "Well, hello there!"
32
      And I fill in the following:
33
        | profile_first_name | O             |
34

danielgrippi's avatar
danielgrippi committed
35 36
      And I preemptively confirm the alert
      And I follow "awesome_button"
37
      Then I should be on the multi page
38

39 40 41 42 43 44 45
    Scenario: sends an invitation
      Given a user with email "bob@bob.bob"
      When I sign in as "bob@bob.bob"
      And I follow "By email"
      And I fill in "user_email" with "alex@example.com"
      And I press "Send an invitation"
      Then I should have 1 Devise email delivery