<commit_before>@javascript
Feature: public repost
  In order to make Diaspora more viral
  As a User
  I want to reshare my friend's post

  Background:
    Given a user named "<NAME>" with email "<EMAIL>"
    And a user named "<NAME>" with email "<EMAIL>"
    And a user with email "<EMAIL>" is connected with "<EMAIL>"

  Scenario: I don't see the reshare button on my own posts
    Given "<EMAIL>" has a public post with text "reshare this!"
    And "<EMAIL>" has a non public post with text "but don't reshare this."
    And I sign in as "<EMAIL>"
    Then I should not see "Reshare" 

  Scenario: I don't see the reshare button on other people's private pots
    Given "<EMAIL>" has a non public post with text "don't reshare this."
    And I sign in as "<EMAIL>"
    Then I should not see "Reshare" 

  Scenario: I see the reshare button on my contact's public posts
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"
    Then I should see "Reshare" 

  Scenario: When I reshare, it shows up on my profile page
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"

    And I preemptively confirm the alert
    And I follow "Reshare"
    And I wait for the ajax to finish
    And I wait for 2 seconds

    When I am on "<EMAIL>"'s page
    Then I should see "reshare this!" 
    Then I should see a ".reshare"
    And I should see "Bob" 

  Scenario: When I reshare, it shows up in my stream
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"
    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" 

  Scenario: I can delete a post that has been reshared 
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"
    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"

    When I follow "Your Aspects"
    Then I should see "reshare this!" 
    Then I should see a ".reshare"
    And I should see "Bob" 

    When I go to the destroy user session page
    And I sign in as "<EMAIL>"
    And The user deletes their first post
    And I go to the destroy user session page
    And I sign in as "<EMAIL>"

    When I go to the home page
    Then I should see "Original post deleted by author"

  Scenario: I can see the number of reshares
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"
    And I preemptively confirm the alert
    And I follow "Reshare"
    And I wait for the ajax to finish

    When I go to the home page
    Then I should see a ".reshare"
    When I follow "Your Aspects"
    Then I should see "reshare this!" 
    And I should see a ".reshare"
    And I should see "Bob" 

    When I go to the home page
    Then I should see "1 reshare"<commit_msg>attempt fix for reshare cuke<commit_after>@javascript
Feature: public repost
  In order to make Diaspora more viral
  As a User
  I want to reshare my friend's post

  Background:
    Given a user named "<NAME>" with email "<EMAIL>"
    And a user named "<NAME>" with email "<EMAIL>"
    And a user with email "<EMAIL>" is connected with "<EMAIL>"

  Scenario: I don't see the reshare button on my own posts
    Given "<EMAIL>" has a public post with text "reshare this!"
    And "<EMAIL>" has a non public post with text "but don't reshare this."
    And I sign in as "<EMAIL>"
    Then I should not see "Reshare" 

  Scenario: I don't see the reshare button on other people's private pots
    Given "<EMAIL>" has a non public post with text "don't reshare this."
    And I sign in as "<EMAIL>"
    Then I should not see "Reshare" 

  Scenario: I see the reshare button on my contact's public posts
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"
    Then I should see "Reshare" 

  Scenario: When I reshare, it shows up on my profile page
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"

    And I preemptively confirm the alert
    And I follow "Reshare"
    And I wait for the ajax to finish
    And I wait for 2 seconds

    When I am on "<EMAIL>"'s page
    Then I should see "reshare this!" 
    Then I should see a ".reshare"
    And I should see "Bob" 

  Scenario: When I reshare, it shows up in my stream
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"
    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
    And I wait for the ajax to finish
    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" 

  Scenario: I can delete a post that has been reshared 
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"
    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"

    When I follow "Your Aspects"
    Then I should see "reshare this!" 
    Then I should see a ".reshare"
    And I should see "Bob" 

    When I go to the destroy user session page
    And I sign in as "<EMAIL>"
    And The user deletes their first post
    And I go to the destroy user session page
    And I sign in as "<EMAIL>"

    When I go to the home page
    Then I should see "Original post deleted by author"

  Scenario: I can see the number of reshares
    Given "<EMAIL>" has a public post with text "reshare this!"
    And I sign in as "<EMAIL>"
    And I wait for the ajax to finish
    And I preemptively confirm the alert
    And I follow "Reshare"
    And I wait for the ajax to finish

    When I go to the home page
    Then I should see a ".reshare"
    When I follow "Your Aspects"
    Then I should see "reshare this!" 
    And I should see a ".reshare"
    And I should see "Bob" 

    When I go to the home page
    Then I should see "1 reshare"
{'fraction_non_alphanumeric': 0.06498984533666614, 'fraction_numerical': 0.0006249023590064052, 'mean_word_length': 2.6771970132107983, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5736615', 'n_tokens_mistral': 1999, 'n_tokens_neox': 1872, 'n_words': 1093}