Completed the cucumbet feature for the front end inline editor.
This commit is contained in:
parent
d586d0eff4
commit
3113fbc9f0
@ -13,14 +13,13 @@ Feature: Engine
|
||||
"""
|
||||
<html>
|
||||
<head>{% inline_editor %}</head>
|
||||
<body>{% editable_short_text 'a_sentence' %} owns this website{% endeditable_short_text %}</body>
|
||||
<body>{% editable_short_text 'owner' %}Tom{% endeditable_short_text %} owns this website</body>
|
||||
</html>
|
||||
"""
|
||||
When I view the rendered page at "/about"
|
||||
Then I should see "edit"
|
||||
When I follow "edit"
|
||||
And I type the content "Mario" into the first editable short field
|
||||
And I press "save"
|
||||
When I view the rendered page at "/about"
|
||||
And I type the content "Mario" into the first editable field
|
||||
And I follow "save"
|
||||
And I view the rendered page at "/about"
|
||||
Then I should see "Mario owns this website"
|
||||
|
||||
|
@ -10,4 +10,15 @@ Given /^the editable element "([^"]*)" for the "([^"]*)" block in the "([^"]*)"
|
||||
page = @site.pages.where(:slug => page_slug).first
|
||||
page.find_editable_element(block, slug).content = content
|
||||
page.save!
|
||||
end
|
||||
end
|
||||
|
||||
When /^I type the content "([^"]*)" into the first editable field$/ do |content|
|
||||
page.execute_script %{
|
||||
$(document).ready(function() {
|
||||
editable = GENTICS.Aloha.editables[0];
|
||||
editable.obj.text('#{content}');
|
||||
editable.blur();
|
||||
});
|
||||
}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user