MOBILE-4061 behat: Adapt tests to 3.9-4.0 LMS versions

main
Pau Ferrer Ocaña 2022-05-12 15:38:29 +02:00
parent 0457245db2
commit f48885b822
19 changed files with 658 additions and 2 deletions

View File

@ -112,6 +112,7 @@ Feature: Test basic usage of messages in app
And I should find "hi" in the app
And I should find "byee" in the app
# TODO Fix this test in all Moodle versions
Scenario: User profile: send message, add/remove contact
When I enter the app
And I log in as "teacher1"

View File

@ -0,0 +1,60 @@
@mod @mod_assign @app @javascript @lms_upto3.10
Feature: Test basic usage of assignment activity in app
In order to participate in the assignment while using the mobile app
I need basic assignment functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | duedate | attemptreopenmethod |
| assign | C1 | assign1 | assignment1 | Test assignment description1 | 1 | 1029844800 | manual |
Scenario: View assign description, due date & View list of student submissions (as teacher) & View own submission or student submission
# Create, edit and submit as a student
When I enter the course "Course 1" as "student1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I should find "Test assignment description1" in the app
And I should find "Due date" in the app
And I should find "Tuesday, 20 August 2002, 12:00 PM" in the app
When I press "Add submission" in the app
And I set the field "Online text submissions" to "Submission test" in the app
And I press "Save" in the app
Then I should find "Draft (not submitted)" in the app
And I should find "Not graded" in the app
When I press "Edit submission" in the app
And I set the field "Online text submissions" to "Submission test edited" in the app
And I press "Save" in the app
And I press "OK" in the app
Then I should find "Submission test edited" in the app
When I press "Submit assignment" in the app
And I press "OK" in the app
Then I should find "Submitted for grading" in the app
And I should find "Not graded" in the app
And I should find "Submission test edited" in the app
# View as a teacher
When I enter the course "Course 1" as "teacher1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
When I press "Submitted" in the app
Then I should find "Student student" in the app
And I should find "Not graded" in the app
When I press "Student student" near "assignment1" in the app
Then I should find "Online text submissions" in the app
And I should find "Submission test edited" in the app

View File

@ -19,6 +19,7 @@ Feature: Test basic usage of assignment activity in app
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | duedate | attemptreopenmethod |
| assign | C1 | assign1 | assignment1 | Test assignment description1 | 1 | 1029844800 | manual |
@lms_from3.11
Scenario: View assign description, due date & View list of student submissions (as teacher) & View own submission or student submission
# Create, edit and submit as a student
When I enter the course "Course 1" as "student1" in the app

View File

@ -0,0 +1,43 @@
@mod @mod_choice @app @javascript @lms_upto3.11
Feature: Test basic usage of choice activity in app
In order to participate in the choice while using the mobile app
As a student
I need basic choice functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: Download students choice in text format
# Submit answer as student
Given the following "activities" exist:
| activity | name | intro | course | idnumber | option |
| choice | Choice name | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 |
And I enter the course "Course 1" as "student1" in the app
And I press "Choice name" in the app
And I select "Option 2" in the app
And I press "Save my choice" in the app
And I press "OK" in the app
# Download answers as teacher
When I enter the course "Course 1" as "teacher1" in the app
And I press "Choice name" in the app
Then I should find "Test choice description" 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"
And I press "Actions menu"
And I follow "View 1 responses"
And I press "Download in text format"
# TODO Then I should find "..." in the downloads folder

View File

@ -165,6 +165,7 @@ Feature: Test basic usage of choice activity in app
But I should not find "This Choice has offline data to be synchronised." in the app
# TODO remove LMS UI steps in app tests
@lms_from4.0
Scenario: Download students choice in text format
# Submit answer as student
Given the following "activities" exist:

View File

@ -198,6 +198,7 @@ Feature: Test basic usage of forum activity in app
And I press "Save changes" in the app
Then I should find "There was a problem connecting to the site. Please check your connection and try again." in the app
# TODO Fix this test in all Moodle versions
Scenario: Delete a forum post (only online)
When I enter the course "Course 1" as "student1" in the app
And I press "Test forum name" in the app

View File

@ -0,0 +1,145 @@
@mod @mod_course @app @javascript @lms_upto3.11
Feature: Test basic usage of one course in app
In order to participate in one course while using the mobile app
As a student
I need basic course functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
| student2 | Student2 | student2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | option | section |
| choice | Choice course 1 | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 1 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | section |
| assign | C1 | assign1 | assignment | Test assignment description | 1 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | assessed | scale[modgrade_type] |
| forum | Test forum name | Test forum | C1 | forum | 0 | 5 | Point |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| chat | Test chat name | Test chat | C1 | chat | 0 | 2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| data | Web links | Useful links | C1 | data1 | 4 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| lti | Test external name | Test external | C1 | external | 0 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| feedback | Test feedback name | Test feedback | C1 | feedback | 0 | 3 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| glossary | Test glossary | glossary description | C1 | gloss1 | 5 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 2 |
And the following "question categories" exist:
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | Text of the first question |
| Test questions | truefalse | TF2 | Text of the second question |
And quiz "Quiz 1" contains the following questions:
| question | page |
| TF1 | 1 |
| TF2 | 2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| survey | Test survey name | Test survey | C1 | survey | 0 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode |
| wiki | Test wiki name | Test wiki | C1 | wiki | 0 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| lesson | Test lesson name | Test lesson | C1 | lesson | 0 | 3 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| scorm | Test scorm name | Test scorm | C1 | scorm | 0 | 2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| workshop | Test workshop name | Test workshop | C1 | workshop | 0 | 3 |
Scenario: Self enrol
Given I enter the course "Course 1" as "teacher1" 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
And I log in as "teacher1"
And I press "Actions menu"
And I follow "More..."
And I follow "Users"
And I follow "Enrolment methods"
And I click on "Enable" "icon" in the "Self enrolment (Student)" "table_row"
And I close the browser tab opened by the app
When I enter the app
And I log in as "student2"
And I press "Site home" in the app
And I press "Available courses" in the app
And I press "Course 1" in the app
And I press "Enrol me" in the app
And I press "OK" in the app
And I wait loading to finish in the app
Then the header should be "Course 1" in the app
And I should find "Choice course 1" in the app
And I should find "assignment" in the app
And I should find "Test forum name" in the app
And I should find "Test chat name" in the app
And I should find "Web links" in the app
And I should find "Test external name" in the app
And I should find "Test feedback name" in the app
And I should find "Test glossary" in the app
And I should find "Quiz 1" in the app
And I should find "Test survey name" in the app
And I should find "Test wiki name" in the app
And I should find "Test lesson name" in the app
And I should find "Test scorm name" in the app
And I should find "Test workshop name" in the app
Scenario: Guest access
Given I enter the course "Course 1" as "teacher1" 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
And I log in as "teacher1"
And I press "Actions menu"
And I follow "More..."
And I follow "Users"
And I follow "Enrolment methods"
And I click on "Enable" "icon" in the "Guest access" "table_row"
And I close the browser tab opened by the app
When I enter the app
And I log in as "student2"
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 "Course summary" in the app
And I should find "Course" in the app
When I press "View course" "ion-button" in the app
Then the header should be "Course 1" in the app
And I should find "Choice course 1" in the app
And I should find "assignment" in the app
And I should find "Test forum name" in the app
And I should find "Test chat name" in the app
And I should find "Web links" in the app
And I should find "Test feedback name" in the app
And I should find "Test glossary" in the app
And I should find "Quiz 1" in the app
And I should find "Test survey name" in the app
And I should find "Test wiki name" in the app
And I should find "Test lesson name" in the app
And I should find "Test scorm name" in the app
And I should find "Test workshop name" in the app

View File

@ -400,6 +400,7 @@ Feature: Test basic usage of one course in app
And I should not find "Topic 1" in the app
And I should not find "Topic 2" in the app
@lms_from4.0
Scenario: Self enrol
Given I enter the course "Course 1" as "teacher1" in the app
And I press "Course summary" in the app
@ -434,6 +435,7 @@ Feature: Test basic usage of one course in app
And I should find "Test scorm name" in the app
And I should find "Test workshop name" in the app
@lms_from4.0
Scenario: Guest access
Given I enter the course "Course 1" as "teacher1" in the app
And I press "Course summary" in the app

View File

