Skip to content

Commit 1f838c6

Browse files
committed
MOBILE-3320 behat: Update login tests
1 parent e1686c6 commit 1f838c6

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed
Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@mod @mod_login @app @app_upto3.9.4 @javascript
1+
@mod @mod_login @app @javascript
22
Feature: Test basic usage of login in app
33
I need basic login functionality to work
44

@@ -17,50 +17,48 @@ Feature: Test basic usage of login in app
1717
| student2 | C1 | student |
1818
| teacher1 | C1 | editingteacher |
1919

20-
@app @3.8.0
2120
Scenario: Add a new site in the app & Site name in displayed when adding a new site
2221
When I enter the app
2322
And I press the back button in the app
24-
And I set the field "https://campus.example.edu" to "$WWWROOT" in the app
23+
And I set the field "Your site" to "$WWWROOT" in the app
2524
And I press "Connect to your site" in the app
26-
Then I should see "Acceptance test site"
25+
Then I should find "Acceptance test site" in the app
2726

2827
When I set the field "Username" to "student1" in the app
2928
And I set the field "Password" to "student1" in the app
3029
And I press "Log in" near "Forgotten your username or password?" in the app
31-
Then I should see "Acceptance test site"
32-
But I should not see "Log in"
30+
Then I should find "Acceptance test site" in the app
31+
But I should not find "Log in" in the app
3332

34-
@app @3.8.0
3533
Scenario: Add a non existing site
3634
When I enter the app
3735
And I log in as "student1"
38-
And I press "menu" in the app
36+
And I press the main menu button in the app
3937
And I press "Change site" in the app
40-
And I press "add" in the app
41-
And I set the field "https://campus.example.edu" to "Wrong Site Address" in the app
38+
And I press "Add" in the app
39+
And I set the field "Your site" to "Wrong Site Address" in the app
4240
And I press enter in the app
43-
Then I should see "Cannot connect"
44-
And I should see "Please check the address is correct."
41+
Then I should find "Cannot connect" in the app
42+
And I should find "Please check the address is correct." in the app
4543

46-
@app @3.8.0
4744
Scenario: Delete a site
4845
When I enter the app
4946
And I log in as "student1"
50-
And I press "menu" in the app
47+
And I press the main menu button in the app
5148
And I press "Change site" in the app
52-
Then I should see "Acceptance test site"
49+
Then I should find "Acceptance test site" in the app
5350
And I press "Delete" in the app
54-
And I press "trash" in the app
55-
And I press "Delete" in the app
56-
Then I should see "Connect to Moodle"
57-
But I should not see "Acceptance test site"
51+
And I press "Delete" near "Acceptance test site" in the app
52+
And I press "Delete" near "Are you sure you want to delete the site Acceptance test site?" in the app
53+
Then I should find "Connect to Moodle" in the app
54+
But I should not find "Acceptance test site" in the app
5855

59-
@app @3.8.0
6056
Scenario: Require minium version of the app for a site
57+
58+
# Log in with a previous required version
6159
When I enter the app
6260
And I log in as "teacher1"
63-
And I press "menu" in the app
61+
And I press the main menu button in the app
6462
And I press "Website" in the app
6563
And I switch to the browser tab opened by the app
6664
And I follow "Log in"
@@ -72,8 +70,11 @@ Feature: Test basic usage of login in app
7270
And I press "Save changes"
7371
And I close the browser tab opened by the app
7472
And I enter the app
75-
And I log in as "teacher1"
76-
And I press "menu" in the app
73+
Then I should not find "App update required" in the app
74+
75+
# Log in with a future required version
76+
When I log in as "teacher1"
77+
And I press the main menu button in the app
7778
And I press "Website" in the app
7879
And I switch to the browser tab opened by the app
7980
And I follow "Log in"
@@ -85,4 +86,4 @@ Feature: Test basic usage of login in app
8586
And I press "Save changes"
8687
And I close the browser tab opened by the app
8788
And I enter the app
88-
Then I should see "App update required"
89+
Then I should find "App update required" in the app

0 commit comments

Comments
 (0)