diff --git a/features/posts_from_main_page.feature b/features/posts_from_main_page.feature index 714c66473..2bb50f4be 100644 --- a/features/posts_from_main_page.feature +++ b/features/posts_from_main_page.feature @@ -192,3 +192,17 @@ Feature: posting from the main page And I select only "NotPostingThingsHere" aspect Then I should not see "I am eating a yogurt" Then I should not see "And cornflakes also" + + Scenario: reject deletion one of my posts + When I expand the publisher + And I fill in "status_message_fake_text" with "I am eating a yogurt" + And I press "Share" + And I wait for the ajax to finish + + When I follow "Your Aspects" + And I hover over the ".stream_element" + And I preemptively reject the alert + And I click to delete the first post + Then I should see "I am eating a yogurt" + And I should see first post deletion link + And I should not see ajax loader on deletion link place diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 1a8cc7bd8..7b55ac5d7 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -219,3 +219,10 @@ And /^I click close on all the popovers$/ do });") end +Then /^I should see first post deletion link$/ do + page.evaluate_script("$('.stream_element_delete').first().css('display')").should == "inline" +end + +Then /^I should not see ajax loader on deletion link place$/ do + page.evaluate_script("$('.hide_loader').first().css('display')").should == "none" +end