<commit_before>@javascript
Feature: posting from the main page
    In order to enlighten humanity for the good of society
    As a rock star
    I want to tell the world I am eating a yogurt

    Background:
      Given a user with username "bob"
      And a user with username "alice"
      And I sign in as "<EMAIL>"
      And a user with username "bob" is connected with "alice"
      And I have an aspect called "PostingTo"
      And I have an aspect called "NotPostingThingsHere"
      And I have user with username "alice" in an aspect called "PostingTo"
      And I have user with username "alice" in an aspect called "NotPostingThingsHere"
      And I am on the home page

    Scenario: post a text-only message to all aspects
      Given I expand the publisher
      When I fill in "status_message_fake_text" with "I am eating a yogurt"
      And I press "Share"
      And I go to the aspects page
      Then I should see "I am eating a yogurt" within ".stream_element"

    Scenario: post a text-only message to just one aspect
      When I select only "PostingTo" aspect
      And I expand the publisher
      And I fill in "status_message_fake_text" with "I am eating a yogurt"

      And I press "Share"
      And I wait for the ajax to finish

      When I am on the aspects page
      And I select only "PostingTo" aspect
      Then I should see "I am eating a yogurt"

      When I am on the aspects page
      And I select only "NotPostingThingsHere" aspect
      Then I should not see "I am eating a yogurt"

    Scenario: post a photo with text
      Given I expand the publisher
      When 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 go to the aspects page
      Then I should see a "img" within ".stream_element div.photo_attachments"
      And I should see "Look at this dog" within ".stream_element"
      When I log out
      And I sign in as "<EMAIL>"
      And I go to "<EMAIL>"'s page
      Then I should see a "img" within ".stream_element div.photo_attachments"
      And I should see "Look at this dog" within ".stream_element"

    Scenario: post a photo without text
      Given I expand the publisher
      When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I wait for the ajax to finish
      Then I should see an uploaded image within the photo drop zone
      When I press "Share"
      And I wait for the ajax to finish
      And I go to the aspects page
      Then I should see a "img" within ".stream_element div.photo_attachments"
      When I log out
      And I sign in as "<EMAIL>"
      And I go to "<EMAIL>"'s page
      Then I should see a "img" within ".stream_element div.photo_attachments"

    Scenario: back out of posting a photo-only post
      Given I expand the publisher
      And I have turned off jQuery effects
      When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I wait for the ajax to finish
      And I click to delete the first uploaded photo
      And I wait for the ajax to finish
      Then I should not see an uploaded image within the photo drop zone

    Scenario: back out of uploading a picture to a post with text
      Given I expand the publisher
      And I have turned off jQuery effects
      When I fill in "status_message_fake_text" with "I am eating a yogurt"
      And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I wait for the ajax to finish
      And I click to delete the first uploaded photo
      And I wait for the ajax to finish
      Then I should not see an uploaded image within the photo drop zone
      And the publisher should be expanded

    Scenario: back out of uploading a picture when another has been attached
      Given I expand the publisher
      And I have turned off jQuery effects
      When I fill in "status_message_fake_text" with "I am eating a yogurt"
      And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I wait for the ajax to finish
      And I click to delete the first uploaded photo
      And I wait for the ajax to finish
      Then I should see an uploaded image within the photo drop zone
      And the publisher should be expanded

    Scenario: hide a contact's post
      Given I expand the publisher
      When I fill in "status_message_fake_text" with "Here is a post for you to hide"
      And I press "Share"
      And I wait for the ajax to finish

      And I log out
      And I sign in as "<EMAIL>"
      And I am on "<EMAIL>"'s page

      And I hover over the ".stream_element"
      And I preemptively confirm the alert
      And I click to delete the first post
      And I wait for the ajax to finish
      And I go to "<EMAIL>"'s page
      Then I should not see "Here is a post for you to hide"
      When I am on the aspects page
      Then I should not see "Here is a post for you to hide"

    Scenario: delete one of my posts
      Given I expand the publisher
      When I fill in "status_message_fake_text" with "I am eating a yogurt"
      And I press "Share"
      And I wait for the ajax to finish
      And I go to the aspects page
      And I hover over the ".stream_element"
      And I preemptively confirm the alert
      And I click to delete the first post
      And I wait for the ajax to finish
      And I go to the aspects page
      Then I should not see "I am eating a yogurt"

    Scenario: change post target aspects with the aspect-dropdown before posting
      When I expand the publisher
      And I press the aspect dropdown
      And I toggle the aspect "PostingTo"
      And I append "I am eating a yogurt" to the publisher<commit_msg>make this spec WIP, as there is a larger problem with hidden posts that is addressed in teh hidden posts branch that is soon to be merged in<commit_after>@javascript
Feature: posting from the main page
    In order to enlighten humanity for the good of society
    As a rock star
    I want to tell the world I am eating a yogurt

    Background:
      Given a user with username "bob"
      And a user with username "alice"
      And I sign in as "<EMAIL>"
      And a user with username "bob" is connected with "alice"
      And I have an aspect called "PostingTo"
      And I have an aspect called "NotPostingThingsHere"
      And I have user with username "alice" in an aspect called "PostingTo"
      And I have user with username "alice" in an aspect called "NotPostingThingsHere"
      And I am on the home page

    Scenario: post a text-only message to all aspects
      Given I expand the publisher
      When I fill in "status_message_fake_text" with "I am eating a yogurt"
      And I press "Share"
      And I go to the aspects page
      Then I should see "I am eating a yogurt" within ".stream_element"

    Scenario: post a text-only message to just one aspect
      When I select only "PostingTo" aspect
      And I expand the publisher
      And I fill in "status_message_fake_text" with "I am eating a yogurt"

      And I press "Share"
      And I wait for the ajax to finish

      When I am on the aspects page
      And I select only "PostingTo" aspect
      Then I should see "I am eating a yogurt"

      When I am on the aspects page
      And I select only "NotPostingThingsHere" aspect
      Then I should not see "I am eating a yogurt"

    Scenario: post a photo with text
      Given I expand the publisher
      When 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 go to the aspects page
      Then I should see a "img" within ".stream_element div.photo_attachments"
      And I should see "Look at this dog" within ".stream_element"
      When I log out
      And I sign in as "<EMAIL>"
      And I go to "bob<EMAIL>"'s page
      Then I should see a "img" within ".stream_element div.photo_attachments"
      And I should see "Look at this dog" within ".stream_element"

    Scenario: post a photo without text
      Given I expand the publisher
      When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I wait for the ajax to finish
      Then I should see an uploaded image within the photo drop zone
      When I press "Share"
      And I wait for the ajax to finish
      And I go to the aspects page
      Then I should see a "img" within ".stream_element div.photo_attachments"
      When I log out
      And I sign in as "<EMAIL>"
      And I go to "<EMAIL>"'s page
      Then I should see a "img" within ".stream_element div.photo_attachments"

    Scenario: back out of posting a photo-only post
      Given I expand the publisher
      And I have turned off jQuery effects
      When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I wait for the ajax to finish
      And I click to delete the first uploaded photo
      And I wait for the ajax to finish
      Then I should not see an uploaded image within the photo drop zone

    Scenario: back out of uploading a picture to a post with text
      Given I expand the publisher
      And I have turned off jQuery effects
      When I fill in "status_message_fake_text" with "I am eating a yogurt"
      And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I wait for the ajax to finish
      And I click to delete the first uploaded photo
      And I wait for the ajax to finish
      Then I should not see an uploaded image within the photo drop zone
      And the publisher should be expanded

    Scenario: back out of uploading a picture when another has been attached
      Given I expand the publisher
      And I have turned off jQuery effects
      When I fill in "status_message_fake_text" with "I am eating a yogurt"
      And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
      And I wait for the ajax to finish
      And I click to delete the first uploaded photo
      And I wait for the ajax to finish
      Then I should see an uploaded image within the photo drop zone
      And the publisher should be expanded

    @wip
    Scenario: hide a contact's post
      Given I expand the publisher
      When I fill in "status_message_fake_text" with "Here is a post for you to hide"
      And I press "Share"
      And I wait for the ajax to finish

      And I log out
      And I sign in as "<EMAIL>"
      And I am on "<EMAIL>"'s page

      And I hover over the ".stream_element"
      And I preemptively confirm the alert
      And I click to delete the first post
      And I wait for the ajax to finish
      And I go to "<EMAIL>"'s page
      And I wait for the ajax to finish
      Then I should not see "Here is a post for you to hide"
      When I am on the aspects page
      And I wait for the ajax to finish
      Then I should not see "Here is a post for you to hide"

    Scenario: delete one of my posts
      Given I expand the publisher
      When I fill in "status_message_fake_text" with "I am eating a yogurt"
      And I press "Share"
      And I wait for the ajax to finish
      And I go to the aspects page
      And I hover over the ".stream_element"
      And I preemptively confirm the alert
      And I click to delete the first post
      And I wait for the ajax to finish
      And I go to the aspects page
      Then I should not see "I am eating a yogurt"

    Scenario: change post target aspects with the aspect-dropdown before posting
      When I expand the publisher
      And I press the aspect dropdown
      And I toggle the aspect "PostingTo"
      And I append "I am eating a yogurt" to the publisher
{'fraction_non_alphanumeric': 0.04051745179399561, 'fraction_numerical': 0.0, 'mean_word_length': 2.559803069794382, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '1350712', 'n_tokens_mistral': 3345, 'n_tokens_neox': 3201, 'n_words': 1939}