Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scenario: Press Cancel
- Given I am logged in as eugene@example.com
- And I have Coaching Administrator role
- When I go to the create new engagement page
- Then I should be on the create new engagement page
- And I should see "Create an Engagement"
- When I click "Cancel"
- Then I should be on the engagements page
- Scenario: Create new engagement without data
- Given I am logged in as eugene@example.com
- And I have Coaching Administrator role
- When I go to the create new engagement page
- Then I should be on the create new engagement page
- And I should see "Create an Engagement"
- When I press "Save"
- Then I should see "Please correct the error(s) marked below"
- And I should see "You must enter a value."
- Scenario: Create new engagement with correct data
- Given I am logged in as eugene@example.com
- And I have Coaching Administrator role
- When I go to the create new engagement page
- Then I should be on the create new engagement page
- And the "engagement_engagement_manager_full_email" field should contain "John Quentine <eugene@example.com>"
- When I fill in "engagement_client_full_email" with "client@email.ru"
- And I fill in "engagement_client_manager_full_email" with "clientmanager@email.ru"
- And I fill in "start_date" with "11/01/2011"
- And I fill in "f_date2" with "4"
- And I fill in "Expected Completion for Selecting a Coach" with "2"
- And I fill in "engagement_min_coach_sessions" with "2"
- And I check "Allow client to select a coach from company coach catalog."
- And I uncheck "Coach to conduct stakeholder interviews."
- And I uncheck "Coach and client to set goals for engagement."
- And I uncheck "Coach to provide a final summary for engagement."
- And I press "Save"
- Then I should see "Engagement was successfully created"
- Scenario: Should see notice if client does not exist
- Given I am logged in as eugene@example.com
- And I have Coaching Administrator role
- When I go to the create new engagement page
- Then I should be on the create new engagement page
- And the "engagement_engagement_manager_full_email" field should contain "John Quentine <eugene@example.com>"
- When I fill in "engagement_client_full_email" with "client@email.ru"
- Then I should see "User is currently not registered."
- And I should see "An email invitation will be sent inviting user to register."
- Scenario: Should see notice if user was created already
- Given I am logged in as eugene@example.com
- And I have Coaching Administrator role
- When I go to the create new engagement page
- Then I should be on the create new engagement page
- When I fill in "engagement_engagement_manager_full_email" with "eugene@example.com"
- Then I should see "John Quentine"
- Scenario: Try to create new engagement with empty start date and end date
- Given I am logged in as eugene@example.com
- And I have Coaching Administrator role
- When I go to the create new engagement page
- Then I should be on the create new engagement page
- When I fill in "engagement_client_full_email" with "client@email.ru"
- And I fill in "engagement_client_manager_full_email" with "clientmanager@email.ru"
- And I fill in "start_date" with ""
- And I fill in "f_date2" with ""
- And I press "Save"
- Then I should see "You must enter a start date."
- Scenario: Try to create engagement with negative Coaching Sessions data
- Given I am logged in as eugene@example.com
- And I have Coaching Administrator role
- When I go to the create new engagement page
- Then I should be on the create new engagement page
- When I fill in "engagement_client_full_email" with "client@email.ru"
- And I fill in "engagement_client_manager_full_email" with "clientmanager@email.ru"
- And I fill in "f_date2" with "11/01/2011"
- And I fill in "f_date2" with "11/03/2011"
- And I fill in "engagement_min_coach_sessions" with "-1"
- And I press "Save"
- Then I should see "You must enter a value greater than 0."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement