aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features/refinery/blog
diff options
context:
space:
mode:
authorAnita Graham <anita@joli.com.au>2015-05-19 12:25:33 +0800
committerAnita Graham <anita@joli.com.au>2015-05-19 12:25:33 +0800
commit99cdd519b209e05a6ed9ab81f23d22bd11b2490f (patch)
tree329749eba4dceff0f0fa6b698b2699ed1029a43f /spec/features/refinery/blog
parent481179d7834e9cde7f374c392f95251cdb1bc527 (diff)
downloadrefinerycms-blog-99cdd519b209e05a6ed9ab81f23d22bd11b2490f.tar.gz
refinerycms-blog-99cdd519b209e05a6ed9ab81f23d22bd11b2490f.tar.bz2
refinerycms-blog-99cdd519b209e05a6ed9ab81f23d22bd11b2490f.zip
Use find(id).trigger(:click) to find elements with before:: css
Diffstat (limited to 'spec/features/refinery/blog')
-rw-r--r--spec/features/refinery/blog/admin/posts_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/features/refinery/blog/admin/posts_spec.rb b/spec/features/refinery/blog/admin/posts_spec.rb
index 99ec25d..9ab35c7 100644
--- a/spec/features/refinery/blog/admin/posts_spec.rb
+++ b/spec/features/refinery/blog/admin/posts_spec.rb
@@ -33,7 +33,7 @@ module Refinery
end
it "should have category title", :js => true do
- find('#toggle_advanced_options').click
+ find('#toggle_advanced_options').trigger(:click)
expect(page).to have_content(blog_category.title)
end
@@ -45,7 +45,7 @@ module Refinery
# this is a dirty hack but textarea that needs to be filled is
# hidden and capybara refuses to fill in elements it can't see
page.evaluate_script("WYMeditor.INSTANCES[0].html('<p>And I love it</p>')")
- find('#toggle_advanced_options').click
+ find('#toggle_advanced_options').trigger(:click)
expect(page).to have_css '.blog_categories'
expect(page).to have_css "#post_category_ids_#{blog_category.id}"
expect(page).to have_selector("#post_category_ids_#{blog_category.id}:not(:checked)")
@@ -166,11 +166,11 @@ module Refinery
click_link "Create new post"
fill_in "post_title", :with => "This is some other guy's blog post"
- # this is a dpage_titleirty hack but textarea that needs to be filled is
+ # this is a dirty hack but textarea that needs to be filled is
# hidden and capybara refuses to fill in elements it can't see
page.evaluate_script("WYMeditor.INSTANCES[0].html('<p>I totally did not write it.</p>')")
- find('a', text: 'Toggle Advanced Options').trigger(:click)
+ find("#toggle_advanced_options").trigger(:click)
expect(page).to have_content("Author")
select other_guy.username, :from => "Author"