Fix broken behat tests

This commit is contained in:
Pau Ferrer Ocaña 2022-02-22 11:00:18 +01:00
parent 77c5418f0c
commit 338258a4ad
8 changed files with 20 additions and 22 deletions

@ -120,7 +120,7 @@ Feature: Test basic usage of assignment activity in app
When I switch offline mode to "false"
And I press the back button in the app
And I press "assignment1" in the app
And I press "Display options" in the app
And I press "Information" in the app
And I press "Refresh" in the app
Then I should find "Submitted for grading" in the app
But I should not find "This Assignment has offline data to be synchronised." in the app

@ -93,7 +93,7 @@ Feature: Test basic usage of choice activity in app
And I press "Test single choice name" in the app
Then I should find "Test single choice description" in the app
When I press "Display options" in the app
When I press "Information" in the app
And I press "Refresh" in the app
Then I should find "Option 1: 0" in the app
And I should find "Option 2: 1" in the app
@ -132,7 +132,7 @@ Feature: Test basic usage of choice activity in app
| choice | Test multi choice name | Test multi choice description | C1 | choice2 | Option 1, Option 2, Option 3 | 1 | 1 | 1 |
| choice | Test single choice name | Test single choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 0 | 0 | 1 |
When I enter the course "Course 1" as "student1" in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Course downloads" in the app
And I press "Download" within "Test single choice name" "ion-item" in the app
Then I should find "Downloaded" within "Test single choice name" "ion-item" in the app
@ -182,7 +182,7 @@ Feature: Test basic usage of choice activity in app
And I press "Choice name" in the app
Then I should find "Test choice description" in the app
When I press "Display options" in the app
When I press "Information" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"

@ -402,7 +402,6 @@ Feature: Test basic usage of one course in app
Scenario: Self enrol
Given I enter the course "Course 1" as "teacher1" in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
@ -437,7 +436,6 @@ Feature: Test basic usage of one course in app
Scenario: Guest access
Given I enter the course "Course 1" as "teacher1" in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
@ -451,7 +449,7 @@ Feature: Test basic usage of one course in app
And I press "Site home" in the app
And I press "Available courses" in the app
And I press "Course 1" in the app
Then I should find "Download course" in the app
Then I should find "Course downloads" in the app
And I should find "Course" in the app
When I press "Course" "ion-button" in the app

@ -103,12 +103,11 @@ Feature: Test basic usage of courses in app
# Configure assignment as teacher
When I enter the course "Course 1" as "teacher1" in the app
And I press "assignment" in the app
And I press "Display options" in the app
And I press "Information" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I press "Actions menu"
And I follow "Settings"
And I navigate to "Settings" in current page administration
And I press "Expand all"
And I click on "duedate[enabled]" "checkbox"
And I click on "gradingduedate[enabled]" "checkbox"

@ -182,7 +182,7 @@ Feature: Test basic usage of forum activity in app
Then I should find "Auto-test" in the app
When I press the back button in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Course downloads" in the app
And I press "Download" within "Test forum name" "ion-item" in the app
And I press the back button in the app
@ -209,7 +209,7 @@ Feature: Test basic usage of forum activity in app
Then I should find "Auto-test" in the app
When I press the back button in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Course downloads" in the app
And I press "Download" within "Test forum name" "ion-item" in the app
And I press the back button in the app
@ -256,7 +256,7 @@ Feature: Test basic usage of forum activity in app
And I switch offline mode to "true"
And I press "None" near "test2" in the app
And I press "0" near "Cancel" in the app
Then I should find "Data stored in the device because it couldn't be sent. It will be sent automatically later." in the app
Then I should find "Data stored in the device because it couldn't be sent. It will be sent automatically later." inside the toast in the app
And I should find "Average of ratings: -" in the app
And I should find "Average of ratings: 1" in the app
@ -264,7 +264,7 @@ Feature: Test basic usage of forum activity in app
And I press the back button in the app
Then I should find "This Forum has offline data to be synchronised." in the app
When I press "Display options" near "Test forum name" in the app
When I press "Information" near "Test forum name" in the app
And I press "Synchronise now" in the app
Then I should not find "This Forum has offline data to be synchronised." in the app
@ -288,7 +288,7 @@ Feature: Test basic usage of forum activity in app
And I set the field "Message" to "DiscussionMessage" in the app
And I press "Post to forum" in the app
And I press the back button in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Course downloads" in the app
And I press "Download" within "Test forum name" "ion-item" in the app
And I press the back button in the app
@ -326,8 +326,8 @@ Feature: Test basic usage of forum activity in app
When I switch offline mode to "false"
And I press the back button in the app
And I press "Test forum name" in the app
And I press "Display options" near "Test forum name" in the app
And I press "Refresh discussions" in the app
And I press "Information" near "Test forum name" in the app
And I press "Refresh" in the app
And I press "DiscussionSubject" near "Sort by last post creation date in descending order" in the app
Then I should find "DiscussionSubject" in the app
And I should find "DiscussionMessage" in the app
@ -367,7 +367,7 @@ Feature: Test basic usage of forum activity in app
Then I should find "DiscussionSubject 1" in the app
When I press the back button in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Course downloads" in the app
And I press "Download" within "Test forum name" "ion-item" in the app
Then I should find "Downloaded" within "Test forum name" "ion-item" in the app

@ -156,7 +156,7 @@ Feature: Attempt a quiz in app
When I enter the course "Course 1" as "teacher1" in the app
And I press "Quiz 1" in the app
And I press "Display options" in the app
And I press "Information" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"

@ -32,11 +32,12 @@ Feature: It opens external links properly.
When I close the browser tab opened by the app
And I press the back button in the app
And I press the page menu button in the app
And I press "Information" in the app
And I press "Open in browser" in the app
Then the app should have opened a browser tab
When I close the browser tab opened by the app
When I close the popup in the app
And I press "Forum topic" in the app
And I press "moodle.org" in the app
And I select "Don't show again." in the app

@ -44,7 +44,7 @@ Feature: It navigates properly within settings.
When I press the back button in the app
And I press "Manage downloads" in the app
Then I should find "Total space usage" in the app
Then I should find "Total space used" in the app
Scenario: Tablet navigation
Given I enter the app
@ -79,4 +79,4 @@ Feature: It navigates properly within settings.
When I press "Manage downloads" in the app
Then "Manage downloads" should be selected in the app
And I should find "Total space usage" in the app
And I should find "Total space used" in the app