MOBILE-4081 behat: Fix tests for 3.9

main
Noel De Martin 2022-11-17 16:03:16 +01:00
parent f58c959091
commit 7f11a9377d
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,43 @@
@auth @core_auth @app @javascript @lms_upto3.9
Feature: Test signup in app
I need basic signup functionality to work
Background:
Given the following config values are set as admin:
| registerauth | email |
| auth_instructions | These are the authentication instructions. |
| passwordpolicy | 0 |
Scenario: Check password policy in signup
Given the following config values are set as admin:
| passwordpolicy | 1 |
| minpasswordlength | 8 |
| minpassworddigits | 1 |
| minpasswordlower | 1 |
| minpasswordupper | 1 |
| minpasswordnonalphanum | 1 |
When I launch the app
And I set the field "Your site" to "$WWWROOT" in the app
And I press "Connect to your site" in the app
And I press "Create new account" in the app
Then I should find "The password must have at least 8 characters" in the app
And I set the following fields to these values in the app:
| Username | u1 |
| Password | pu1 |
| Email address | u1@u1.com |
| Email (again) | u1@u1.com |
| First name | User |
| Surname | Test |
| City/town | Barcelona |
| Country | Spain |
And I press "Create my new account" in the app
Then I should find "Error" in the app
And I should find "Passwords must be at least 8 characters long" in the app
And I should find "Passwords must have at least 1 upper case letter(s)" in the app
And I should find "Passwords must have at least 1 non-alphanumeric character(s)" in the app
But I should not find "An email should have been sent to your address" in the app
When I press "OK" in the app
And I set the field "Password" to "Password1$" in the app
And I press "Create my new account" in the app
Then I should find "An email should have been sent to your address" in the app

View File

@ -78,6 +78,7 @@ Feature: Test signup in app
Then I should find "Barcelona, Spain" in the app
And I should find "u1@u1.com" in the app
@lms_from3.10
Scenario: Check password policy in signup
Given the following config values are set as admin:
| passwordpolicy | 1 |