templates/devise/cucumber.rb in prologue-0.2.0 vs templates/devise/cucumber.rb in prologue-0.3.0
- old
+ new
@@ -70,6 +70,53 @@
'/users/sign_out'
when /login/
'/users/sign_in'
FILE
+end
+
+create_file 'features/forgot_password.feature' do
+<<-'FILE'
+Feature: Forgot password
+ As an user
+ I want to secure way to reset my password
+ So that I can still login if I forget it
+
+ Scenario: Follow forget your password link
+ Given the following user records
+ | email |
+ | forgot@quickleft.com |
+ When I am on the login page
+ And I follow "Forgot your password?"
+ And I fill in "Email" with "forgot@quickleft.com"
+ And I press "Send me reset password instructions"
+ Then I should see "You will receive an email with instructions about how to reset your password in a few minutes."
+ And 1 emails should be delivered to forgot@quickleft.com
+ When I click the first link in the email
+ And I fill in "Password" with "myNewP@ssword"
+ And I fill in "Password confirmation" with "myNewP@ssword"
+ And I press "Change my password"
+ Then I should see "Your password was changed successfully. You are now signed in."
+FILE
+end
+
+create_file 'features/resend_verification_email.feature' do
+<<-'FILE'
+Feature: Resend Verification
+ As an user
+ I want to resend my verification email
+ So that I can activate my account if I lost the original email
+
+ Scenario: Follow resend verification email
+ Given the following user records
+ | email | confirmed_at |
+ | resend@quickleft.com | nil |
+ When I am on the login page
+ And I follow "Didn't receive confirmation instructions?"
+ And I fill in "Email" with "resend@quickleft.com"
+ And I press "Resend confirmation instructions"
+ Then I should see "You will receive an email with instructions about how to confirm your account in a few minutes."
+ And 2 emails should be delivered to resend@quickleft.com
+ When I click the first link in the email
+ Then I should see "Your account was successfully confirmed. You are now signed in."
+FILE
end
\ No newline at end of file