Sha256: 3e42e1e3ef2baa3f670f5a3abcb10b413eb7817e336abb20313ef54d86ad127f

Contents?: true

Size: 881 Bytes

Versions: 2

Compression:

Stored size: 881 Bytes

Contents

When /^I fill in the "([^\"]*)" content with "([^\"]*)"$/ do |part, content|
  standard_part_name = "part_#{part.to_slug}_content"
  begin
    fill_in(part, :with => content)
  rescue Webrat::NotFoundError
    fill_in(standard_part_name, :with => content)
  end
end

When /^I fill in the "([^\"]*)" content with the text$/ do |part, content|
  standard_part_name = "part_#{part.to_slug}_content"
  begin
    fill_in(part, :with => content)
  rescue Webrat::NotFoundError
    fill_in(standard_part_name, :with => content)
  end
end

Then /^there should be an? "([^\"]*)" part$/ do |name|
  response.should have_tag("#page_#{name.to_slug}")
  response.should have_tag("#part-#{name.to_slug}")
  response.should have_tag("textarea#part_#{name.to_slug}_content")
end

When /^I edit the "([^\"]*)" page$/ do |name|
  page = pages(name.to_sym)
  visit "/admin/pages/#{page.id}/edit"
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
radiant-1.0.0.rc3 features/step_definitions/admin/pages_management_steps.rb
kajam-1.0.3.rc2 features/step_definitions/admin/pages_management_steps.rb