Sha256: feef0612b330c9749763b6ef3415ed66c807d2203dd4c8c9d6ddc381f51d9c4f

Contents?: true

Size: 699 Bytes

Versions: 3

Compression:

Stored size: 699 Bytes

Contents

Given /^I am logged out$/ do
  if page.all(:css, "a", :text => "Logout").size > 0
    click_link "Logout"
  end
end

Given /^I am logged in$/ do
  step 'an admin user "admin@example.com" exists'

  if page.all(:css, "a", :text => "Logout").size > 0
    click_link "Logout"
  end

  visit new_admin_user_session_path
  fill_in "Email", :with => "admin@example.com"
  fill_in "Password", :with => "password"
  click_button "Login"
end

Given /^an admin user "([^"]*)" exists$/ do |admin_email|
  unless AdminUser.find_by_email(admin_email)
    AdminUser.create! :email => admin_email,
                      :password => "password",
                      :password_confirmation => "password"
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
activeadmin-0.4.1 features/step_definitions/user_steps.rb
activeadmin-0.4.0 features/step_definitions/user_steps.rb
andrewroth_activeadmin-0.3.4.4 features/step_definitions/user_steps.rb