<commit_before>Feature: User updates profile information
  In order to change the information the other users see in my profile page
  As a user
  I want to able to update my profile information

  @javascript
  Scenario: Updating profile successfully
    Given there are following users:
      | person | 
      | kassi_testperson2 |
    And I am logged in as "kassi_testperson2"
    When I follow "Settings"
    And I fill in "Given name*:" with "Test"
    And I fill in "Family name*:" with "Dude"
    And I fill in "Street address" with "Test Street 1"
    And I fill in "Postal code" with "11111"
    And I fill in "City" with "Turku"
    And I fill in "Phone number" with "0700-715517"
    And I fill in "About you:" with "Some random text about me"
    And I press "Save information"
    Then I should see "Information updated" within "#notifications"
    And the "Given name*:" field should contain "Test"
  
  @javascript
  Scenario: Trying to update profile with false information
    Given there are following users:
      | person | 
      | kassi_testperson2 |
    And I am logged in as "kassi_testperson2"
    When I follow "Settings"
    And I fill in "Given name*:" with ""
    And I fill in "Family name*:" with ""
    And I press "Save information"
    Then I should see "This field is required." within ".error"
    When given name and last name are not required in community "test"
    When I follow "Settings"
    And I fill in "Given name*:" with ""
    And I fill in "Family name*:" with ""
    And I press "Save information"
    Then I should see "Information updated" within "#notifications"
<commit_msg>A small fix to the profile update test.<commit_after>Feature: User updates profile information
  In order to change the information the other users see in my profile page
  As a user
  I want to able to update my profile information

  @javascript
  Scenario: Updating profile successfully
    Given there are following users:
      | person | 
      | kassi_testperson2 |
    And I am logged in as "kassi_testperson2"
    When I follow "Settings"
    And I fill in "Given name:" with "Test"
    And I fill in "Family name:" with "Dude"
    And I fill in "Street address" with "Test Street 1"
    And I fill in "Postal code" with "11111"
    And I fill in "City" with "Turku"
    And I fill in "Phone number" with "0700-715517"
    And I fill in "About you:" with "Some random text about me"
    And I press "Save information"
    Then I should see "Information updated" within "#notifications"
    And the "Given name:" field should contain "Test"
  
  @javascript
  Scenario: Trying to update profile with false information
    Given there are following users:
      | person | 
      | kassi_testperson2 |
    And I am logged in as "kassi_testperson2"
    When I follow "Settings"
    And I fill in "Given name:" with ""
    And I fill in "Family name:" with ""
    And I press "Save information"
    Then I should see "This field is required." within ".error"
    When given name and last name are not required in community "test"
    When I follow "Settings"
    And I fill in "Given name:" with ""
    And I fill in "Family name:" with ""
    And I press "Save information"
    Then I should see "Information updated" within "#notifications"

{'fraction_non_alphanumeric': 0.06896551724137931, 'fraction_numerical': 0.012206286237412267, 'mean_word_length': 3.072049689440994, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '371263', 'n_tokens_mistral': 947, 'n_tokens_neox': 908, 'n_words': 477}