Sha256: 1cbbe188bfcc6ee3591fedd5ec6ff4b00c59b4f53aee37a06711653a2ae591d7

Contents?: true

Size: 878 Bytes

Versions: 8

Compression:

Stored size: 878 Bytes

Contents

Given(/^I am logged in as "([^\"]*)"$/) do |user|
  puts "The user, #{user}, does not exist" if users(user.to_sym).nil?
  visit '/admin/login'
  fill_in 'Username', :with => user
  fill_in 'Password', :with => 'password'
  click_button 'Login'
end

Given /^there are no pages$/ do
  Page.delete_all
  PagePart.delete_all
end

Given /^there is a homepage$/ do
  page = Page.new_with_defaults
  page.title = "Homepage"
  page.save
end

Then /^"([^\"]*)" should be selected for "([^\"]*)"$/ do |value, field|
  select_box = field_labeled(field)
  response.should have_tag("select##{select_box.id}") do
    with_tag('option[selected]', :text => value)
  end
end

When /^I save and open the page$/ do
  save_and_open_page
end

Then /^I should see an error message$/ do
  response.should have_tag('#error')
end

Then /^I should see the form$/ do
  response.should have_tag('form')
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
radiant-rails3-0.1 features/step_definitions/admin/admin_steps.rb
radiantcms-couchrest_model-0.1.4 features/step_definitions/admin/admin_steps.rb
radiantcms-couchrest_model-0.1.3 features/step_definitions/admin/admin_steps.rb
radiantcms-couchrest_model-0.1.2 features/step_definitions/admin/admin_steps.rb
radiantcms-couchrest_model-0.1.1 features/step_definitions/admin/admin_steps.rb
radiantcms-couchrest_model-0.1 features/step_definitions/admin/admin_steps.rb
radiant-0.9.1 features/step_definitions/admin/admin_steps.rb
radiant-0.9.0.rc2 features/step_definitions/admin/admin_steps.rb