speed up cucumber

This commit is contained in:
danielgrippi 2012-01-05 22:41:05 -08:00
parent 0891fc683b
commit 2e3b8f9d53
5 changed files with 11 additions and 18 deletions

View file

@ -2,11 +2,9 @@
Feature: Change email
Scenario: Change my email
Given I am signed in
And I click on my name in the header
And I follow "Settings"
Then I should be on my account settings page
When I fill in "user_email" with "new_email@newplac.es"
Given I am signed in
When I go to the users edit page
And I fill in "user_email" with "new_email@newplac.es"
And I press "Change email"
Then I should see "Email changed"
And I follow the "confirm_email" link from the last sent email

View file

@ -2,11 +2,9 @@
Feature: Change password
Scenario: Change my password
Given I am signed in
And I click on my name in the header
And I follow "Settings"
Then I should be on my account settings page
When I put in my password in "user_current_password"
Given I am signed in
When I go to the users edit page
And I put in my password in "user_current_password"
And I fill in "user_password" with "newsecret"
And I fill in "user_password_confirmation" with "newsecret"
And I press "Change password"

View file

@ -6,8 +6,7 @@ Feature: Close Account
Scenario: user closes account
Given I am signed in
When I click on my name in the header
And I follow "Settings"
When I go to the users edit page
And I follow "Close Account"
And I put in my password in "close_account_password" in the modal window
And I preemptively confirm the alert
@ -29,9 +28,9 @@ Feature: Close Account
And I fill in "status_message_fake_text" with "Hi, @{Bob Jones; bob_jones@example.org} long time no see"
And I press "Share"
And I log out
Then I sign in as "bob@bob.bob"
When I click on my name in the header
And I follow "Settings"
When I go to the users edit page
And I follow "Close Account"
And I put in my password in "close_account_password" in the modal window
And I preemptively confirm the alert

View file

@ -120,7 +120,7 @@ Then /^(?:|I )should not see a "([^\"]*)"(?: within "([^\"]*)")?$/ do |selector,
end
When /^I wait for the ajax to finish$/ do
wait_until(30) { evaluate_script("$.active") == 0 }
wait_until(15) { evaluate_script("$.active") == 0 }
end
When /^I have turned off jQuery effects$/ do

View file

@ -7,7 +7,6 @@ When /^I try to sign in$/ do
@me ||= Factory(:user_with_aspect, :getting_started => false)
page.driver.visit(new_integration_sessions_path(:user_id => @me.id))
step %(I press "Login")
step %(I am on the homepage)
# To save time as compared to:
#step %(I go to the new user session page)
#step %(I fill in "Username" with "#{@me.username}")
@ -38,6 +37,5 @@ When /^I put in my password in "([^"]*)"$/ do |field|
end
When /^I (?:log|sign) out$/ do
step 'I click on my name in the header'
step 'I follow "Log out"'
step %(I go to the destroy user session page)
end