-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
THREESCALE-10074: Do not reveal that email doesn't exist on Forgot pa…
…ssword form (#3837) * Do not reveal that email doesn't exist on Forgot password form * Some fixes * Reorganize cucumbers for password reset
- Loading branch information
Showing
6 changed files
with
92 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,88 @@ | ||
Feature: Buyer signup | ||
Feature: Buyer password reset | ||
I want to reset my password as a buyer | ||
|
||
Background: | ||
Given a provider exists | ||
And the default product of provider "master" has name "Master API" | ||
And the following application plan: | ||
| Product | Name | | ||
| Master API | enterprise | | ||
And the provider has bot protection enabled | ||
And the provider account allows signups | ||
|
||
@recaptcha | ||
Scenario: Bot protection doesn't detect the client as a bot | ||
And the client will be marked as a bot | ||
When the buyer wants to reset their password | ||
And the buyer fills in the form | ||
Then the page should contain "Bot protection failed." | ||
Rule: ReCAPTCHA protects from bots | ||
Background: | ||
Given the provider has bot protection enabled | ||
|
||
@recaptcha | ||
Scenario: Bot protection doesn't detect the client as a bot | ||
And the client won't be marked as a bot | ||
When the buyer wants to reset their password | ||
And the buyer fills in the form | ||
Then the page should contain "Email not found." | ||
@recaptcha | ||
Scenario: Bot protection doesn't detect the client as a bot | ||
Given the client will be marked as a bot | ||
When the buyer wants to reset their password | ||
And the buyer fills in the form | ||
Then the page should contain "Bot protection failed." | ||
|
||
@recaptcha | ||
Scenario: Bot protection doesn't detect the client as a bot | ||
Given the client won't be marked as a bot | ||
When the buyer wants to reset their password | ||
And the buyer fills in the form | ||
Then the page should contain "A password reset link will be sent" | ||
|
||
Rule: Reset password flow for different scenarios | ||
Background: | ||
Given a buyer "bob" signed up to the provider | ||
And an active user "zed" of account "bob" with email "zed@3scale.localhost" | ||
And the current domain is foo.3scale.localhost | ||
And they go to the login page | ||
|
||
Scenario: Reset password of an existing user | ||
Given they follow "Forgot password?" | ||
And they fill in "Email" with "zed@3scale.localhost" | ||
And they press "Send instructions" | ||
Then they should see "A password reset link will be sent to zed@3scale.localhost if a user exists with this email." | ||
When they follow the link found in the password reset email send to "zed@3scale.localhost" | ||
And they fill in "Password" with "monkey" | ||
And they fill in "Password confirmation" with "monkey" | ||
And they press "Change Password" | ||
Then they should see "The password has been changed" | ||
|
||
When they go to the login page | ||
And they fill in "Username" with "zed@3scale.localhost" | ||
And they fill in "Password" with "monkey" | ||
And they press "Sign in" | ||
Then they should be logged in as "zed" | ||
|
||
Scenario: Invalid email | ||
Given no user exists with an email of "bob@3scale.localhost" | ||
And they follow "Forgot password?" | ||
And they fill in "Email" with "bob@3scale.localhost" | ||
And they press "Send instructions" | ||
Then they should see "A password reset link will be sent to bob@3scale.localhost if a user exists with this email." | ||
And "bob@3scale.localhost" should receive no emails | ||
|
||
Scenario: Wrong confirmation | ||
Given they follow "Forgot password?" | ||
And they fill in "Email" with "zed@3scale.localhost" | ||
And they press "Send instructions" | ||
And they follow the link found in the password reset email send to "zed@3scale.localhost" | ||
And they fill in "Password" with "monkey" | ||
And they fill in "Password confirmation" with "donkey" | ||
And they press "Change Password" | ||
Then they should see the password confirmation error | ||
And the password of user "zed" should not be "monkey" | ||
|
||
Scenario: Blank passwords | ||
When they follow "Forgot password?" | ||
And they fill in "Email" with "zed@3scale.localhost" | ||
And they press "Send instructions" | ||
And they follow the link found in the password reset email send to "zed@3scale.localhost" | ||
And they press "Change Password" | ||
Then they should see "The password is invalid" | ||
|
||
Scenario: Invalid token | ||
When they go to the password page with invalid password reset token | ||
Then they should see "The password reset token is invalid" | ||
|
||
Scenario: Attempt to login with invalid credentials, then reset password | ||
Given they fill in "Username" with "zed@3scale.localhost" | ||
And they fill in "Password" with "ihavenoclue" | ||
And they press "Sign in" | ||
Then they should see "Incorrect email or password. Please try again." | ||
When they follow "Forgot password?" | ||
And they fill in "Email" with "zed@3scale.localhost" | ||
And they press "Send instructions" | ||
Then they should see "A password reset link will be sent to zed@3scale.localhost if a user exists with this email." |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters