2010-08-24 22:59:22 +00:00
|
|
|
Given /^a simple page named "([^"]*)" with the body:$/ do |page_slug, page_contents|
|
|
|
|
@page = create_content_page(page_slug, page_contents)
|
|
|
|
end
|
|
|
|
|
|
|
|
# modify an editable element
|
2010-08-26 11:06:44 +00:00
|
|
|
Given /^the editable element "([^"]*)" in the "([^"]*)" page with the content "([^"]*)"$/ do |slug, page_slug, content|
|
2010-08-24 22:59:22 +00:00
|
|
|
page = @site.pages.where(:slug => page_slug).first
|
|
|
|
page.find_editable_element(nil, slug).content = content
|
|
|
|
page.save!
|
2010-08-26 11:06:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# modify an editable element
|
|
|
|
Given /^the editable element "([^"]*)" for the "([^"]*)" block in the "([^"]*)" page with the content "([^"]*)"$/ do |slug, block, page_slug, content|
|
|
|
|
page = @site.pages.where(:slug => page_slug).first
|
|
|
|
page.find_editable_element(block, slug).content = content
|
|
|
|
page.save!
|
2010-08-24 22:59:22 +00:00
|
|
|
end
|