<commit_before>@javascript
Feature: Watchers for conversations

  Background: 
    Given a project with users @mislav, @balint, @pablo and @james
    And I am logged in as @mislav
    And no emails have been sent

  Scenario: Adding watchers to an untitled conversation
    Given I go to the projects page
    When I fill in the comment box with "Hey, guys..."
    And I wait for 1 second
    When I follow "Watchers" 
    Then I should see "All users"
    And I should see "<NAME>"
    When I follow "All users"
    And I press "Save"
    And I wait for 2 second
    Then @balint, @pablo and @james should receive 1 emails

  Scenario: New conversation watchers
    When I go to the new conversation page
    And I fill in "Title" with "Talk!"
    And I fill in the comment box with "We need to discuss!"
    And I press "Create"
    Then @balint, @pablo and @james should be watching the conversation "Talk!"
    When I fill in the comment box with "Rockets!"
    And I press "Save"
    And I wait for 1 second
    Then @balint, @pablo and @james should receive 2 emails

  Scenario: Existing conversation with watchers
    Given I started a conversation named "Politics"
    And the conversation "Politics" is watched by @pablo and @james
    When I go to the conversations page
    And I follow "Politics"
    And I fill in the comment box with "Senators!"
    And I press "Save"
    And I wait for 1 second
    And I fill in the comment box with "Rockets!"
    And I press "Save"
    And I wait for 1 second
    Then @balint should receive no emails
    And @pablo and @james should receive 2 emails

  Scenario: User leaves project
    Given I started a conversation named "Politics"
    And the conversation "Politics" is watched by @balint, @pablo and @james
    And @pablo left the project
    When I go to the conversations page
    And I follow "Politics"
    And I fill in the comment box with "Celebrities!"
    And I press "Save"
    And I wait for 1 second
    And I fill in the comment box with "Controversy!"
    And I press "Save"
    And I wait for 1 second
    Then @pablo should receive no emails
    And @balint and @james should receive 2 emails
<commit_msg>Test unchecked checkboxes on conversations#new cuke<commit_after>@javascript
Feature: Watchers for conversations

  Background:
    Given the following confirmed users exist
      | login  | email                    | first_name | last_name |
      | pablo  | <EMAIL>        | Pablo      | Villalba  |
      | enric  | <EMAIL>        | Enric      | Lluelles  |
      | james  | <EMAIL>        | James      | Urquhart  |
    Given a project with users @mislav, @enric, @pablo and @james
    And I am logged in as @mislav
    And no emails have been sent

  Scenario: Adding watchers to an untitled conversation
    Given I go to the projects page
    When I fill in the comment box with "Hey, guys..."
    And I wait for 1 second
    When I follow "Watchers" 
    Then I should see "All users"
    And I should see "<NAME>"
    When I follow "All users"
    And I press "Save"
    And I wait for 2 second
    Then @enric, @pablo and @james should receive 1 emails

  Scenario: New conversation watchers
    When I go to the new conversation page
    And I fill in "Title" with "Talk!"
    And I fill in the comment box with "We need to discuss!"
    And I uncheck "<NAME>"
    And I press "Create"
    Then @enric and @pablo should be watching the conversation "Talk!"
    And @james should not be watching the conversation "Talk!"
    When I fill in the comment box with "Rockets!"
    And I press "Save"
    And I wait for 1 second
    Then @enric and @pablo should receive 2 emails
    And @james should receive 0 emails

  Scenario: Existing conversation with watchers
    Given I started a conversation named "Politics"
    And the conversation "Politics" is watched by @pablo and @james
    When I go to the conversations page
    And I follow "Politics"
    And I fill in the comment box with "Senators!"
    And I press "Save"
    And I wait for 1 second
    And I fill in the comment box with "Rockets!"
    And I press "Save"
    And I wait for 1 second
    Then @enric should receive no emails
    And @pablo and @james should receive 2 emails

  Scenario: User leaves project
    Given I started a conversation named "Politics"
    And the conversation "Politics" is watched by @enric, @pablo and @james
    And @pablo left the project
    When I go to the conversations page
    And I follow "Politics"
    And I fill in the comment box with "Celebrities!"
    And I press "Save"
    And I wait for 1 second
    And I fill in the comment box with "Controversy!"
    And I press "Save"
    And I wait for 1 second
    Then @pablo should receive no emails
    And @enric and @james should receive 2 emails

{'fraction_non_alphanumeric': 0.0525328330206379, 'fraction_numerical': 0.004794663331248697, 'mean_word_length': 2.760188087774295, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7377335', 'n_tokens_mistral': 1402, 'n_tokens_neox': 1341, 'n_words': 738}