@ -0,0 +1,34 @@
@core @core_course @app @javascript @lms_upto3.10
Feature: Check course completion feature.
In order to track the progress of the course on mobile device
As a student
I need to be able to update the activity completion status.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
Scenario: Activity completion, marking the checkbox manually
Given the following "activities" exist:
| activity | name | course | idnumber | completion | completionview |
| forum | First forum | C1 | forum1 | 1 | 0 |
| forum | Second forum | C1 | forum2 | 1 | 0 |
When I enter the course "Course 1" as "student1" in the app
# Set activities as completed.
And I should find "0%" in the app
And I click on "ion-button[title=\"Not completed: First forum. Select to mark as complete.\"]" "css"
And I should find "50%" in the app
And I click on "ion-button[title=\"Not completed: Second forum. Select to mark as complete.\"]" "css"
And I should find "100%" in the app
# Set activities as not completed.
And I click on "ion-button[title=\"Completed: First forum. Select to mark as not complete.\"]" "css"
And I should find "50%" in the app
And I click on "ion-button[title=\"Completed: Second forum. Select to mark as not complete.\"]" "css"
And I should find "0%" in the app

View File

@ -15,6 +15,7 @@ Feature: Check course completion feature.
| user | course | role |
| student1 | C1 | student |
@lms_from3.11
Scenario: Activity completion, marking the checkbox manually
Given the following "activities" exist:
| activity | name | course | idnumber | completion | completionview |

View File

@ -0,0 +1,121 @@
@core @core_course @app @javascript @lms_upto3.11
Feature: Test course list shown on app start tab
In order to select a course
As a student
I need to see the correct list of courses
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "users" exist:
| username |
| student1 |
| student2 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student2 | C2 | student |
Scenario: View courses (shortnames not displayed)
When I enter the app
And I log in as "student1"
Then I should find "Course 1" in the app
But I should not find "Course 2" in the app
But I should not find "C1" in the app
But I should not find "C2" in the app
When I enter the app
And I log in as "student2"
Then I should find "Course 1" in the app
And I should find "Course 2" in the app
But I should not find "C1" in the app
But I should not find "C2" in the app
Scenario: Filter courses
Given the following config values are set as admin:
| courselistshortnames | 1 |
And the following "courses" exist:
| fullname | shortname |
| Frog 3 | C3 |
| Frog 4 | C4 |
| Course 5 | C5 |
| Toad 6 | C6 |
And the following "course enrolments" exist:
| user | course | role |
| student2 | C3 | student |
| 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"
Then I should find "C1" in the app
And I should find "C2" in the app
And I should find "C3" in the app
And I should find "C4" in the app
And I should find "C5" in the app
And I should find "C6" in the app
And I should find "Course 1" in the app
And I should find "Course 2" in the app
And I should find "Frog 3" in the app
And I should find "Frog 4" in the app
And I should find "Course 5" in the app
And I should find "Toad 6" in the app
And I set the field "search text" to "fr" in the app
Then I should find "C3" in the app
And I should find "C4" in the app
And I should find "Frog 3" in the app
And I should find "Frog 4" in the app
But I should not find "C1" in the app
And I should not find "C2" in the app
And I should not find "C5" in the app
And I should not find "C6" in the app
And I should not find "Course 1" in the app
And I should not find "Course 2" in the app
And I should not find "Course 5" in the app
And I should not find "Toad 6" in the app
When I set the field "search text" to "" in the app
Then I should find "C1" in the app
And I should find "C2" in the app
And I should find "C3" in the app
And I should find "C4" in the app
And I should find "C5" in the app
And I should find "C6" in the app
And I should find "Course 1" in the app
And I should find "Course 2" in the app
And I should find "Frog 3" in the app
And I should find "Frog 4" in the app
And I should find "Course 5" in the app
And I should find "Toad 6" in the app

View File

@ -19,6 +19,7 @@ Feature: Test course list shown on app start tab
| student2 | C1 | student |
| student2 | C2 | student |
@lms_from4.0
Scenario: View courses (shortnames not displayed)
When I enter the app
And I log in as "student1"
@ -36,6 +37,7 @@ Feature: Test course list shown on app start tab
But I should not find "C1" in the app
But I should not find "C2" in the app
@lms_from4.0
Scenario: Filter courses
Given the following config values are set as admin:
| courselistshortnames | 1 |

View File

