diff --git a/features/posts.feature b/features/posts.feature index dee929807860e6ba94debd61fffc2161c51af642..b3c7a97c9b587d57ae6565ab6db194c0972e623e 100644 --- a/features/posts.feature +++ b/features/posts.feature @@ -13,7 +13,7 @@ Feature: posting And I am on the home page Then I should see "I am eating a yogurt" within ".stream_element" - @javascript @wip + @javascript Scenario: delete a post Given I am signed in And I have an aspect called "Family" @@ -23,8 +23,8 @@ Feature: posting And I press "Share" And I am on the home page And I hover over the post + And I preemptively confirm the alert And I press the first ".delete" within ".stream_element" - And I confirm the alert And I am on the home page Then I should not see "I am eating a yoghurt" diff --git a/features/posts_message.feature b/features/posts_message.feature deleted file mode 100644 index 026131171bd267e63649542984478a3f5fbb0101..0000000000000000000000000000000000000000 --- a/features/posts_message.feature +++ /dev/null @@ -1,9 +0,0 @@ -@javascript @wip -Feature: posting a message - - Scenario: public messages - Given I am signed in - And I fill in "Post a message to all" with "ohai" - And I wait for the "Share" button to appear - And I press "Share" - Then I should see "ohai" in the main content area \ No newline at end of file diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index bca35e21a4d571affcdc5d4b10c1f05c0152a06e..67fd089f73394ba2a6f92ac35b4b4b00a29470a4 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -15,9 +15,8 @@ And /^I hover over the post$/ do page.execute_script('$(".stream_element").first().mouseover()') end -And /^I confirm the alert$/ do - a = page.driver.browser.switch_to.alert - a.accept +And /^I preemptively confirm the alert$/ do + a = page.evaluate_script("window.confirm = function() { return true; }") end When /^(.*) in the modal window$/ do |action|