MDL-63977 Behat: Upgrade mobile tests to work with 3.6 app version

This commit is contained in:
sam marshall 2019-01-15 14:31:25 +00:00
parent 1959e16412
commit e0564a3264
3 changed files with 36 additions and 5 deletions

View file

@ -46,7 +46,7 @@ Feature: Test course list shown on app start tab
Scenario: Student uses course list to enter course, then leaves it again
When I enter the app
And I log in as "student2" in the app
And I press "Course 2" in the app
And I press "Course 2" near "Course overview" in the app
Then the header should be "Course 2" in the app
And I press the back button in the app
Then the header should be "Acceptance test site" in the app
@ -66,6 +66,33 @@ Feature: Test course list shown on app start tab
| student2 | C4 | student |
| student2 | C5 | student |
| student2 | C6 | student |
# Create bogus courses so that the main ones aren't shown in the 'recently accessed' part.
# Because these come later in alphabetical order, they may not be displayed in the lower part
# which is OK.
And the following "courses" exist:
| fullname | shortname |
| Zogus 1 | Z1 |
| Zogus 2 | Z2 |
| Zogus 3 | Z3 |
| Zogus 4 | Z4 |
| Zogus 5 | Z5 |
| Zogus 6 | Z6 |
| Zogus 7 | Z7 |
| Zogus 8 | Z8 |
| Zogus 9 | Z9 |
| Zogus 10 | Z10 |
And the following "course enrolments" exist:
| user | course | role |
| student2 | Z1 | student |
| student2 | Z2 | student |
| student2 | Z3 | student |
| student2 | Z4 | student |
| student2 | Z5 | student |
| student2 | Z6 | student |
| student2 | Z7 | student |
| student2 | Z8 | student |
| student2 | Z9 | student |
| student2 | Z10 | student |
When I enter the app
And I log in as "student2" in the app
Then I should see "C1"
@ -74,6 +101,7 @@ Feature: Test course list shown on app start tab
And I should see "C4"
And I should see "C5"
And I should see "C6"
And I press "more" near "Course overview" in the app
And I press "Filter my courses" in the app
And I set the field "Filter my courses" to "fr" in the app
Then I should not see "C1"
@ -82,6 +110,7 @@ Feature: Test course list shown on app start tab
And I should see "C4"
And I should not see "C5"
And I should not see "C6"
And I press "more" near "Course overview" in the app
And I press "Filter my courses" in the app
Then I should see "C1"
And I should see "C2"

View file

@ -399,7 +399,9 @@
selector = 'page-core-mainmenu .tab-button > ion-icon[aria-label=more]';
break;
case 'page menu' :
selector = 'core-context-menu > button[aria-label=Info]';
// This lang string was changed in app version 3.6.
selector = 'core-context-menu > button[aria-label=Info], ' +
'core-context-menu > button[aria-label=Information]';
break;
default:
return 'ERROR: Unsupported standard button type';

View file

@ -21,7 +21,7 @@ Feature: Test basic usage in app
Scenario: Student starts a discussion
When I enter the app
And I log in as "student1" in the app
And I press "Course 1" in the app
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "My happy subject" in the app
@ -33,7 +33,7 @@ Feature: Test basic usage in app
Scenario: Student posts a reply
When I enter the app
And I log in as "student1" in the app
And I press "Course 1" in the app
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject" in the app
@ -50,7 +50,7 @@ Feature: Test basic usage in app
When I enter the app
And I change viewport size to "360x640"
And I log in as "student1" in the app
And I press "Course 1" in the app
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press the page menu button in the app
And I press "Open in browser" in the app