<commit_before>Feature:
  So that all child records contains a photo of that child
  As a field agent using the website
  I want to upload a picture of the child record that I'm adding

Scenario: Uploading a standard JPG image
  Given I am on the new child page
  When I fill in the basic details of a child
  And I attach the file "features/resources/jorge.jpg" to "photo"
  And I press "Create"
  Then I should see "Child record successfully created"
  And I should see the photo of the child

Scenario: Uploading an image of type other than JPG
  Given I am on the new child page
  When I fill in the basic details of a child
  And I attach the file "features/resources/jeff.png" to "photo"
  And I press "Create"
  Then I should see "Child record successfully created"
  And I should see the photo of the child with a "png" extension

Scenario: Uploading an invalid file in the image field
  Given I am on the new child page
  When I fill in the basic details of a child
  And I attach the file "features/resources/textfile.txt" to "photo"
  And I press "Create"
  Then I should see "Please upload a valid photo file (jpg or png) for this child record"
  
<commit_msg>added a scenario to validate the error message when no photo is uploaded<commit_after>Feature:
  So that all child records contains a photo of that child
  As a field agent using the website
  I want to upload a picture of the child record that I'm adding

Scenario: Uploading a standard JPG image
  Given I am on the new child page
  When I fill in the basic details of a child
  And I attach the file "features/resources/jorge.jpg" to "photo"
  And I press "Create"
  Then I should see "Child record successfully created"
  And I should see the photo of the child

Scenario: Uploading an image of type other than JPG
  Given I am on the new child page
  When I fill in the basic details of a child
  And I attach the file "features/resources/jeff.png" to "photo"
  And I press "Create"
  Then I should see "Child record successfully created"
  And I should see the photo of the child with a "png" extension

Scenario: Uploading an invalid file in the image field
  Given I am on the new child page
  When I fill in the basic details of a child
  And I attach the file "features/resources/textfile.txt" to "photo"
  And I press "Create"
  Then I should see "Please upload a valid photo file (jpg or png) for this child record"

Scenario: I do not upload a photo
  Given I am on the new child page
  And I press "Create"
  Then I should see "Please upload a valid photo file (jpg or png) for this child record"
{'fraction_non_alphanumeric': 0.03756777691711851, 'fraction_numerical': 0.0, 'mean_word_length': 3.5797872340425534, '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': '2256784', 'n_tokens_mistral': 714, 'n_tokens_neox': 707, 'n_words': 450}