@ -0,0 +1,84 @@
@mod @mod_courses @app @javascript @lms_upto3.10
Feature: Test basic usage of courses in app
In order to participate in the courses while using the mobile app
As a student
I need basic courses functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | 0 |
| Course 3 | C3 | 0 |
| Course 4 | C4 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
| teacher1 | C3 | editingteacher |
| teacher1 | C4 | editingteacher |
| student1 | C1 | student |
| student1 | C2 | student |
| student1 | C3 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | option |
| choice | Choice course 1 | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 2 | Test choice description | C2 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 3 | Test choice description | C3 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 4 | Test choice description | C4 | choice1 | Option 1, Option 2, Option 3 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled |
| assign | C1 | assign1 | assignment | Test assignment description | 1 |
Scenario: Links to actions in Timeline work for teachers/students
# Configure assignment as teacher
Given I enter the course "Course 1" as "teacher1" in the app
And I press "assignment" 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 "Edit settings"
And I press "Expand all"
And I click on "duedate[enabled]" "checkbox"
And I click on "gradingduedate[enabled]" "checkbox"
And I press "Save and return to course"
And I close the browser tab opened by the app
# Submit assignment as student
When I enter the app
And I log in as "student1"
Then I press "Open block drawer" in the app
And I press "Add submission" in the app
Then the header should be "assignment" in the app
And I should find "Test assignment description" in the app
And I should find "No attempt" in the app
And I should find "Due date" in the app
When I press "Add submission" in the app
And I set the field "Online text submissions" to "test" in the app
And I press "Save" in the app
And I press "Submit assignment" in the app
And I press "OK" in the app
Then the header should be "assignment" in the app
And I should find "Test assignment description" in the app
And I should find "Submitted for grading" in the app
And I should find "Due date" in the app
# Grade assignment as teacher
When I enter the app
And I log in as "teacher1"
Then I press "Open block drawer" in the app
And I press "Grade" in the app
Then the header should be "assignment" in the app
And I should find "Test assignment description" in the app
And I should find "Time remaining" in the app
When I press "Needs grading" in the app
Then I should find "Student student" in the app
And I should find "Not graded" in the app

View File

@ -0,0 +1,130 @@
@mod @mod_courses @app @javascript @lms_upto3.11
Feature: Test basic usage of courses in app
In order to participate in the courses while using the mobile app
As a student
I need basic courses functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | 0 |
| Course 3 | C3 | 0 |
| Course 4 | C4 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
| teacher1 | C3 | editingteacher |
| teacher1 | C4 | editingteacher |
| student1 | C1 | student |
| student1 | C2 | student |
| student1 | C3 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | option |
| choice | Choice course 1 | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 2 | Test choice description | C2 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 3 | Test choice description | C3 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 4 | Test choice description | C4 | choice1 | Option 1, Option 2, Option 3 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled |
| assign | C1 | assign1 | assignment | Test assignment description | 1 |
Scenario: "Dashboard" tab displayed in >= 3.3 sites
When I enter the app
And I log in as "student1"
Then I should see "Dashboard"
And the header should be "Acceptance test site" in the app
And I should find "Course 1" in the app
And I should find "Course 2" in the app
And I should find "Course 3" in the app
When I press "Site home" in the app
Then I should find "Dashboard" in the app
And the header should be "Acceptance test site" in the app
When I press "Dashboard" in the app
Then I should find "Course 1" in the app
And I should find "Course 2" in the app
And I should find "Course 3" in the app
Scenario: See my courses
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should find "Course 1" in the app
And I should find "Course 2" in the app
And I should find "Course 3" in the app
When I press "Course 1" in the app
Then I should find "Choice course 1" in the app
And the header should be "Course 1" in the app
When I press "Choice course 1" in the app
Then I should find "Test choice description" in the app
And the header should be "Choice course 1" in the app
When I press the back button in the app
And I press the back button in the app
And I press "Course 2" in the app
Then I should find "Choice course 2" in the app
And the header should be "Course 2" in the app
When I press the back button in the app
And I press "Course 3" in the app
Then I should find "Choice course 3" in the app
And the header should be "Course 3" in the app
@lms_from3.11
Scenario: Links to actions in Timeline work for teachers/students
# Configure assignment as teacher
Given I enter the course "Course 1" as "teacher1" in the app
And I press "assignment" 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 "Edit settings"
And I press "Expand all"
And I click on "duedate[enabled]" "checkbox"
And I click on "gradingduedate[enabled]" "checkbox"
And I press "Save and return to course"
And I close the browser tab opened by the app
# Submit assignment as student
When I enter the app
And I log in as "student1"
Then I press "Open block drawer" in the app
And I press "Add submission" in the app
Then the header should be "assignment" in the app
And I should find "Test assignment description" in the app
And I should find "No attempt" in the app
And I should find "Due:" in the app
When I press "Add submission" in the app
And I set the field "Online text submissions" to "test" in the app
And I press "Save" in the app
And I press "Submit assignment" in the app
And I press "OK" in the app
Then the header should be "assignment" in the app
And I should find "Test assignment description" in the app
And I should find "Submitted for grading" in the app
And I should find "Due:" in the app
# Grade assignment as teacher
When I enter the app
And I log in as "teacher1"
Then I press "Open block drawer" in the app
And I press "Grade" in the app
Then the header should be "assignment" in the app
And I should find "Test assignment description" in the app
And I should find "Time remaining" in the app
When I press "Needs grading" in the app
Then I should find "Student student" in the app
And I should find "Not graded" in the app

