Skip to content
Extraits de code Groupes Projets
session_steps.rb 1,85 ko
Newer Older
  • Learn to ignore specific revisions
  • Given /^I am signed in( on the mobile website)?$/ do |mobile|
    
      automatic_login
    
      confirm_login mobile
    
      manual_login
    
    Florian Staudacher's avatar
    Florian Staudacher a validé
    end
    
    
    When /^I (?:sign|log) in manually as "([^"]*)" with password "([^"]*)"( on the mobile website)?$/ \
    do |username, password, mobile|
    
      @me = User.find_by_username(username)
      @me.password ||= password
      manual_login
    
      confirm_login mobile
    
    When /^I (?:sign|log) in as "([^"]*)"( on the mobile website)?$/ do |email, mobile|
    
      @me = User.find_by_email(email)
      @me.password ||= 'password'
    
      automatic_login
    
      confirm_login mobile
    
    When /^I (?:sign|log) in with password "([^"]*)"( on the mobile website)?$/ do |password, mobile|
    
      @me.password = password
    
      automatic_login
    
      confirm_login mobile
    
    maxwell's avatar
    maxwell a validé
    When /^I put in my password in "([^"]*)"$/ do |field|
    
     step %(I fill in "#{field}" with "#{@me.password}")
    
    maxwell's avatar
    maxwell a validé
    end
    
    
    When /^I fill out change password section with my password and "([^"]*)" and "([^"]*)"$/ do |new_pass, confirm_pass|
      fill_change_password_section(@me.password, new_pass, confirm_pass)
    end
    
    When /^I fill out forgot password form with "([^"]*)"$/ do |email|
      fill_forgot_password_form(email)
    end
    
    When /^I submit forgot password form$/ do
      submit_forgot_password_form
    end
    
    
    When /^I fill out the password reset form with "([^"]*)" and "([^"]*)"$/ do |new_pass,confirm_pass|
      fill_password_reset_form(new_pass, confirm_pass)
    
    When /^I submit the password reset form$/ do
      submit_password_reset_form
    
      logout
    
      step "I go to the root page"
    
    
    When /^I (?:log|sign) out manually$/ do
      manual_logout
    
    Fabian Rodriguez's avatar
    Fabian Rodriguez a validé
    end
    
    When /^I (?:log|sign) out manually on the mobile website$/ do
      manual_logout_mobile
    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