MOBILE-3320 behat: Update login tests
parent
475811518a
commit
3d3dc9c7b1
|
@ -1,4 +1,4 @@
|
|||
@mod @mod_login @app @app_upto3.9.4 @javascript
|
||||
@mod @mod_login @app @javascript
|
||||
Feature: Test basic usage of login in app
|
||||
I need basic login functionality to work
|
||||
|
||||
|
@ -17,50 +17,48 @@ Feature: Test basic usage of login in app
|
|||
| student2 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
|
||||
@app @3.8.0
|
||||
Scenario: Add a new site in the app & Site name in displayed when adding a new site
|
||||
When I enter the app
|
||||
And I press the back button in the app
|
||||
And I set the field "https://campus.example.edu" to "$WWWROOT" in the app
|
||||
And I set the field "Your site" to "$WWWROOT" in the app
|
||||
And I press "Connect to your site" in the app
|
||||
Then I should see "Acceptance test site"
|
||||
Then I should find "Acceptance test site" in the app
|
||||
|
||||
When I set the field "Username" to "student1" in the app
|
||||
And I set the field "Password" to "student1" in the app
|
||||
And I press "Log in" near "Forgotten your username or password?" in the app
|
||||
Then I should see "Acceptance test site"
|
||||
But I should not see "Log in"
|
||||
Then I should find "Acceptance test site" in the app
|
||||
But I should not find "Log in" in the app
|
||||
|
||||
@app @3.8.0
|
||||
Scenario: Add a non existing site
|
||||
When I enter the app
|
||||
And I log in as "student1"
|
||||
And I press "menu" in the app
|
||||
And I press the main menu button in the app
|
||||
And I press "Change site" in the app
|
||||
And I press "add" in the app
|
||||
And I set the field "https://campus.example.edu" to "Wrong Site Address" in the app
|
||||
And I press "Add" in the app
|
||||
And I set the field "Your site" to "Wrong Site Address" in the app
|
||||
And I press enter in the app
|
||||
Then I should see "Cannot connect"
|
||||
And I should see "Please check the address is correct."
|
||||
Then I should find "Cannot connect" in the app
|
||||
And I should find "Please check the address is correct." in the app
|
||||
|
||||
@app @3.8.0
|
||||
Scenario: Delete a site
|
||||
When I enter the app
|
||||
And I log in as "student1"
|
||||
And I press "menu" in the app
|
||||
And I press the main menu button in the app
|
||||
And I press "Change site" in the app
|
||||
Then I should see "Acceptance test site"
|
||||
Then I should find "Acceptance test site" in the app
|
||||
And I press "Delete" in the app
|
||||
And I press "trash" in the app
|
||||
And I press "Delete" in the app
|
||||
Then I should see "Connect to Moodle"
|
||||
But I should not see "Acceptance test site"
|
||||
And I press "Delete" near "Acceptance test site" in the app
|
||||
And I press "Delete" near "Are you sure you want to delete the site Acceptance test site?" in the app
|
||||
Then I should find "Connect to Moodle" in the app
|
||||
But I should not find "Acceptance test site" in the app
|
||||
|
||||
@app @3.8.0
|
||||
Scenario: Require minium version of the app for a site
|
||||
|
||||
# Log in with a previous required version
|
||||
When I enter the app
|
||||
And I log in as "teacher1"
|
||||
And I press "menu" in the app
|
||||
And I press the main menu button in the app
|
||||
And I press "Website" in the app
|
||||
And I switch to the browser tab opened by the app
|
||||
And I follow "Log in"
|
||||
|
@ -72,8 +70,11 @@ Feature: Test basic usage of login in app
|
|||
And I press "Save changes"
|
||||
And I close the browser tab opened by the app
|
||||
And I enter the app
|
||||
And I log in as "teacher1"
|
||||
And I press "menu" in the app
|
||||
Then I should not find "App update required" in the app
|
||||
|
||||
# Log in with a future required version
|
||||
When I log in as "teacher1"
|
||||
And I press the main menu button in the app
|
||||
And I press "Website" in the app
|
||||
And I switch to the browser tab opened by the app
|
||||
And I follow "Log in"
|
||||
|
@ -85,4 +86,4 @@ Feature: Test basic usage of login in app
|
|||
And I press "Save changes"
|
||||
And I close the browser tab opened by the app
|
||||
And I enter the app
|
||||
Then I should see "App update required"
|
||||
Then I should find "App update required" in the app
|
||||
|
|
Loading…
Reference in New Issue