Pretty sure that this delete a post feature is broken
This commit is contained in:
parent
8f05b638b3
commit
2e50375eed
2 changed files with 34 additions and 2 deletions
|
|
@ -10,8 +10,24 @@ Feature: posting
|
||||||
When I fill in "status_message_message" with "I am eating a yogurt"
|
When I fill in "status_message_message" with "I am eating a yogurt"
|
||||||
And I press "Share"
|
And I press "Share"
|
||||||
|
|
||||||
And I follow "Family"
|
And I am on the home page
|
||||||
Then I should see "I am eating a yogurt"
|
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
|
Scenario Outline: post to one aspect
|
||||||
Given I am signed in
|
Given I am signed in
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,22 @@ When /^(.*) in the header$/ do |action|
|
||||||
end
|
end
|
||||||
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|
|
When /^(.*) in the modal window$/ do |action|
|
||||||
within('#facebox') do
|
within('#facebox') do
|
||||||
When action
|
When action
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue