<commit_before>@webUI @insulated @disablePreviews @mailhog

Feature: reset the password using an email address
As a user
I want to reset my password using an email address
So that I can login to my account again after forgetting the password

	Background:
		Given these users have been created but not initialized:
			| username | password  | displayname | email        |
			| user1    | %regular% | User One    | <EMAIL> |
		And the user has browsed to the login page
		And the user logs in with email "<EMAIL>" and invalid password "%<PASSWORD>%" using the webUI

	@smokeTest
	Scenario: send password reset email
		When the user requests the password reset link using the webUI
		Then a message with this text should be displayed on the webUI:
			"""
			The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders. If it is not there ask your local administrator.
			"""
		And the email address "<EMAIL>" should have received an email with the body containing
			"""
			Use the following link to reset your password: <a href=
			"""

	@skipOnEncryption
	@smokeTest
	Scenario: reset password for the ordinary (no encryption) case
		When the user requests the password reset link using the webUI
		And the user follows the password reset link from email address "<EMAIL>"
		Then the user should be redirected to a webUI page with the title "ownCloud"
		When the user resets the password to "%alt1%" using the webUI
		Then the email address "<EMAIL>" should have received an email with the body containing
			"""
			Password changed successfully
			"""
		When the user logs in with username "user1" and password "%<PASSWORD>%" using the webUI<commit_msg>Add @skip to skip the failing step<commit_after>@webUI @insulated @disablePreviews @mailhog

Feature: reset the password using an email address
As a user
I want to reset my password using an email address
So that I can login to my account again after forgetting the password

	Background:
		Given these users have been created but not initialized:
			| username | password  | displayname | email        |
			| user1    | %regular% | User One    | <EMAIL> |
		And the user has browsed to the login page
		And the user logs in with email "<EMAIL>" and invalid password "%<PASSWORD>%" using the webUI

	@smokeTest
	Scenario: send password reset email
		When the user requests the password reset link using the webUI
		Then a message with this text should be displayed on the webUI:
			"""
			The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders. If it is not there ask your local administrator.
			"""
		And the email address "<EMAIL>" should have received an email with the body containing
			"""
			Use the following link to reset your password: <a href=
			"""

	@skipOnEncryption
	@smokeTest
	@skip @issue-32868
	Scenario: reset password for the ordinary (no encryption) case
		When the user requests the password reset link using the webUI
		And the user follows the password reset link from email address "<EMAIL>"
		Then the user should be redirected to a webUI page with the title "ownCloud"
		When the user resets the password to "%<PASSWORD>%" using the webUI
		Then the email address "<EMAIL>" should have received an email with the body containing
			"""
			Password changed successfully
			"""
		When the user logs in with username "user1" and password "%<PASSWORD>%" using the webUI
{'fraction_non_alphanumeric': 0.05487977369165488, 'fraction_numerical': 0.002828854314002829, 'mean_word_length': 3.8240109140518417, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 18, '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': '5530974', 'n_tokens_mistral': 985, 'n_tokens_neox': 896, 'n_words': 529}