cleanup 'getting started' cukes a bit
This commit is contained in:
parent
e2adaa07a2
commit
1f98e1c639
4 changed files with 18 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ Feature: new user registration
|
|||
And I fill in the new user form
|
||||
And I press "Continue"
|
||||
Then I should be on the getting started page
|
||||
And I should see "Well, hello there!" and "Who are you?" and "What are you into?"
|
||||
Then I should see the 'getting started' contents
|
||||
|
||||
Scenario: new user goes through the setup wizard
|
||||
When I fill in the following:
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ Feature: editing the gettig started in the mobile view
|
|||
And I fill in the new user form
|
||||
And I press "Continue"
|
||||
And I visit the mobile getting started page
|
||||
And I should see "Well, hello there!" and "Who are you?" and "What are you into?"
|
||||
And I should see "amparito"
|
||||
Then I should see the 'getting started' contents
|
||||
|
||||
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload"
|
||||
And I confirm the alert
|
||||
|
|
|
|||
|
|
@ -62,3 +62,7 @@ end
|
|||
Then(/^I should not be able to sign up$/) do
|
||||
confirm_not_signed_up
|
||||
end
|
||||
|
||||
Then (/^I should see the 'getting started' contents$/) do
|
||||
confirm_getting_started_contents
|
||||
end
|
||||
|
|
|
|||
|
|
@ -60,8 +60,9 @@ module UserCukeHelpers
|
|||
end
|
||||
|
||||
def fill_in_new_user_form
|
||||
fill_in('user_username', with: 'ohai')
|
||||
fill_in('user_email', with: 'ohai@example.com')
|
||||
@username = "ohai"
|
||||
fill_in('user_username', with: @username)
|
||||
fill_in('user_email', with: "#{@username}@example.com")
|
||||
fill_in('user_password', with: 'secret')
|
||||
fill_in('user_password_confirmation', with: 'secret')
|
||||
|
||||
|
|
@ -102,6 +103,15 @@ module UserCukeHelpers
|
|||
confirm_on_page('the new user registration page')
|
||||
confirm_form_validation_error('form#new_user')
|
||||
end
|
||||
|
||||
def confirm_getting_started_contents
|
||||
page.should have_content("Well, hello there!")
|
||||
page.should have_content("Who are you?")
|
||||
page.should have_content("What are you into?")
|
||||
|
||||
# the username that was just entered for registration
|
||||
page.should have_content(@username)
|
||||
end
|
||||
end
|
||||
|
||||
World(UserCukeHelpers)
|
||||
|
|
|
|||
Loading…
Reference in a new issue