Skip to content

Commit

Permalink
MDL-73347 behat: Add blocks hidden by default for boost
Browse files Browse the repository at this point in the history
For the boost them, a few themes have been hidden by default.
The unaddable setting should be set to let admins add them again,
because some behat tests need them.
  • Loading branch information
sarjona committed Jan 14, 2022
1 parent 341a7b2 commit 53fe23d
Show file tree
Hide file tree
Showing 49 changed files with 166 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Feature: Manage availability conditions
@javascript
Scenario: Display list of availability conditions
# Check the report doesn't show when not enabled.
Given I log in as "admin"
Given the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I log in as "admin"
And I turn editing mode on
And I add the "Administration" block if not present
And the following config values are set as admin:
Expand Down
2 changes: 2 additions & 0 deletions backup/util/ui/tests/behat/import_contentbank_content.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Feature: Import course content bank content

Background:
Given I log in as "admin"
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I am on site homepage
And I turn editing mode on
And I add the "Navigation" block if not present
Expand Down
4 changes: 4 additions & 0 deletions badges/tests/behat/add_badge.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Feature: Add badges to the system
@javascript
Scenario: Accessing the badges
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I click on "Site pages" "list_item" in the "Navigation" "block"
Expand Down Expand Up @@ -132,6 +134,8 @@ Feature: Add badges to the system
@javascript @_file_upload
Scenario: Add a badge from Site badges section
Given I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
And I add the "Navigation" block if not present
When I click on "Site pages" "list_item" in the "Navigation" "block"
Expand Down
2 changes: 2 additions & 0 deletions badges/tests/behat/award_badge.feature
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ Feature: Award badges
# Teacher 1 should NOT have access to manage/create site badges in the Site badges section.
When I am on homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I click on "Site pages" "list_item" in the "Navigation" "block"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Feature: Feature: Students can use the recent blog entries block to view recent
And I am on site homepage
And I turn editing mode on
And I add the "Recent blog entries" block
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I log out
Expand Down
2 changes: 2 additions & 0 deletions blocks/blog_tags/tests/behat/blogtag.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Feature: Adding blog tag block
When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Blog tags" block
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
And I add the "Navigation" block if not present

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Feature: Enable the course_list block on a category page and view it's contents
And I turn editing mode on
And I am on course index
And I follow "Category 1"
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Courses" block
And I log out
When I log in as "teacher1"
Expand All @@ -49,6 +51,8 @@ Feature: Enable the course_list block on a category page and view it's contents
And I turn editing mode on
And I am on course index
And I follow "Category 1"
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Courses" block
And I log out
When I log in as "teacher1"
Expand All @@ -67,6 +71,8 @@ Feature: Enable the course_list block on a category page and view it's contents
And I turn editing mode on
And I am on course index
And I follow "Category 1"
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
When I add the "Courses" block
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
Expand Down
12 changes: 10 additions & 2 deletions blocks/course_list/tests/behat/block_course_list_course.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Feature: Enable the course_list block on a course page and view it's contents
Scenario: Add the course list block on course page and navigate to the course listing
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
When I add the "Courses" block
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
Expand All @@ -39,6 +41,8 @@ Feature: Enable the course_list block on a course page and view it's contents
Scenario: Add the course list block on course page and navigate to another course
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
When I add the "Courses" block
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
Expand All @@ -50,6 +54,8 @@ Feature: Enable the course_list block on a course page and view it's contents
Scenario: Add the course list block on course page and view as an admin
Given I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
When I add the "Courses" block
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
Expand All @@ -62,15 +68,17 @@ Feature: Enable the course_list block on a course page and view it's contents

Scenario: View the course list block on course page with hide all courses link enabled
Given the following config values are set as admin:
| block_course_list_hideallcourseslink | 1 |
| block_course_list_hideallcourseslink | 1 | |
| unaddableblocks | | theme_boost|
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
When I add the "Courses" block
Then I should not see "All courses" in the "My courses" "block"

Scenario: View the course list block on course page with admin sees own course enabled
Given the following config values are set as admin:
| block_course_list_adminview | own |
| block_course_list_adminview | own | |
| unaddableblocks | | theme_boost|
And the following "course enrolments" exist:
| user | course | role |
| admin | C1 | editingteacher |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Feature: Enable the course_list block on the dashboard and view it's contents
Scenario: Add the course list block on the dashboard and navigate to the course listing
Given I log in as "teacher1"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
When I add the "Courses" block
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
Expand All @@ -39,6 +41,8 @@ Feature: Enable the course_list block on the dashboard and view it's contents
Scenario: Add the course list block on the dashboard and navigate to another course
Given I log in as "teacher1"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
When I add the "Courses" block
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
Expand All @@ -50,6 +54,8 @@ Feature: Enable the course_list block on the dashboard and view it's contents
Scenario: Add the course list block on the dashboard and view as an admin
Given I log in as "admin"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
When I add the "Courses" block
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Feature: Enable the course_list block on the frontpage and view it's contents
Given I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Courses" block
And I log out
When I log in as "teacher1"
Expand All @@ -44,6 +46,8 @@ Feature: Enable the course_list block on the frontpage and view it's contents
Given I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Courses" block
And I log out
When I log in as "teacher1"
Expand All @@ -59,6 +63,8 @@ Feature: Enable the course_list block on the frontpage and view it's contents
Given I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
When I add the "Courses" block
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
Expand All @@ -73,6 +79,8 @@ Feature: Enable the course_list block on the frontpage and view it's contents
Given I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Courses" block
And I log out
When I log in as "guest"
Expand Down
2 changes: 2 additions & 0 deletions blocks/navigation/tests/behat/expand_courses_node.feature
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Feature: Expand the courses nodes within the navigation block
And I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I configure the "Navigation" block
And I set the following fields to these values:
Expand Down
2 changes: 2 additions & 0 deletions blocks/navigation/tests/behat/participants_link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Feature: Displaying the link to the Participants page
And I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I configure the "Navigation" block
And I set the following fields to these values:
Expand Down
2 changes: 2 additions & 0 deletions blocks/navigation/tests/behat/view_my_courses.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Feature: View my courses in navigation block
And I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I configure the "Navigation" block
And I set the following fields to these values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ Feature: The section links block allows users to quickly navigate around a moodl
And I am on "Course 1" course homepage with editing mode on

Scenario: Add the section links block to a course.
Given I add the "Section links" block
Given the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Section links" block
And I turn editing mode off
And I should see "5" in the "Section links" "block"
When I follow "5"
Then I should see "Test assignment 1"

Scenario: Add the section links block to a course and limit the sections displayed.
Given I add the "Section links" block
Given the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Section links" block
And I configure the "Section links" block
And I set the following fields to these values:
| id_config_numsections1 | 5 |
Expand All @@ -42,7 +46,9 @@ Feature: The section links block allows users to quickly navigate around a moodl
Then I should see "Test assignment 1"

Scenario: Add the section links block to a course and limit the sections displayed using the alternative number of sections.
Given I add the "Section links" block
Given the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Section links" block
And I configure the "Section links" block
And I set the following fields to these values:
| id_config_numsections1 | 5 |
Expand Down
2 changes: 2 additions & 0 deletions blocks/section_links/tests/behat/show_section_name.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Feature: The Section links block can be configured to display section name in ad
| showsectionname | 1 | block_section_links |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Section links" block
And I log out

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Feature: Adding and configuring Flickr block
Scenario: Adding Flickr block to the tags site page
Given I log in as "admin"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I click on "Site pages" "list_item" in the "Navigation" "block"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Feature: Adding and configuring YouTube block
| apikey | | block_tag_youtube |
And I follow "Dashboard"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I click on "Site pages" "list_item" in the "Navigation" "block"
Expand All @@ -35,6 +37,8 @@ Feature: Adding and configuring YouTube block
| apikey | invalidapikeyvalue | block_tag_youtube |
And I follow "Dashboard"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I click on "Site pages" "list_item" in the "Navigation" "block"
And I click on "Tags" "link" in the "Navigation" "block"
Expand Down
2 changes: 2 additions & 0 deletions blog/tests/behat/comment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Feature: Comment on a blog entry
And I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 "Site blogs" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I configure the "Navigation" block
Expand Down
2 changes: 2 additions & 0 deletions blog/tests/behat/delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Feature: Delete a blog entry
And I log in as "admin"
And I am on site homepage
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 "Site blogs" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I configure the "Navigation" block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Feature: Replace H5P file from an existing content
| System | | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
And I log in as "admin"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I expand "Site pages" node
And I click on "Content bank" "link"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Feature: H5P file upload to content bank for admins
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Files" filemanager
And I click on "Save changes" "button"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I expand "Site pages" node
And I click on "Content bank" "link"
Expand Down Expand Up @@ -66,6 +68,8 @@ Feature: H5P file upload to content bank for admins
And I wait until the page is ready
Then I should see "filltheblanks.h5p"
And I am on "Course 1" course homepage
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I expand "Site pages" node
And I click on "Content bank" "link"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Feature: Disable H5P content-types from the content bank
| Course | C1 | contenttype_h5p | admin | invalidh5p | /h5p/tests/fixtures/h5ptest.zip |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I log out

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Feature: Manage H5P content from the content bank
| Course | C1 | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
| Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p | /h5p/tests/fixtures/ipsums.h5p |
And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I log out

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Feature: Replace H5P file from an existing content requires special capabilities
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present
And I expand "Site pages" node
And I click on "Content bank" "link"
Expand Down
Loading

0 comments on commit 53fe23d

Please sign in to comment.