+ {{#sliderpositionbeforebefore}}
+ {{> theme_boost_union/slider }}
+ {{/sliderpositionbeforebefore}}
{{#advtilespositionbefore}}
{{> theme_boost_union/advertisementtiles }}
{{/advtilespositionbefore}}
+ {{#sliderpositionbeforeafter}}
+ {{> theme_boost_union/slider }}
+ {{/sliderpositionbeforeafter}}
{{#hasregionmainsettingsmenu}}
{{{ regionmainsettingsmenu }}}
@@ -236,9 +243,15 @@
{{{ output.course_content_footer }}}
+ {{#sliderpositionafterbefore}}
+ {{> theme_boost_union/slider }}
+ {{/sliderpositionafterbefore}}
{{#advtilespositionafter}}
{{> theme_boost_union/advertisementtiles }}
{{/advtilespositionafter}}
+ {{#sliderpositionafterafter}}
+ {{> theme_boost_union/slider }}
+ {{/sliderpositionafterafter}}
{{#regions.contentlower.hasblocks}}
diff --git a/tests/behat/theme_boost_union_contentsettings_slider.feature b/tests/behat/theme_boost_union_contentsettings_slider.feature
new file mode 100644
index 00000000000..8abf020b48a
--- /dev/null
+++ b/tests/behat/theme_boost_union_contentsettings_slider.feature
@@ -0,0 +1,419 @@
+@theme @theme_boost_union @theme_boost_union_contentsettings @theme_boost_union_contentsettings_slider @javascript @_file_upload
+
+Feature: Configuring the theme_boost_union plugin for the "Slider" tab on the "Content" page
+ In order to use the features
+ As admin
+ I need to be able to configure the theme Boost Union plugin
+
+ Background:
+ Given the following "users" exist:
+ | username |
+ | teacher1 |
+ And the following config values are set as admin:
+ | config | value | plugin |
+ | slide1enabled | yes | theme_boost_union |
+ | slide1caption | Slide 1 | theme_boost_union |
+ | slide1content | This is a test content for slide 1 | theme_boost_union |
+ When I log in as "admin"
+ # We deactivate debugging for a while as the Behat step would otherwise fail due to the
+ # stupid 'Too much data passed as arguments to js_call_amd' debugging message which can't be avoided
+ # on this settings page. This debugging message can't be avoided as we simple use too much hide_if() there.
+ And the following config values are set as admin:
+ | debug | 0 |
+ | debugdisplay | 0 |
+ And I navigate to "Appearance > Boost Union > Content" in site administration
+ And I click on "Slider" "link" in the "#adminsettings .nav-tabs" "css_element"
+ And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Slide 1 background image" filemanager
+ And I press "Save changes"
+ And I am on site homepage
+ # We reactivate debugging again.
+ And the following config values are set as admin:
+ | debug | 32767 |
+ | debugdisplay | 1 |
+ And I log out
+
+ Scenario: Setting: Slider - Display the slider on the frontpage only and nowhere else
+ Given the following "courses" exist:
+ | fullname | shortname |
+ | Course 1 | C1 |
+ And the following "course enrolments" exist:
+ | user | course | role |
+ | teacher1 | C1 | editingteacher |
+ When I log in as "teacher1"
+ And I am on site homepage
+ Then "#themeboostunionslide1" "css_element" should exist
+ And I follow "Dashboard"
+ Then "#themeboostunionslide1" "css_element" should not exist
+ And I follow "My courses"
+ Then "#themeboostunionslide1" "css_element" should not exist
+ When I am on "Course 1" course homepage
+ Then "#themeboostunionslide1" "css_element" should not exist
+ When I log out
+ And I click on "Log in" "link" in the ".logininfo" "css_element"
+ Then "#themeboostunionslide1" "css_element" should not exist
+
+ Scenario Outline: Setting: Slider - Display the slider wrapper and the individual slide only if it is enabled
+ Given the following config values are set as admin:
+ | config | value | plugin |
+ | slide1enabled |