Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielgrippi <danielgrippi@gmail.com>2011-07-13 06:03:35 +0400
committerRaphael Sofaer <raphael@joindiaspora.com>2011-07-22 05:22:17 +0400
commitf3a515eef165095b79de85418e33eb968e65e59a (patch)
treebb14e0a44bc7ea4bae84af1c75c615262949ee6d /features
parentd1bbbdbc4c2c91af69fa841572d9116d93f1ff97 (diff)
DG IZ reshare retractions is WIP
Diffstat (limited to 'features')
-rw-r--r--features/repost.feature52
-rw-r--r--features/step_definitions/custom_web_steps.rb4
-rw-r--r--features/step_definitions/posts_steps.rb3
3 files changed, 54 insertions, 5 deletions
diff --git a/features/repost.feature b/features/repost.feature
index 775557730..4dd29df78 100644
--- a/features/repost.feature
+++ b/features/repost.feature
@@ -34,11 +34,9 @@ Feature: public repost
And I wait for the ajax to finish
And I wait for 2 seconds
-
-
And I am on "alice@alice.alice"'s page
Then I should see "reshare this!"
- Then I should see a ".reshared"
+ Then I should see a ".reshare"
And I should see "Bob"
Scenario: shows up on the aspects page
@@ -49,9 +47,53 @@ Feature: public repost
And I wait for the ajax to finish
And I go to the home page
- Then I should see a ".reshared"
+ Then I should see a ".reshare"
And I follow "Your Aspects"
Then I should see "reshare this!"
- Then I should see a ".reshared"
+ Then I should see a ".reshare"
And I should see "Bob"
+ Scenario: can be retracted
+ And "bob@bob.bob" has a public post with text "reshare this!"
+ And I sign in as "alice@alice.alice"
+ And I preemptively confirm the alert
+ And I follow "Reshare"
+ And I wait for the ajax to finish
+
+ And I go to the home page
+ Then I should see a ".reshare"
+ And I follow "Your Aspects"
+ Then I should see "reshare this!"
+ Then I should see a ".reshare"
+ And I should see "Bob"
+
+ And I go to the destroy user session page
+ And I sign in as "bob@bob.bob"
+
+ And The user deletes their first post
+
+ And I go to the destroy user session page
+ And I sign in as "alice@alice.alice"
+
+ And I go to the home page
+ Then I should see "Original post deleted by author"
+
+ Scenario: Keeps track of the number of reshares
+ And "bob@bob.bob" has a public post with text "reshare this!"
+ And I sign in as "alice@alice.alice"
+ And I preemptively confirm the alert
+ And I follow "Reshare"
+ And I wait for the ajax to finish
+
+ And I go to the home page
+ Then I should see a ".reshare"
+ And I follow "Your Aspects"
+ Then I should see "reshare this!"
+ Then I should see a ".reshare"
+ And I should see "Bob"
+
+ And I go to the destroy user session page
+ And I sign in as "bob@bob.bob"
+ And I should see "1 Reshare"
+
+ Scenario: Can have text
diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb
index 63c0e9b34..8233da35e 100644
--- a/features/step_definitions/custom_web_steps.rb
+++ b/features/step_definitions/custom_web_steps.rb
@@ -44,6 +44,10 @@ When /^I click to delete the first post$/ do
page.execute_script('$(".stream_element").first().find(".stream_element_delete").first().click()')
end
+When /^I click to delete the ([\d])(nd|rd|st|th) post$/ do |number, stuff|
+ page.execute_script('$(".stream_element:nth-child('+ number +'").first().find(".stream_element_delete").first().click()')
+end
+
When /^I click to delete the first comment$/ do
page.execute_script('$(".comment.posted").first().find(".comment_delete").click()')
end
diff --git a/features/step_definitions/posts_steps.rb b/features/step_definitions/posts_steps.rb
index d9879e72a..94bf863df 100644
--- a/features/step_definitions/posts_steps.rb
+++ b/features/step_definitions/posts_steps.rb
@@ -19,3 +19,6 @@ Given /^"([^"]*)" has a non public post with text "([^"]*)"$/ do |email, text|
user.post(:status_message, :text => text, :public => false, :to => user.aspects)
end
+When /^The user deletes their first post$/ do
+ @me.posts.first.destroy
+end