'Scenario: Upload profile image does not work for < 100 Bytes image file.
Given that I am on my profile page with public access
And I can see default image
When I move my cursor to the image
Then i can see the upload/remove image text
When i upload new < 100 Bytes image via file uploader
Then i can see the error message for minimum file size limit
And i can still see the default image after page reload.'

def test_user_can_see_error_for_file_size_below_the_min_limit(self):

    (username, user_id) = self.log_in_as_unique_user()
    profile_page = self.visit_profile_page(username, privacy=self.PRIVACY_PUBLIC)
    self.assert_default_image_has_public_access(profile_page)
    profile_page.upload_file(filename='list-icon-visited.png')
    self.assertEqual(profile_page.profile_image_message, 'The    file    must    be    at    least    100    bytes    in    size.')
    profile_page.visit()
    self.assertTrue(profile_page.profile_has_default_image)
    self.assert_no_matching_events_were_emitted({'event_type': self.USER_SETTINGS_CHANGED_EVENT_NAME, 'event': {'setting': 'profile_image_uploaded_at', 'user_id': int(user_id)}})
