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>
|
<html>
|
||||||
<head>{% inline_editor %}</head>
|
<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>
|
</html>
|
||||||
"""
|
"""
|
||||||
When I view the rendered page at "/about"
|
When I view the rendered page at "/about"
|
||||||
Then I should see "edit"
|
Then I should see "edit"
|
||||||
When I follow "edit"
|
When I follow "edit"
|
||||||
And I type the content "Mario" into the first editable short field
|
And I type the content "Mario" into the first editable field
|
||||||
And I press "save"
|
And I follow "save"
|
||||||
When I view the rendered page at "/about"
|
And I view the rendered page at "/about"
|
||||||
Then I should see "Mario owns this website"
|
Then I should see "Mario owns this website"
|
||||||
|
|
||||||
|
@ -11,3 +11,14 @@ Given /^the editable element "([^"]*)" for the "([^"]*)" block in the "([^"]*)"
|
|||||||
page.find_editable_element(block, slug).content = content
|
page.find_editable_element(block, slug).content = content
|
||||||
page.save!
|
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