add cucumber scenario that expose bug #1924

This commit is contained in:
Max Gonzih 2011-09-12 14:57:47 +03:00
parent cb2c094139
commit 6672436bfc
2 changed files with 22 additions and 0 deletions

View file

@ -137,3 +137,17 @@ Feature: posting from the main page
And I wait for the ajax to finish And I wait for the ajax to finish
And I follow "Your Aspects" And I follow "Your Aspects"
Then I should not see "I am eating a yogurt" Then I should not see "I am eating a yogurt"
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

View file

@ -195,3 +195,11 @@ When /^I click on "([^"]*)" aspect edit icon$/ do |aspect_name|
find(:xpath, "//a[@rel='facebox'][.//img[@title='Edit #{aspect_name}']]").click find(:xpath, "//a[@rel='facebox'][.//img[@title='Edit #{aspect_name}']]").click
end end
end 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