<commit_before>@javascript
Feature: commenting
  In order to tell Alice how great the picture of her dog is
  As Alice's friend
  I want to comment on her 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>"
    When I sign in as "<EMAIL>"
    And I am on the home page
    And I expand the publisher
    And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
    And I fill in "status_message_fake_text" with "Look at this dog"
    And I press "Share"
    And I wait for the ajax to finish
    And I follow "All Aspects"
    Then I should see "Look at this dog" within ".stream_element"
    And I should see a "img" within ".stream_element div.photo_attachments"
    Then I log out

  Scenario: comment on a post from within a user's stream
    When I sign in as "<EMAIL>"
    And I am on "<EMAIL>"'s page
    Then I should see "Look at this dog"
    When I focus the comment field
    And I fill in "comment" with "is that a poodle?"
    And I press "comment"
    Then I should see "is that a poodle?" within "li.comment div.content"
    And I should see "less than a minute ago" within "li.comment time"

  Scenario: comment on a photo from the photo page
    When I sign in as "<EMAIL>"
    And I am on the photo page for "<EMAIL>"'s post "Look at this dog"
    And I focus the comment field
    And I fill in "comment" with "hahahah"
    And I press "comment"
    Then I should see "hahaha" within "li.comment div.content"
    And I should see "less than a minute ago" within "li.comment time"

  Scenario: comment on your own photo from the photo page
    When I sign in as "<EMAIL>"
    And I am on the photo page for "<EMAIL>"'s post "Look at this dog"
    And I focus the comment field
    And I fill in "comment" with "hahahah"
    And I press "comment"
    Then I should see "hahaha" within "li.comment div.content"
    And I should see "less than a minute ago" within "li.comment time"

  Scenario: delete a comment 
    When I sign in as "<EMAIL>"
    And I am on "<EMAIL>"'s page
    Then I should see "Look at this dog"
    When I focus the comment field
    And I fill in "comment" with "is that a poodle?"
    And I press "comment"
    And I wait for the ajax to finish
    When I hover over the comment
    And I preemptively confirm the alert
    And I click to delete the first comment
    And I wait for the ajax to finish
    Then I should not see "is that a poodle?"

  Scenario: expand the comment form
    When I sign in as "<EMAIL>"
    Then I should see "Look at this dog"
    Then the first comment field should be closed
    When I focus the comment field
    Then the first comment field should be open

    When I follow "Besties"
    And I wait for the ajax to finish
    Then I should see "Look at this dog"
    Then the first comment field should be closed
    When I focus the comment field
    Then the first comment field should be open<commit_msg>added cuc test for commenting on a status message show page<commit_after>@javascript
Feature: commenting
  In order to tell Alice how great the picture of her dog is
  As Alice's friend
  I want to comment on her 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>"
    When I sign in as "<EMAIL>"
    And I am on the home page
    And I expand the publisher
    And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
    And I fill in "status_message_fake_text" with "Look at this dog"
    And I press "Share"
    And I wait for the ajax to finish
    And I follow "All Aspects"
    Then I should see "Look at this dog" within ".stream_element"
    And I should see a "img" within ".stream_element div.photo_attachments"
    Then I log out

  Scenario: comment on a post from within a user's stream
    When I sign in as "<EMAIL>"
    And I am on "<EMAIL>"'s page
    Then I should see "Look at this dog"
    When I focus the comment field
    And I fill in "comment" with "is that a poodle?"
    And I press "comment"
    Then I should see "is that a poodle?" within "li.comment div.content"
    And I should see "less than a minute ago" within "li.comment time"

  Scenario: comment on a photo from the photo page
    When I sign in as "<EMAIL>"
    And I am on the photo page for "<EMAIL>"'s post "Look at this dog"
    And I focus the comment field
    And I fill in "comment" with "hahahah"
    And I press "comment"
    Then I should see "hahaha" within "li.comment div.content"
    And I should see "less than a minute ago" within "li.comment time"

  Scenario: comment on your own photo from the photo page
    When I sign in as "<EMAIL>"
    And I am on the photo page for "<EMAIL>"'s post "Look at this dog"
    And I focus the comment field
    And I fill in "comment" with "hahahah"
    And I press "comment"
    Then I should see "hahaha" within "li.comment div.content"
    And I should see "less than a minute ago" within "li.comment time"

  Scenario: delete a comment 
    When I sign in as "<EMAIL>"
    And I am on "<EMAIL>"'s page
    Then I should see "Look at this dog"
    When I focus the comment field
    And I fill in "comment" with "is that a poodle?"
    And I press "comment"
    And I wait for the ajax to finish
    When I hover over the comment
    And I preemptively confirm the alert
    And I click to delete the first comment
    And I wait for the ajax to finish
    Then I should not see "is that a poodle?"

  Scenario: expand the comment form
    When I sign in as "<EMAIL>"
    Then I should see "Look at this dog"
    Then the first comment field should be closed
    When I focus the comment field
    Then the first comment field should be open

    When I follow "Besties"
    And I wait for the ajax to finish
    Then I should see "Look at this dog"
    Then the first comment field should be closed
    When I focus the comment field
    Then the first comment field should be open
    
  Scenario: comment on a status show page
    When I sign in as "<EMAIL>"
    And I am on "<EMAIL>"'s page
    Then I should see "Look at this dog"
    When I follow "less than a minute ago"
    Then I should see "Look at this dog"
    And I fill in "text" with "I think thats a cat"
    And I press "comment"
    And I wait for the ajax to finish
    When I am on "<EMAIL>"'s page
    Then I should see "I think thats a cat"


{'fraction_non_alphanumeric': 0.06135434025147705, 'fraction_numerical': 0.0, 'mean_word_length': 2.84507862550961, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, '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': '5184495', 'n_tokens_mistral': 1930, 'n_tokens_neox': 1895, 'n_words': 1112}