Pretty sure that this delete a post feature is broken

This commit is contained in:
Raphael 2011-01-24 18:53:15 -08:00
parent 8f05b638b3
commit 2e50375eed
2 changed files with 34 additions and 2 deletions

View file

@ -10,8 +10,24 @@ Feature: posting
When I fill in "status_message_message" with "I am eating a yogurt"
And I press "Share"
And I follow "Family"
Then I should see "I am eating a yogurt"
And I am on the home page
Then I should see "I am eating a yogurt" within ".stream_element"
@javascript
Scenario: delete a post
Given I am signed in
And I have an aspect called "Family"
And I am on the home page
And I expand the publisher
When I fill in "status_message_message" with "I am eating a yogurt"
And I press "Share"
And I am on the home page
And I hover over the post
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"
Scenario Outline: post to one aspect
Given I am signed in

View file

@ -4,6 +4,22 @@ When /^(.*) in the header$/ do |action|
end
end
And /^I expand the publisher$/ do
page.execute_script('
$("#publisher").removeClass("closed");
$("#publisher").find("textarea").focus();
')
end
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
end
When /^(.*) in the modal window$/ do |action|
within('#facebox') do
When action