diff --git a/features/step_definitions/comment_steps.rb b/features/step_definitions/comment_steps.rb index 086cde46a..4569a92eb 100644 --- a/features/step_definitions/comment_steps.rb +++ b/features/step_definitions/comment_steps.rb @@ -8,7 +8,7 @@ end Then /^the first comment field should be closed$/ do page.should have_css(".stream_element") - find("#main_stream .stream_element .new_comment", match: :first, visible: false).should_not be_visible + page.should_not have_selector("#main_stream .stream_element .new_comment", match: :first) end When /^I comment "([^"]*)" on "([^"]*)"$/ do |comment_text, post_text| diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 5b42b9263..fc2d65745 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -95,8 +95,6 @@ end When /^I append "([^"]*)" to the publisher$/ do |stuff| elem = find('#status_message_fake_text') elem.native.send_keys(' ' + stuff) - - find('#status_message_text', visible: false).value.should include(stuff) end When /^I append "([^"]*)" to the publisher mobile$/ do |stuff| @@ -119,7 +117,8 @@ end When /^I prepare the deletion of the first post$/ do within('.stream_element', match: :first) do - find('.remove_post', visible: false).click + find('.controls').hover + find('.remove_post').click end end @@ -130,7 +129,8 @@ end When /^I click to delete the first comment$/ do within("div.comment", match: :first) do - find(".comment_delete", visible: false).click + find(".controls").hover + find(".comment_delete").click end end diff --git a/features/step_definitions/keyboard_navigation_steps.rb b/features/step_definitions/keyboard_navigation_steps.rb index e39ed4c32..9c7a08d7c 100644 --- a/features/step_definitions/keyboard_navigation_steps.rb +++ b/features/step_definitions/keyboard_navigation_steps.rb @@ -5,7 +5,7 @@ When /^I press the "([^\"]*)" key somewhere$/ do |key| end When /^I press the "([^\"]*)" key in the publisher$/ do |key| - find("#status_message_fake_text", visible: false).native.send_keys(key) + find("#status_message_fake_text").native.send_keys(key) end Then /^post (\d+) should be highlighted$/ do |position| diff --git a/features/step_definitions/posts_steps.rb b/features/step_definitions/posts_steps.rb index aefe6a09e..ade6b1cfc 100644 --- a/features/step_definitions/posts_steps.rb +++ b/features/step_definitions/posts_steps.rb @@ -7,7 +7,7 @@ Then /^the post should be expanded$/ do end Then /^I should see an uploaded image within the photo drop zone$/ do - find("#photodropzone img", visible: false)["src"].should include("uploads/images") + find("#photodropzone img")["src"].should include("uploads/images") end Then /^I should not see an uploaded image within the photo drop zone$/ do @@ -35,7 +35,8 @@ And /^the post with text "([^"]*)" is reshared by "([^"]*)"$/ do |text, email| end When /^I click on the first block button/ do - find(".block_user", visible: false).click + find(".stream_element", match: :first).hover + find(".block_user").click end When /^I expand the post$/ do diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb index 3e16cd73f..fe3bb6a8e 100644 --- a/features/support/publishing_cuke_helpers.rb +++ b/features/support/publishing_cuke_helpers.rb @@ -20,7 +20,7 @@ module PublishingCukeHelpers def expand_first_post within(".stream_element", match: :first) do find(".expander").click - find(".expander", visible: false).should_not be_visible + has_css?(".expander").should be_false end end @@ -30,7 +30,7 @@ module PublishingCukeHelpers end def first_post_expanded? - find(".stream_element .expander", match: :first, visible: false).should_not be_visible + has_no_css?(".stream_element .expander", match: :first).should be_true find(".stream_element .collapsible", match: :first).has_no_selector?(".collapsed") find(".stream_element .collapsible", match: :first).has_selector?(".opened") end