View File

@ -98,6 +98,7 @@ Feature: Test basic usage of courses in app
And I should find "Course 3" in the app
And I should find "Course 4" in the app
@lms_from4.0
# TODO remove LMS UI steps in app tests
Scenario: Links to actions in Timeline work for teachers/students
# Configure assignment as teacher

View File

@ -0,0 +1,25 @@
@app @javascript @lms_upto3.11
Feature: Main Menu opens the right page
Background:
Given the following "users" exist:
| username |
| student |
Scenario: Opens Site Home when defaulthomepage is set to Site
Given the following config values are set as admin:
| defaulthomepage | 0 |
When I enter the app
And I log in as "student"
Then "Site home" should be selected in the app
And I should find "Available courses" in the app
And "Site home" "text" should appear before "Dashboard" "text" in the ".core-tabs-bar" "css_element"
Scenario: Opens Dashboard when defaulthomepage is set to Dashboard
Given the following config values are set as admin:
| defaulthomepage | 1 |
When I enter the app
And I log in as "student"
Then "Dashboard" should be selected in the app
And I should find "Course overview" in the app
And "Dashboard" "text" should appear before "Site home" "text" in the ".core-tabs-bar" "css_element"

View File

@ -12,6 +12,7 @@ Feature: Main Menu opens the right page
| user | course | role |
| student | C1 | student |
@lms_from4.0
Scenario: Opens Site Home when defaulthomepage is set to Site
Given the following config values are set as admin:
| defaulthomepage | 0 |
@ -22,6 +23,7 @@ Feature: Main Menu opens the right page
And "Site home" "text" should appear before "Dashboard" "text" in the ".core-tabs-bar" "css_element"
And "Home" "text" should appear before "My courses" "text" in the ".mainmenu-tabs" "css_element"
@lms_from4.0
Scenario: Opens Dashboard when defaulthomepage is set to Dashboard
Given the following config values are set as admin:
| defaulthomepage | 1 |
@ -32,6 +34,7 @@ Feature: Main Menu opens the right page
And "Dashboard" "text" should appear before "Site home" "text" in the ".core-tabs-bar" "css_element"
And "Home" "text" should appear before "My courses" "text" in the ".mainmenu-tabs" "css_element"
@lms_from4.0
Scenario: Opens My Courses when defaulthomepage is set to My Courses
Given the following config values are set as admin:
| defaulthomepage | 3 |

View File

@ -10,7 +10,7 @@ Feature: Plugins work properly.
When I enter the app
And I log in as "studentusername"
And I press the more menu button in the app
Then I should find "Moodle Mobile language strings" in the app
Then I should find "Moodle App Behat (auto-generated)" in the app
When I press "Moodle Mobile language strings" in the app
When I press "Moodle App Behat (auto-generated)" in the app
Then I should find "studentusername" in the app

View File

@ -18,6 +18,7 @@ Feature: It opens external links properly.
| forum | user | name | message |
| Test forum | student1 | Forum topic | See <a href="https://moodle.org/">moodle.org external link</a> |
# This test is flaky and may fail
Scenario: Click an external link
When I enter the course "Course 1" as "student1" in the app
And I press "Test forum" in the app