diff --git a/mod/courses/tests/behat/app_basic_usage.feature b/mod/courses/tests/behat/app_basic_usage.feature index e81882cde..d70c3a6ab 100755 --- a/mod/courses/tests/behat/app_basic_usage.feature +++ b/mod/courses/tests/behat/app_basic_usage.feature @@ -1,4 +1,4 @@ -@mod @mod_courses @app @app_upto3.9.4 @javascript +@mod @mod_courses @app @javascript Feature: Test basic usage of courses in app In order to participate in the courses while using the mobile app As a student @@ -34,81 +34,77 @@ Feature: Test basic usage of courses in app | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | | assign | C1 | assign1 | assignment | Test assignment description | 1 | - @app @3.8.0 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 see "Course 1" - And I should see "Course 2" - And I should see "Course 3" + 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 see "Dashboard" + 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 see "Course 1" - And I should see "Course 2" - And I should see "Course 3" + 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 - @app @3.8.0 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 see "Course 1" - And I should see "Course 2" - And I should see "Course 3" + 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" near "Recently accessed courses" in the app - Then I should see "Choice course 1" + 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 see "Test choice description" + 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" near "Recently accessed courses" in the app - Then I should see "Choice course 2" + 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" near "Recently accessed courses" in the app - Then I should see "Choice course 3" + Then I should find "Choice course 3" in the app And the header should be "Course 3" in the app - @app @3.8.0 Scenario: Search for a course When I enter the app And I log in as "student1" And I press "Search courses" in the app And I set the field "Search" to "Course 4" in the app - And I press "Search" in the app - Then I should see "Course 4" + And I press "Search" "button" in the app + Then I should find "Course 4" in the app And the header should be "Search courses" in the app When I press "Course 4" in the app - Then I should see "Course 4" + Then I should find "Course 4" in the app And the header should be "Course 4" in the app When I press the back button in the app And I set the field "Search" to "Course" in the app - And I press "Search" in the app - Then I should see "Course 1" - And I should see "Course 2" - And I should see "Course 3" - And I should see "Course 4" + And I press "Search" "button" 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 + And I should find "Course 4" in the app - @app @3.8.0 Scenario: Links to actions in Timeline work for teachers/students # Configure assignment as teacher When I enter the app And I log in as "teacher1" - Then I should see "Timeline" + Then I should find "Timeline" in the app Given I press "Course 1" near "Recently accessed courses" in the app And I press "assignment" in the app @@ -129,9 +125,9 @@ Feature: Test basic usage of courses in app And I log in as "student1" And I press "Add submission" in the app Then the header should be "assignment" in the app - And I should see "Test assignment description" - And I should see "No attempt" - And I should see "Due date" + 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 @@ -139,18 +135,18 @@ Feature: Test basic usage of courses in 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 see "Test assignment description" - And I should see "Submitted for grading" - And I should see "Due date" + 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" And I press "Grade" in the app Then the header should be "assignment" in the app - And I should see "Test assignment description" - And I should see "Time remaining" + 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 see "Student student" - And I should see "Not graded" + Then I should find "Student student" in the app + And I should find "Not graded" in the app diff --git a/tests/behat/app_behat_runtime.js b/tests/behat/app_behat_runtime.js index 8945cc458..960603d82 100644 --- a/tests/behat/app_behat_runtime.js +++ b/tests/behat/app_behat_runtime.js @@ -734,7 +734,7 @@ return 'ERROR: No matches for text'; } } else { - found = findElementsBasedOnText({ text: field, selector: 'input, textarea' })[0]; + found = findElementsBasedOnText({ text: field, selector: 'input, textarea, [contenteditable="true"]' })[0]; if (!found) { return 'ERROR: No matches for text';