<commit_before>@javascript
Feature: Messaging
  As a registered user
  I want to send and recieve messages
  So I can do my job

  Scenario: Send and recieve messages
    Given the following desk records
      | name      | abrev | job_type | user_id |
      | CUS North | CUSN  | td       | 0       |
      | CUS South | CUSS  | td       | 0       |
    Given the following user records
      | user_name |
      | Bill      |
      | Bob       |
    And I am in Bill's browser
    And I am logged in as "Bill" with password "<PASSWORD>" at "CUSN"
    When I go to the messaging page
    Then I should not see recieved message "Hi Bill!"

    Given I am in Bob's browser
    And I am logged in as "Bob" with password "<PASSWORD>" at "CUSS"
    When I go to the messaging page
    And I click "CUSN"
    And I fill in "message_content" with "Hi Bill!"
    And I press the "enter" key
    Then I should see my message "Hi Bill!"
    And I should nothing in the "message_content" text field

    Given I am in Bill's browser
    When I wait 1 second
    Then I should see recieved message "Hi Bill!"

    Given I click on the recieved message

    Given I am in Bob's browser
    When I wait 1 second
    Then I should see "Bill" read this<commit_msg>add steps in messaging feature to test if a user that is not supposed to recieve a message actually does not recieve the message<commit_after>@javascript
@messaging
Feature: Messaging
  As a registered user
  I want to send and recieve messages
  So I can do my job

  Scenario: Send and recieve messages
    Given the following desk records
      | name      | abrev | job_type | user_id |
      | CUS North | CUSN  | td       | 0       |
      | CUS South | CUSS  | td       | 0       |
      | AML / NOL | AML   | td       | 0       |
    Given the following user records
      | first_name | middle_initial | last_name | user_name |
      | Bill       |                | Brown     | bill      |
      | Bob        |                | Barker    | bob       |
      | Sam        |                | Cook      | sam       |
    And I am in Bill's browser
    And I am logged in as "bill" with password "<PASSWORD>" at "CUSN"
    When I go to the messaging page
    Then I should not see recieved message "Hi Bill!"

    Given I am in Sam's browser
    And I am logged in as "sam" with password "<PASSWORD>" at "AML"
    When I go to the messaging page
    Then I should not see recieved message "Hi Bill!"

    Given I am in Bob's browser
    And I am logged in as "bob" with password "<PASSWORD>" at "CUSS"
    When I go to the messaging page
    And I click "CUSN"
    And I fill in "message_content" with "Hi Bill!"
    And I press the "enter" key
    Then I should see my message "Hi Bill!"
    And I should nothing in the "message_content" text field

    Given I am in Sam's browser
    When I wait 1 second
    Then I should not see recieved message "Hi Bill!"

    Given I am in Bill's browser
    When I wait 1 second
    Then I should see recieved message "Hi Bill!"

    Given I click on the recieved message

    Given I am in Bob's browser
    When I wait 1 second
    Then I should see "bill" read this
{'fraction_non_alphanumeric': 0.05530973451327434, 'fraction_numerical': 0.0031605562579013905, 'mean_word_length': 2.0908203125, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2613573', 'n_tokens_mistral': 946, 'n_tokens_neox': 893, 'n_words': 472}