aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnita Graham <anita@joli.com.au>2015-05-07 21:51:15 +0800
committerPhilip Arndt <git@p.arndt.io>2015-05-18 18:03:42 +1200
commita3204ed60e2f25e5231ddf8e18e4124b157e8ee4 (patch)
treeb7b976d8b24a23411ba26255447463f9caa92092
parent049c595aeeaff7ebc2461619db4ea422922a4825 (diff)
downloadrefinerycms-blog-a3204ed60e2f25e5231ddf8e18e4124b157e8ee4.tar.gz
refinerycms-blog-a3204ed60e2f25e5231ddf8e18e4124b157e8ee4.tar.bz2
refinerycms-blog-a3204ed60e2f25e5231ddf8e18e4124b157e8ee4.zip
Use find/trigger(:click) instead of click_link
-rw-r--r--app/assets/stylesheets/refinery/blog/backend.css.scss3
-rw-r--r--spec/features/refinery/blog/admin/posts_spec.rb8
2 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/stylesheets/refinery/blog/backend.css.scss b/app/assets/stylesheets/refinery/blog/backend.css.scss
index d3b445c..db5a0d8 100644
--- a/app/assets/stylesheets/refinery/blog/backend.css.scss
+++ b/app/assets/stylesheets/refinery/blog/backend.css.scss
@@ -10,6 +10,7 @@
.comment_tick_icon {
background-image: image_url('refinery/blog/icons/comment_tick.png');
}
+
ul.blog_categories {
height:200px;
overflow:auto;
@@ -31,4 +32,4 @@ a#copy_body_link {
.form-actions a.confirm-delete, #content .form-actions a.confirm-delete {
position: relative;
right: auto;
-} \ No newline at end of file
+}
diff --git a/spec/features/refinery/blog/admin/posts_spec.rb b/spec/features/refinery/blog/admin/posts_spec.rb
index 2c7b82c..99ec25d 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
- click_link "toggle_advanced_options"
+ find('#toggle_advanced_options').click
expect(page).to have_content(blog_category.title)
end
@@ -45,14 +45,14 @@ 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>')")
- click_link "toggle_advanced_options"
- sleep 1
+ find('#toggle_advanced_options').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)")
check blog_category.title
expect(page).to have_selector("#post_category_ids_#{blog_category.id}:checked")
click_button "Save"
+ sleep 1
expect(page).to have_content("was successfully added.")
end
@@ -170,7 +170,7 @@ module Refinery
# 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>')")
- click_link "toggle_advanced_options"
+ find('a', text: 'Toggle Advanced Options').trigger(:click)
expect(page).to have_content("Author")
select other_guy.username, :from => "Author"