Skip to content
Snippets Groups Projects
Commit 5d5fa084 authored by Dennis Collinson's avatar Dennis Collinson
Browse files

next cuke, fix old

parent 09704291
No related branches found
No related tags found
No related merge requests found
......@@ -39,3 +39,7 @@ When /^I should see "([^"]*)" aspect unselected$/ do |aspect_name|
page.has_css?("li[data-aspect_id='#{aspect.id}']:not(.active)").should be_true
end
end
When /^"([^"]*)" should render with the "([^"]*)" template$/ do |post_text, template_name|
within find_post_by_text(post_text) { assert_template(template_name) }
end
\ No newline at end of file
......@@ -25,18 +25,26 @@ def finalize_frame
click_button "done"
end
def post_div
find(".post")
end
def within_frame_preview
within ".post-view .post" do
within post_div do
yield
end
end
def assert_template(template_name)
post_div["data-template"].should == template_name
end
When /^I trumpet$/ do
visit new_post_path
end
When /^I write "([^"]*)"$/ do |text|
fill_in :text, :with => text
fill_in 'text', :with => text
end
Then /I mention "([^"]*)"$/ do |text|
......@@ -90,7 +98,14 @@ Then /^"([^"]*)" should have (\d+) pictures$/ do |post_text, number_of_pictures|
find_post_by_text(post_text).all(".photo_attachments img").size.should == number_of_pictures.to_i
end
Then /^I should see "([^"]*)" in the framer preview$/ do |post_text|
within_frame_preview { page.should have_content(post_text) }
end
When /^I select the template "([^"]*)"$/ do |template_name|
select template_name, :from => 'template'
end
Then /^I should see an "([^"]*)" framer preview$/ do |template_name|
assert_template(template_name)
end
\ No newline at end of file
......@@ -44,7 +44,10 @@ Feature: Creating a new post
And I upload a fixture picture with filename "button.gif"
And I start the framing process
Then I should see "This is hella customized" in the framer preview
When I select the template "awesome"
Then I should see an "awesome" framer preview
When I finalize my frame
And I go to "/stream"
Then "This is hella customized" should be post 1
And "This is hella customized" should render with the "awesome" template
<button class="done btn-primary">done</button>
<div class="controls">
<div class='template-picker'></div>
<button class="done btn-primary">done</button>
</div>
<div class="post-view"></div>
\ No newline at end of file
......@@ -8,7 +8,10 @@
<legend>
New Post
</legend>
<textarea class="text span8"/>
<label>
text
<textarea class="text span8"/>
</label>
<textarea id="text_with_markup" style="display:none;"/>
<div class="aspect_selector"></div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment