Added an incomplete test for the front end inline editor.
This commit is contained in:
parent
eb2d25e2f9
commit
d586d0eff4
26
features/engine/inline_front_end_editing.feature
Normal file
26
features/engine/inline_front_end_editing.feature
Normal file
@ -0,0 +1,26 @@
|
||||
@javascript
|
||||
Feature: Engine
|
||||
As an author
|
||||
In order to easily be able to modify the contents of my website
|
||||
I want to be able to edit the sites content on the front end
|
||||
|
||||
Background:
|
||||
Given I have the site: "test site" set up
|
||||
And I am an authenticated "author"
|
||||
|
||||
Scenario: Editing a short text field
|
||||
Given a page named "about" with the template:
|
||||
"""
|
||||
<html>
|
||||
<head>{% inline_editor %}</head>
|
||||
<body>{% editable_short_text 'a_sentence' %} owns this website{% endeditable_short_text %}</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"
|
||||
Then I should see "Mario owns this website"
|
||||
|
@ -26,7 +26,12 @@ end
|
||||
|
||||
# try to render a page by slug
|
||||
When /^I view the rendered page at "([^"]*)"$/ do |path|
|
||||
visit "http://#{@site.domains.first}#{path}"
|
||||
# If we're running selenium then we need to use a differnt port
|
||||
if Capybara.current_driver == :selenium
|
||||
visit "http://#{@site.domains.first}:#{Capybara.server_port}#{path}"
|
||||
else
|
||||
visit "http://#{@site.domains.first}#{path}"
|
||||
end
|
||||
end
|
||||
|
||||
# checks to see if a string is in the slug
|
||||
|
Loading…
Reference in New Issue
Block a user