MDL-70197 navigation: Update classic goutte tests

This commit is contained in:
Mathew May 2021-11-30 12:06:30 +08:00 committed by Ilya Tregubov
parent cee0949109
commit f65b92577a
9 changed files with 38 additions and 26 deletions

View file

@ -385,8 +385,7 @@ Feature: Set up contextual data for tests
| enableoutcomes | 1 |
When I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Grades" in current page administration
And I follow "Outcomes"
And I navigate to "Outcomes" in current page administration
Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element"
And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element"
And I follow "Edit outcomes"

View file

@ -9,7 +9,7 @@ Feature: Course summary block used on the frontpage
And I am on site homepage
And I turn editing mode on
And I add the "Course/site summary" block
And I navigate to "Front page settings" in site administration
And I navigate to "Front page > Front page settings" in site administration
And I set the following fields to these values:
| summary | Proved the summary block works! |
And I press "Save changes"

View file

@ -18,7 +18,7 @@ Feature: Access permission to content Bank
Scenario: Admins access content bank
Given I log in as "admin"
And I am on "Course 1" course homepage
Then "Content bank" "link" should exist in current page administration
Then "Content bank" "link" should exist
Scenario: Editing teachers can access content bank at course level
Given I log in as "teacher1"

View file

@ -27,13 +27,11 @@ Feature: Access to downloading course content can be controlled
And I navigate to "Settings" in current page administration
And I set the field "Enable download course content" to "Yes"
And I press "Save and display"
And I navigate to "Course administration" in current page administration
And "Download course content" "link" should exist
Then "Download course content" "link" should exist in current page administration
When the following config values are set as admin:
| downloadcoursecontentallowed | 0 |
And I am on "Hockey 101" course homepage
And I navigate to "Course administration" in current page administration
And "Download course content" "link" should not exist
Then "Download course content" "link" should not exist in current page administration
And I navigate to "Settings" in current page administration
And I should not see "Enable download course content"
@ -45,8 +43,7 @@ Feature: Access to downloading course content can be controlled
And I set the field "Enable download course content" to "Yes"
And I press "Save changes"
And I am on "Hockey 101" course homepage
And I navigate to "Course administration" in current page administration
Then "Download course content" "link" should exist
Then "Download course content" "link" should exist in current page administration
Scenario: A teacher can enable and disable the download course content feature when it is available
Given I log in as "teacher1"
@ -56,13 +53,11 @@ Feature: Access to downloading course content can be controlled
And I should see "Enable download course content"
And I set the field "Enable download course content" to "Yes"
And I press "Save and display"
And I navigate to "Course administration" in current page administration
Then "Download course content" "link" should exist
Then "Download course content" "link" should exist in current page administration
And I navigate to "Settings" in current page administration
And I set the field "Enable download course content" to "No"
And I press "Save and display"
And I navigate to "Course administration" in current page administration
And "Download course content" "link" should not exist
Then "Download course content" "link" should not exist in current page administration
Scenario: Teachers require a capability to access the download course content feature or modify its availability in a course
Given I log in as "admin"
@ -73,8 +68,7 @@ Feature: Access to downloading course content can be controlled
# Check teacher can see download option and enable dropdown.
And I log in as "teacher1"
And I am on "Hockey 101" course homepage
And I navigate to "Course administration" in current page administration
And "Download course content" "link" should exist
Then "Download course content" "link" should exist in current page administration
And I navigate to "Settings" in current page administration
And "Enable download course content" "select" should exist
And I log out
@ -88,8 +82,7 @@ Feature: Access to downloading course content can be controlled
# Check teacher can no longer see download option, and that enable value is visible, but dropdown no longer available.
When I log in as "teacher1"
And I am on "Hockey 101" course homepage
And I navigate to "Course administration" in current page administration
Then "Download course content" "link" should not exist
Then "Download course content" "link" should not exist in current page administration
And I navigate to "Settings" in current page administration
And I should see "Enable download course content"
And I should see "Site default (Yes)"

View file

@ -128,6 +128,26 @@ completely removed from Moodle core too.
-get_safe_orderby() - where a single sort parameter is required.
-get_safe_orderby_multiple() - where multiple sort parameters are required.
* Added the cleanstr mustache template helper to clean strings after loading them from language packs.
* The following behat functions have been modified to work with the new navigation
- i_add_the_block
- the_add_block_selector_should_contain_block
- the_add_block_selector_should_contain_block
- go_to_the_current_course_activity_completion_report
- i_navigate_to_course_participants
- i_go_to_advanced_grading_page
- i_navigate_to_in_the_course_gradebook
- should_exist_in_current_page_administration
- should_not_exist_in_current_page_administration
- go_to_main_course_page
- select_on_administration_page
- find_header_administration_menu
- select_from_administration_menu
- i_edit_the_lesson
- i_add_a_question_filling_the_form_with
* The following behat step has been deprecated
- i_select_from_flat_navigation_drawer
=== 3.11.4 ===
* A new option dontforcesvgdownload has been added to the $options parameter of the send_file() function.

View file

@ -24,13 +24,13 @@ Feature: Use the qbank plugin manager page for deletequestion
And I click on "Disable" "link" in the "Delete question" "table_row"
And I am on the "Test quiz" "quiz activity" page
And I navigate to "Question bank > Questions" in current page administration
And I click on "#action-menu-toggle-1" "css_element" in the "First question" "table_row"
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
Then I should not see "Delete" in the "region-main" "region"
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
And I click on "Enable" "link" in the "Delete question" "table_row"
And I am on the "Test quiz" "quiz activity" page
And I navigate to "Question bank > Questions" in current page administration
And I click on "#action-menu-toggle-1" "css_element" in the "First question" "table_row"
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
And I should see "Delete" in the "region-main" "region"
@javascript

View file

@ -23,11 +23,11 @@ Feature: Use the qbank plugin manager page for exporttoxml
And I click on "Disable" "link" in the "Export to XML" "table_row"
And I am on the "Test quiz" "quiz activity" page
And I navigate to "Question bank" in current page administration
And I click on "#action-menu-toggle-1" "css_element" in the "First question" "table_row"
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
Then I should not see "Export as Moodle XML"
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
And I click on "Enable" "link" in the "Export to XML" "table_row"
And I am on the "Test quiz" "quiz activity" page
And I navigate to "Question bank" in current page administration
And I click on "#action-menu-toggle-1" "css_element" in the "First question" "table_row"
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
And I should see "Export as Moodle XML"

View file

@ -23,13 +23,13 @@ Feature: Use the qbank plugin manager page for tagquestion
And I click on "Disable" "link" in the "Tag question" "table_row"
And I am on the "Test quiz" "quiz activity" page
And I navigate to "Question bank" in current page administration
And I click on "#action-menu-toggle-1" "css_element" in the "First question" "table_row"
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
Then I should not see "Manage tags"
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
And I click on "Enable" "link" in the "Tag question" "table_row"
And I am on the "Test quiz" "quiz activity" page
And I navigate to "Question bank" in current page administration
And I click on "#action-menu-toggle-1" "css_element" in the "First question" "table_row"
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
And I should see "Manage tags"
Scenario: Enable/disable tagquestion section from question edit form

View file

@ -120,8 +120,8 @@ Feature: View the user page for the outline report
When I follow "Participants"
And I follow "Student 1"
And I follow "Outline report"
Then I should see "forum1"
Then I should see "Activity report"
When I follow "Participants"
And I follow "Student 1"
And I follow "Complete report"
Then I should see "No posts"
Then I should see "Activity report"