<commit_before>@javascript
Feature: Close account
 In order to close an existing account
 As a user
 I want to sign in, close my account and try to log in again

  Scenario: user closes account
    Given I am signed in
    When I go to the users edit page
    And I follow "close_account"
    And I put in my password in "close_account_password" in the modal window
    And I press "close_account_confirm" in the modal window
    And I confirm the alert
    Then I should be on the new user session page

    When I try to sign in manually
    Then I should be on the new user session page
    And I should see a flash message with a warning

  Scenario: post display should not throw error when mention is removed for the user whose account is closed
    Given following users exist:
      | username    | email             |
      | <NAME>   | <EMAIL>       |
      | <NAME> | <EMAIL> |
    And a user with email "<EMAIL>" is connected with "<EMAIL>"
    And Alice has a post mentioning Bob

    Then I sign in as "<EMAIL>"
    When I go to the users edit page
    And I follow "close_account"
    And I put in my password in "close_account_password" in the modal window
    And I press "close_account_confirm" in the modal window
    And I confirm the alert
    Then I sign in as "<EMAIL>"
    #TODO: find out why the automatic login here doesn't work anymore
    And I try to sign in manually
    And I am on the home page
    Then I should see "<NAME>"<commit_msg>remove manual sign in from close account cuke<commit_after>@javascript
Feature: Close account
 In order to close an existing account
 As a user
 I want to sign in, close my account and try to log in again

  Scenario: user closes account
    Given I am signed in
    When I go to the users edit page
    And I follow "close_account"
    And I put in my password in "close_account_password" in the modal window
    And I press "close_account_confirm" in the modal window
    And I confirm the alert
    Then I should be on the new user session page

    When I try to sign in manually
    Then I should be on the new user session page
    And I should see a flash message with a warning

  Scenario: post display should not throw error when mention is removed for the user whose account is closed
    Given following users exist:
      | username    | email             |
      | <NAME>   | <EMAIL>       |
      | <NAME> | <EMAIL> |
    And a user with email "<EMAIL>" is connected with "<EMAIL>"
    And Alice has a post mentioning Bob

    Then I sign in as "<EMAIL>"
    When I go to the users edit page
    And I follow "close_account"
    And I put in my password in "close_account_password" in the modal window
    And I press "close_account_confirm" in the modal window
    And I confirm the alert
    Then I should be on the new user session page
    When I sign in as "<EMAIL>"
    And I am on the home page
    Then I should see "<NAME>"
{'fraction_non_alphanumeric': 0.04080932784636488, 'fraction_numerical': 0.0, 'mean_word_length': 2.7493573264781492, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '4924842', 'n_tokens_mistral': 778, 'n_tokens_neox': 766, 'n_words': 468}