From bae668b297ae8a82e6eca5df7405850481d0d2e7 Mon Sep 17 00:00:00 2001 From: Alexander Bias Date: Mon, 10 Jun 2024 11:16:55 +0200 Subject: [PATCH] Cleanup: Introduce a dedicated Behat step to deactivate and activate debugging, resolves #670 (#671) --- CHANGES.md | 1 + .../behat_theme_boost_union_base_general.php | 24 +++++++++++ ...contentsettings_advertisementtiles.feature | 31 +++---------- ..._union_contentsettings_infobanners.feature | 12 +----- ...boost_union_contentsettings_slider.feature | 43 +++---------------- ..._boost_union_flavourssettings_look.feature | 8 ++++ tests/behat/theme_boost_union_general.feature | 2 + ...me_boost_union_goodiesfordesigners.feature | 2 + ...nion_looksettings_activitybranding.feature | 5 +++ ...me_boost_union_looksettings_course.feature | 4 ++ ...t_union_looksettings_emailbranding.feature | 8 ++++ ...theme_boost_union_looksettings_h5p.feature | 2 + ...boost_union_looksettings_loginpage.feature | 12 ++++++ ...me_boost_union_looksettings_mobile.feature | 10 +++++ ...boost_union_looksettings_resources.feature | 8 ++++ ...heme_boost_union_looksettings_scss.feature | 10 +++++ ...st_union_looksettings_sitebranding.feature | 16 +++++++ .../behat/theme_boost_union_managers.feature | 2 + 18 files changed, 128 insertions(+), 72 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a443a4d186b..1871b7624b8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2024-06-10 - Cleanup: Introduce a dedicated Behat step to deactivate and activate debugging, resolves #670. * 2024-05-05 - Cleanup: Fix 'Implicitly marking a parameter as nullable is deprecated since PHP 8.4' codechecker warning, resolves #667. * 2024-04-28 - Feature: Allow admins to configure URLs from where Boost Union will fetch additional raw SCSS code, resolves #41. * 2024-05-13 - Improvement: Suppress icons in footer, resolves #649 diff --git a/tests/behat/behat_theme_boost_union_base_general.php b/tests/behat/behat_theme_boost_union_base_general.php index a8b69a1a39e..0ffcf252ce2 100644 --- a/tests/behat/behat_theme_boost_union_base_general.php +++ b/tests/behat/behat_theme_boost_union_base_general.php @@ -283,4 +283,28 @@ public function pseudoclass_content_none($s, $ps, $pr) { public function purge_theme_cache_and_reload_theme() { theme_reset_all_caches(); } + + /** + * Disables debugging in Behat. + * + * We sometimes need to deactivate debugging for a while as Behat steps 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 Boost Union settings pages as we simply use too much hide_if() there. + * + * @Given /^Behat debugging is disabled$/ + */ + public function disable_behat_debugging() { + set_config('debug', 0); + set_config('debugdisplay', 0); + } + + /** + * Re-enables debugging in Behat. + * + * @Given /^Behat debugging is enabled$/ + */ + public function enable_behat_debugging() { + set_config('debug', 32767); + set_config('debugdisplay', 1); + } } diff --git a/tests/behat/theme_boost_union_contentsettings_advertisementtiles.feature b/tests/behat/theme_boost_union_contentsettings_advertisementtiles.feature index 9df2cdc70bf..cc0fa47616f 100644 --- a/tests/behat/theme_boost_union_contentsettings_advertisementtiles.feature +++ b/tests/behat/theme_boost_union_contentsettings_advertisementtiles.feature @@ -185,21 +185,13 @@ Feature: Configuring the theme_boost_union plugin for the "Advertisement tiles" | tile2enabled | no | theme_boost_union | | tile2content | This is a test content for tile 2 | 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 Behat debugging is disabled And I navigate to "Appearance > Boost Union > Content" in site administration And I click on "Advertisement tiles" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Advertisement tile 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 Behat debugging is enabled And I log out And I am on site homepage And I follow "Log in" @@ -232,21 +224,13 @@ Feature: Configuring the theme_boost_union plugin for the "Advertisement tiles" | tile1content | This is a test content for tile 1 | theme_boost_union | | tile1backgroundimageposition | | 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 Behat debugging is disabled And I navigate to "Appearance > Boost Union > Content" in site administration And I click on "Advertisement tiles" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Advertisement tile 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 Behat debugging is enabled And I log out And I am on site homepage And I follow "Log in" @@ -266,12 +250,7 @@ Feature: Configuring the theme_boost_union plugin for the "Advertisement tiles" | config | value | plugin | | tile1enabled | yes | 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 Behat debugging is disabled And I navigate to "Appearance > Boost Union > Content" in site administration And I click on "Advertisement tiles" "link" in the "#adminsettings .nav-tabs" "css_element" Then "#admin-tile1title" "css_element" should be visible diff --git a/tests/behat/theme_boost_union_contentsettings_infobanners.feature b/tests/behat/theme_boost_union_contentsettings_infobanners.feature index d11386b9fea..5453a2310b6 100644 --- a/tests/behat/theme_boost_union_contentsettings_infobanners.feature +++ b/tests/behat/theme_boost_union_contentsettings_infobanners.feature @@ -193,21 +193,13 @@ Feature: Configuring the theme_boost_union plugin for the "Information banners" And I should not see "This is a test content" And I log out 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 Behat debugging is disabled And I navigate to "Appearance > Boost Union > Content" in site administration And I click on "Info banner" "link" in the "#adminsettings .nav-tabs" "css_element" And I click on "Reset visibility of info banner 1" "link" And I click on "Confirm" "link" Then I should see "The visibility of info banner 1 has been reset" - # We reactivate debugging again. - And the following config values are set as admin: - | debug | 32767 | - | debugdisplay | 1 | + And Behat debugging is enabled And I log out When I log in as "teacher1" And I follow "Dashboard" diff --git a/tests/behat/theme_boost_union_contentsettings_slider.feature b/tests/behat/theme_boost_union_contentsettings_slider.feature index 772227d6873..6dcb97daacf 100644 --- a/tests/behat/theme_boost_union_contentsettings_slider.feature +++ b/tests/behat/theme_boost_union_contentsettings_slider.feature @@ -15,21 +15,13 @@ Feature: Configuring the theme_boost_union plugin for the "Slider" tab on the "C | 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 Behat debugging is disabled 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 Behat debugging is enabled And I log out Scenario: Setting: Slider - Display the slider on the frontpage only and nowhere else @@ -267,12 +259,7 @@ Feature: Configuring the theme_boost_union plugin for the "Slider" tab on the "C | slide4linksource | 2 | theme_boost_union | | slide4linktarget | new | theme_boost_union | And 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 Behat debugging is disabled 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 2 background image" filemanager @@ -287,10 +274,7 @@ Feature: Configuring the theme_boost_union plugin for the "Slider" tab on the "C And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Slide 4 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 Behat debugging is enabled And I log out When I log in as "teacher1" And I am on site homepage @@ -336,12 +320,7 @@ Feature: Configuring the theme_boost_union plugin for the "Slider" tab on the "C | slide6content | This is a test content for tile 6 | theme_boost_union | | slide6order | | theme_boost_union | And 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 Behat debugging is disabled 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 2 background image" filemanager @@ -356,10 +335,7 @@ Feature: Configuring the theme_boost_union plugin for the "Slider" tab on the "C And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Slide 6 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 Behat debugging is enabled And I log out When I log in as "teacher1" And I am on site homepage @@ -381,12 +357,7 @@ Feature: Configuring the theme_boost_union plugin for the "Slider" tab on the "C | config | value | plugin | | slide1enabled | yes | 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 Behat debugging is disabled And I navigate to "Appearance > Boost Union > Content" in site administration And I click on "Slider" "link" in the "#adminsettings .nav-tabs" "css_element" Then "#admin-slide1backgroundimage" "css_element" should be visible diff --git a/tests/behat/theme_boost_union_flavourssettings_look.feature b/tests/behat/theme_boost_union_flavourssettings_look.feature index 35e4b4cd389..cfc91c3c4aa 100644 --- a/tests/behat/theme_boost_union_flavourssettings_look.feature +++ b/tests/behat/theme_boost_union_flavourssettings_look.feature @@ -30,10 +30,12 @@ Feature: Configuring the theme_boost_union plugin on the "Flavours" page, applyi @javascript @_file_upload Scenario: Flavours: Compact logo - Upload a compact logo (with a global compact logo being overridden) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/moodlelogo.png" file to "Compact logo" filemanager And I click on "Save changes" "button" + And Behat debugging is enabled And I navigate to "Appearance > Boost Union > Flavours" in site administration And I click on "Create flavour" "button" And I should see "Create flavour" in the "#page-header h1" "css_element" @@ -48,10 +50,12 @@ Feature: Configuring the theme_boost_union plugin on the "Flavours" page, applyi @javascript @_file_upload Scenario: Flavours: Compact logo - Do not upload a compact logo (with a global compact logo being served properly) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/moodlelogo.png" file to "Compact logo" filemanager And I click on "Save changes" "button" + And Behat debugging is enabled And I navigate to "Appearance > Boost Union > Flavours" in site administration And I click on "Create flavour" "button" And I should see "Create flavour" in the "#page-header h1" "css_element" @@ -79,10 +83,12 @@ Feature: Configuring the theme_boost_union plugin on the "Flavours" page, applyi @javascript @_file_upload Scenario: Flavours: Favicon - Upload a favicon (with a global favicon being overridden) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/favicon.ico" file to "Favicon" filemanager And I press "Save changes" + And Behat debugging is enabled And I navigate to "Appearance > Boost Union > Flavours" in site administration And I click on "Create flavour" "button" And I should see "Create flavour" in the "#page-header h1" "css_element" @@ -97,10 +103,12 @@ Feature: Configuring the theme_boost_union plugin on the "Flavours" page, applyi @javascript @_file_upload Scenario: Flavours: Favicon - Do not upload a favicon (with a global favicon being served properly) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/favicon.ico" file to "Favicon" filemanager And I click on "Save changes" "button" + And Behat debugging is enabled And I navigate to "Appearance > Boost Union > Flavours" in site administration And I click on "Create flavour" "button" And I should see "Create flavour" in the "#page-header h1" "css_element" diff --git a/tests/behat/theme_boost_union_general.feature b/tests/behat/theme_boost_union_general.feature index 448a6cc264e..9db04f05dfb 100644 --- a/tests/behat/theme_boost_union_general.feature +++ b/tests/behat/theme_boost_union_general.feature @@ -22,10 +22,12 @@ Feature: Configuring the theme_boost_union plugin as admin Scenario: Switch to the active Boost Union admin sub-tab after saving a setting and the following page reload When I log in as "admin" And I follow "Site administration" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Page" "link" in the "#adminsettings .nav-tabs" "css_element" And I set the field "Course content max width" to "600px" And I click on "Save changes" "button" + And Behat debugging is enabled Then I should see "Course content max width" in the ".tab-content" "css_element" And "#theme_boost_union_look_page.tab-pane.active" "css_element" should exist And "#theme_boost_union_look_page.tab-pane:not(.active)" "css_element" should not exist diff --git a/tests/behat/theme_boost_union_goodiesfordesigners.feature b/tests/behat/theme_boost_union_goodiesfordesigners.feature index 51c60bec3ce..e616d170669 100644 --- a/tests/behat/theme_boost_union_goodiesfordesigners.feature +++ b/tests/behat/theme_boost_union_goodiesfordesigners.feature @@ -27,6 +27,7 @@ Feature: Using the goodies for designers in the theme_boost_union plugin @javascript Scenario: Feature: Themerev as SCSS variable When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "SCSS" "link" in the "#adminsettings .nav-tabs" "css_element" # We add a small CSS snippet to the page which adds the themrev to the Dashboard header. @@ -36,6 +37,7 @@ Feature: Using the goodies for designers in the theme_boost_union plugin #page-my-index h1:after { content: 'Themerev: #{$themerev}'; } """ And I press "Save changes" + And Behat debugging is enabled And I follow "Dashboard" Then I should see "Dashboard" in the "#page-my-index h1" "css_element" And element "#page-my-index h1" pseudo-class "after" should contain "content": "Themerev" diff --git a/tests/behat/theme_boost_union_looksettings_activitybranding.feature b/tests/behat/theme_boost_union_looksettings_activitybranding.feature index 2afa46a706a..482dba6f95d 100644 --- a/tests/behat/theme_boost_union_looksettings_activitybranding.feature +++ b/tests/behat/theme_boost_union_looksettings_activitybranding.feature @@ -33,10 +33,12 @@ Feature: Configuring the theme_boost_union plugin for the "Activity branding" ta @javascript Scenario Outline: Setting: Activity icon purposes - Setting the purpose Given I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Activity branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I select "" from the "" singleselect And I press "Save changes" + And Behat debugging is enabled And I am on "Course 1" course homepage And I turn editing mode on When I click on "Add an activity or resource" "button" in the "Topic 1" "section" @@ -58,6 +60,7 @@ Feature: Configuring the theme_boost_union plugin for the "Activity branding" ta | config | value | plugin | | modiconsenable | yes | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Activity branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I click on ".fa-folder-o" "css_element" in the "#admin-modiconsfiles .fp-btn-mkdir" "css_element" @@ -74,6 +77,7 @@ Feature: Configuring the theme_boost_union plugin for the "Activity branding" ta And I should see "Activity: " in the ".settings-modicons-filelist" "css_element" And I should see "Icon version: " in the ".settings-modicons-filelist" "css_element" # Unfortunately we can only test the result in the custom icons files list. We cannot distinguish the icons in the activity chooser visually + And Behat debugging is enabled Examples: | iconfile | iconversion | modtechname | modclearname | @@ -89,3 +93,4 @@ Feature: Configuring the theme_boost_union plugin for the "Activity branding" ta And I click on "Activity branding" "link" in the "#adminsettings .nav-tabs" "css_element" Then I should not see "Custom icons files list" And ".settings-modicons-filelist" "css_element" should not exist + And Behat debugging is enabled diff --git a/tests/behat/theme_boost_union_looksettings_course.feature b/tests/behat/theme_boost_union_looksettings_course.feature index 878dd3f1670..8f2c3f89560 100644 --- a/tests/behat/theme_boost_union_looksettings_course.feature +++ b/tests/behat/theme_boost_union_looksettings_course.feature @@ -87,10 +87,12 @@ Feature: Configuring the theme_boost_union plugin for the "Course" tab on the "L | config | value | plugin | | courseheaderimageenabled | yes | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Course" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg2.jpg" file to "Fallback course header image" filemanager And I press "Save changes" + And Behat debugging is enabled And I am on site homepage And I log out And I am on site homepage @@ -111,10 +113,12 @@ Feature: Configuring the theme_boost_union plugin for the "Course" tab on the "L | config | value | plugin | | courseheaderimageenabled | yes | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Course" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg2.jpg" file to "Fallback course header image" filemanager And I press "Save changes" + And Behat debugging is enabled And I am on site homepage And I log out And I am on site homepage diff --git a/tests/behat/theme_boost_union_looksettings_emailbranding.feature b/tests/behat/theme_boost_union_looksettings_emailbranding.feature index 7809eb4cc28..73bddae00ee 100644 --- a/tests/behat/theme_boost_union_looksettings_emailbranding.feature +++ b/tests/behat/theme_boost_union_looksettings_emailbranding.feature @@ -13,6 +13,7 @@ Feature: Configuring the theme_boost_union plugin for the "E-Mail branding" tab # | theme_boost_union | templateemailhtmlprefix | My HTML prefix | # | theme_boost_union | templateemailhtmlsuffix | My HTML suffix | # When I log in as "admin" +# And Behat debugging is disabled # And I navigate to "Appearance > Boost Union > Look" in site administration # And I click on "E-Mail branding" "link" in the "#adminsettings .nav-tabs" "css_element" # Then I should not see "Up to now, the HTML E-Mails haven't been customized within this feature" @@ -23,14 +24,17 @@ Feature: Configuring the theme_boost_union plugin for the "E-Mail branding" tab # And "Plaintext E-Mail preview" "text" should appear after "My HTML suffix" "text" # And "My HTML prefix" "text" should appear before "Lorem ipsum dolor sit amet" "text" # And "My HTML suffix" "text" should appear after "Lorem ipsum dolor sit amet" "text" +# And Behat debugging is enabled @javascript Scenario: Setting: HTML E-Mail branding (countercheck) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "E-Mail branding" "link" in the "#adminsettings .nav-tabs" "css_element" Then I should see "Up to now, the HTML E-Mails haven't been customized within this feature" And I should not see "This is a preview of a HTML E-Mail" + And Behat debugging is enabled # Unfortunately, this can't be tested with Behat yet # See https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/issues/140 for details @@ -41,6 +45,7 @@ Feature: Configuring the theme_boost_union plugin for the "E-Mail branding" tab # | theme_boost_union | templateemailtextprefix | My plaintext prefix | # | theme_boost_union | templateemailtextsuffix | My plaintext suffix | # When I log in as "admin" +# And Behat debugging is disabled # And I navigate to "Appearance > Boost Union > Look" in site administration # And I click on "E-Mail branding" "link" in the "#adminsettings .nav-tabs" "css_element" # Then I should not see "Up to now, the plaintext E-Mails haven't been customized within this feature" @@ -51,11 +56,14 @@ Feature: Configuring the theme_boost_union plugin for the "E-Mail branding" tab # And "HTML E-Mail preview" "text" should appear before "My HTML suffix" "text" # And "My plaintext prefix" "text" should appear before "Lorem ipsum dolor sit amet" "text" # And "My plaintext suffix" "text" should appear after "Lorem ipsum dolor sit amet" "text" +# And Behat debugging is enabled @javascript Scenario: Setting: Plaintext E-Mail branding (countercheck) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "E-Mail branding" "link" in the "#adminsettings .nav-tabs" "css_element" Then I should see "Up to now, the plaintext E-Mails haven't been customized within this feature" And I should not see "This is a preview of a plaintext E-Mail" + And Behat debugging is enabled diff --git a/tests/behat/theme_boost_union_looksettings_h5p.feature b/tests/behat/theme_boost_union_looksettings_h5p.feature index 3865f9d2c14..1ac9e2bb7f2 100644 --- a/tests/behat/theme_boost_union_looksettings_h5p.feature +++ b/tests/behat/theme_boost_union_looksettings_h5p.feature @@ -20,6 +20,7 @@ Feature: Configuring the theme_boost_union plugin for the "H5P" tab on the "Look @javascript Scenario: Setting: Raw CSS for H5P - Add custom SCSS to a mod_h5p content type When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "H5P" "link" in the "#adminsettings .nav-tabs" "css_element" # We add a small CSS snippet to the page which makes the H5P content red. @@ -31,6 +32,7 @@ Feature: Configuring the theme_boost_union plugin for the "H5P" tab on the "Look } """ And I press "Save changes" + And Behat debugging is enabled And I am on "Course 1" course homepage with editing mode on Given the following "activity" exists: | activity | h5pactivity | diff --git a/tests/behat/theme_boost_union_looksettings_loginpage.feature b/tests/behat/theme_boost_union_looksettings_loginpage.feature index 359c7fd58a1..06b07f179f3 100644 --- a/tests/behat/theme_boost_union_looksettings_loginpage.feature +++ b/tests/behat/theme_boost_union_looksettings_loginpage.feature @@ -14,10 +14,12 @@ Feature: Configuring the theme_boost_union plugin for the "Login page" tab on th @javascript @_file_upload Scenario: Setting: Login page background images - Upload one custom login background image When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Login page" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Login page background images" filemanager And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" Then the "class" attribute of "body" "css_element" should contain "path-login" @@ -27,12 +29,14 @@ Feature: Configuring the theme_boost_union plugin for the "Login page" tab on th @javascript @_file_upload Scenario: Setting: Login page background images - Upload multiple custom login background image (and have one picked randomly) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Login page" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Login page background images" filemanager And I upload "theme/boost_union/tests/fixtures/login_bg2.jpg" file to "Login page background images" filemanager And I upload "theme/boost_union/tests/fixtures/login_bg3.jpg" file to "Login page background images" filemanager And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" Then the "class" attribute of "body" "css_element" should contain "path-login" @@ -48,10 +52,12 @@ Feature: Configuring the theme_boost_union plugin for the "Login page" tab on th | config | value | plugin | | loginbackgroundimageposition | | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Login page" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Login page background images" filemanager And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" Then DOM element "body.pagelayout-login" should have computed style "background-position" "" @@ -65,11 +71,13 @@ Feature: Configuring the theme_boost_union plugin for the "Login page" tab on th @javascript @_file_upload Scenario: Setting: Display text for login background images - Add a text to the login background image When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Login page" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Login page background images" filemanager And I set the field "Display text for login background images" to "login_bg1.jpg|Copyright by SplitShire on pexels.com|dark" And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" Then I should see "Copyright by SplitShire on pexels.com" in the "#loginbackgroundimagetext" "css_element" @@ -77,11 +85,13 @@ Feature: Configuring the theme_boost_union plugin for the "Login page" tab on th @javascript @_file_upload Scenario Outline: Setting: Display text for login background images - Match the text to the filename When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Login page" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Login page background images" filemanager And I set the field "Display text for login background images" to ".jpg|Copyright by SplitShire on pexels.com|dark" And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" Then "#loginbackgroundimagetext" "css_element" @@ -94,11 +104,13 @@ Feature: Configuring the theme_boost_union plugin for the "Login page" tab on th @javascript @_file_upload Scenario Outline: Setting: Display text for login background images - Set the color for the text of the login background image When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Login page" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Login page background images" filemanager And I set the field "Display text for login background images" to "login_bg1.jpg|Copyright by SplitShire on pexels.com|" And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" Then the "class" attribute of "#loginbackgroundimagetext span" "css_element" should contain "text-" diff --git a/tests/behat/theme_boost_union_looksettings_mobile.feature b/tests/behat/theme_boost_union_looksettings_mobile.feature index a23efe06a07..0cfa3a07d83 100644 --- a/tests/behat/theme_boost_union_looksettings_mobile.feature +++ b/tests/behat/theme_boost_union_looksettings_mobile.feature @@ -11,6 +11,7 @@ Feature: Configuring the theme_boost_union plugin for the "Mobile" tab on the "L Scenario: Setting: Additional CSS for Mobile app - Insert CSS code and test that the mobilecssurl URL is set correctly. When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Mobile" "link" in the "#adminsettings .nav-tabs" "css_element" And I set the field "Additional CSS for Mobile app" to multiline: @@ -18,6 +19,7 @@ Feature: Configuring the theme_boost_union plugin for the "Mobile" tab on the "L a.test { font-size: 16px; } """ And I press "Save changes" + And Behat debugging is enabled And I navigate to "General > Mobile app > Mobile appearance" in site administration Then "//div[@id='admin-mobilecssurl']//input[contains(@value, 'theme/boost_union/mobile/styles.php')]" "xpath_element" should exist @@ -26,6 +28,7 @@ Feature: Configuring the theme_boost_union plugin for the "Mobile" tab on the "L | config | value | | mobilecssurl | https://mymoodle/mycss.css | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Mobile" "link" in the "#adminsettings .nav-tabs" "css_element" And I set the field "Additional CSS for Mobile app" to multiline: @@ -33,6 +36,7 @@ Feature: Configuring the theme_boost_union plugin for the "Mobile" tab on the "L a.test { font-size: 16px; } """ And I press "Save changes" + And Behat debugging is enabled And I navigate to "General > Mobile app > Mobile appearance" in site administration Then "//div[@id='admin-mobilecssurl']//input[contains(@value, 'theme/boost_union/mobile/styles.php')]" "xpath_element" should exist And I should not see "mycss.css" in the "#id_s__mobilecssurl" "css_element" @@ -45,12 +49,14 @@ Feature: Configuring the theme_boost_union plugin for the "Mobile" tab on the "L | config | value | plugin | | mobilescss | a.test { font-size: 16px; } | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Mobile" "link" in the "#adminsettings .nav-tabs" "css_element" And I set the field "Additional CSS for Mobile app" to multiline: """ """ And I press "Save changes" + And Behat debugging is enabled And I navigate to "General > Mobile app > Mobile appearance" in site administration Then "//div[@id='admin-mobilecssurl']//input[contains(@value, 'theme/boost_union/mobile/styles.php')]" "xpath_element" should not exist @@ -60,6 +66,7 @@ Feature: Configuring the theme_boost_union plugin for the "Mobile" tab on the "L @javascript @_file_upload Scenario: Setting: Touch icon files for iOS - Upload touch icon files When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Mobile" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/apple-icon-180x180.png" file to "Touch icon files for iOS" filemanager @@ -81,11 +88,14 @@ Feature: Configuring the theme_boost_union plugin for the "Mobile" tab on the "L And "//head//link[contains(@rel, 'apple-touch-icon')][contains(@sizes, '180x180')][contains(@href, 'pluginfile.php/1/theme_boost_union/touchiconsios')][contains(@href, 'apple-icon-180x180.png')]" "xpath_element" should exist And "//head//link[contains(@rel, 'apple-touch-icon')][contains(@sizes, '152x152')][contains(@href, 'pluginfile.php/1/theme_boost_union/touchiconsios')][contains(@href, 'apple-icon-152x152.png')]" "xpath_element" should not exist And "//head//link[contains(@rel, 'apple-touch-icon')][contains(@sizes, '60x60')][contains(@href, 'pluginfile.php/1/theme_boost_union/touchiconsios')][contains(@href, 'apple-icon-60x60.png')]" "xpath_element" should exist + And Behat debugging is enabled @javascript @_file_upload Scenario: Setting: Touch icon files for iOS - Do not upload any file (countercheck) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Mobile" "link" in the "#adminsettings .nav-tabs" "css_element" Then I should not see "Touch icon files for iOS list" And ".settings-touchiconsios-filelist" "css_element" should not exist + And Behat debugging is enabled diff --git a/tests/behat/theme_boost_union_looksettings_resources.feature b/tests/behat/theme_boost_union_looksettings_resources.feature index 0e61ed0e8de..241622e3682 100644 --- a/tests/behat/theme_boost_union_looksettings_resources.feature +++ b/tests/behat/theme_boost_union_looksettings_resources.feature @@ -7,6 +7,7 @@ Feature: Configuring the theme_boost_union plugin for the "Resources" tab on the @javascript @_file_upload Scenario: Setting: Additional resources - Upload additional resources files When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Resources" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Additional resources" filemanager @@ -23,18 +24,22 @@ Feature: Configuring the theme_boost_union plugin for the "Resources" tab on the And I should see "/pluginfile.php/1/theme_boost_union/additionalresources/0/login_bg1.jpg" in the ".settings-additionalresources-filelist" "css_element" And I should see "URL (revisioned):" in the ".settings-additionalresources-filelist" "css_element" # Checking the revisioned URL is not possible currently with Behat without writing a custom step. We accept this for now. + And Behat debugging is enabled @javascript @_file_upload Scenario: Setting: Additional resources - Do not upload any file (countercheck) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Resources" "link" in the "#adminsettings .nav-tabs" "css_element" Then I should not see "Additional resources list" And ".settings-additionalresources-filelist" "css_element" should not exist + And Behat debugging is enabled @javascript @_file_upload Scenario: Setting: Custom fonts - Upload custom fonts files When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Resources" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/roboto-v30-latin-regular.woff" file to "Custom fonts" filemanager @@ -46,11 +51,14 @@ Feature: Configuring the theme_boost_union plugin for the "Resources" tab on the And I should see "roboto-v30-latin-regular.woff" in the ".settings-customfonts-filelist h6" "css_element" And I should see "@font-face" in the ".settings-customfonts-filelist" "css_element" And I should see "/pluginfile.php/1/theme_boost_union/customfonts/0/roboto-v30-latin-regular.woff" in the ".settings-customfonts-filelist" "css_element" + And Behat debugging is enabled @javascript @_file_upload Scenario: Setting: Custom fonts - Do not upload any file (countercheck) When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Resources" "link" in the "#adminsettings .nav-tabs" "css_element" Then I should not see "Custom fonts list" And ".settings-customfonts-filelist" "css_element" should not exist + And Behat debugging is enabled diff --git a/tests/behat/theme_boost_union_looksettings_scss.feature b/tests/behat/theme_boost_union_looksettings_scss.feature index 544b7cb8f86..655f4fb6432 100644 --- a/tests/behat/theme_boost_union_looksettings_scss.feature +++ b/tests/behat/theme_boost_union_looksettings_scss.feature @@ -12,6 +12,7 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo @javascript Scenario: Setting: Raw initial SCSS - Add custom SCSS to the theme When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "SCSS" "link" in the "#adminsettings .nav-tabs" "css_element" # We add a small CSS snippet to the page which hides the heading in the page header. @@ -21,12 +22,14 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo #page-header h1 { display: none; } """ And I press "Save changes" + And Behat debugging is enabled And I am on "Course 1" course homepage Then I should not see "Course 1" in the "#page-header .page-header-headings" "css_element" @javascript Scenario: Setting: Raw SCSS - Add custom SCSS to the theme When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "SCSS" "link" in the "#adminsettings .nav-tabs" "css_element" # We add a small CSS snippet to the page which hides the heading in the page header. @@ -36,6 +39,7 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo #page-header h1 { display: none; } """ And I press "Save changes" + And Behat debugging is enabled And I am on "Course 1" course homepage Then I should not see "Course 1" in the "#page-header .page-header-headings" "css_element" @@ -45,6 +49,7 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo | config | value | plugin | | extscsssource | 1 | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "SCSS" "link" in the "#adminsettings .nav-tabs" "css_element" # We add a small CSS snippet to the page which hides the heading in the page header. @@ -52,6 +57,7 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo And I set the following fields to these values: | | | And I press "Save changes" + And Behat debugging is enabled And I am on "Course 1" course homepage Then I should not see "Course 1" in the "#page-header .page-header-headings" "css_element" @@ -66,6 +72,7 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo | config | value | plugin | | extscsssource | 2 | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "SCSS" "link" in the "#adminsettings .nav-tabs" "css_element" # We add a small CSS snippet to the page which hides the heading in the page header. @@ -76,6 +83,7 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo | External SCSS Github API repository | moodle-theme_boost_union-extscsstest | | | | And I press "Save changes" + And Behat debugging is enabled And I am on "Course 1" course homepage Then I should not see "Course 1" in the "#page-header .page-header-headings" "css_element" @@ -92,6 +100,7 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo | config | value | plugin | | extscsssource | 1 | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "SCSS" "link" in the "#adminsettings .nav-tabs" "css_element" # We first add a valid CSS snippet to the page which is just there to detect later that SCSS has been compiled correctly. @@ -105,6 +114,7 @@ Feature: Configuring the theme_boost_union plugin for the "SCSS" tab on the "Loo # And then we add a broken SCSS URL / invalid external SCSS code to the theme. And I set the field "External Post SCSS download URL" to "" And I press "Save changes" + And Behat debugging is enabled And I am on "Course 1" course homepage # Regardless of the fact that broken / invalid SCSS code has been fetched from the external source, the SCSS # should be compiled correctly. diff --git a/tests/behat/theme_boost_union_looksettings_sitebranding.feature b/tests/behat/theme_boost_union_looksettings_sitebranding.feature index e03efc5410b..12a91169895 100644 --- a/tests/behat/theme_boost_union_looksettings_sitebranding.feature +++ b/tests/behat/theme_boost_union_looksettings_sitebranding.feature @@ -20,10 +20,12 @@ Feature: Configuring the theme_boost_union plugin for the "Site branding" tab on @javascript @_file_upload Scenario: Setting: Logo - Upload a custom logo to the theme When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/moodlelogo.png" file to "Logo" filemanager And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" # We can't check the uploaded image file visually, but we can verify that the compact logo is shipped from the theme_boost_union global logo filearea. @@ -48,10 +50,12 @@ Feature: Configuring the theme_boost_union plugin for the "Site branding" tab on @javascript @_file_upload Scenario: Setting: Compact logo - Upload a PNG logo to the theme and check that it is resized When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/moodlelogo.png" file to "Logo" filemanager And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" Then "//div[@id='loginlogo']//img[@id='logoimage'][contains(@src, 'pluginfile.php/1/theme_boost_union/logo/0x200/')]" "xpath_element" should exist @@ -59,10 +63,12 @@ Feature: Configuring the theme_boost_union plugin for the "Site branding" tab on @javascript @_file_upload Scenario: Setting: Compact logo - Upload a SVG logo to the theme and check that it is not resized When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/moodlelogo.svg" file to "Logo" filemanager And I press "Save changes" + And Behat debugging is enabled And I log out And I click on "Log in" "link" in the ".logininfo" "css_element" Then "//div[@id='loginlogo']//img[@id='logoimage'][contains(@src, 'pluginfile.php/1/theme_boost_union/logo/1/')]" "xpath_element" should exist @@ -70,10 +76,12 @@ Feature: Configuring the theme_boost_union plugin for the "Site branding" tab on @javascript @_file_upload Scenario: Setting: Compact logo - Upload a custom compact logo to the theme When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/moodlelogo.png" file to "Compact logo" filemanager And I press "Save changes" + And Behat debugging is enabled And I am on site homepage # We can't check the uploaded image file visually, but we can verify that the compact logo is shipped from the theme_boost_union global logo filearea. Then "//nav[contains(@class, 'navbar')]//img[contains(@class, 'logo')][contains(@src, 'pluginfile.php/1/theme_boost_union/logocompact')][contains(@src, 'moodlelogo.png')]" "xpath_element" should exist @@ -95,30 +103,36 @@ Feature: Configuring the theme_boost_union plugin for the "Site branding" tab on @javascript @_file_upload Scenario: Setting: Compact logo - Upload a PNG compact logo to the theme and check that it is resized When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/moodlelogo.png" file to "Compact logo" filemanager And I press "Save changes" + And Behat debugging is enabled And I am on site homepage Then "//nav[contains(@class, 'navbar')]//img[contains(@class, 'logo')][contains(@src, 'pluginfile.php/1/theme_boost_union/logocompact/300x300/')]" "xpath_element" should exist @javascript @_file_upload Scenario: Setting: Compact logo - Upload a SVG compact logo to the theme and check that it is not resized When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/moodlelogo.svg" file to "Compact logo" filemanager And I press "Save changes" + And Behat debugging is enabled And I am on site homepage Then "//nav[contains(@class, 'navbar')]//img[contains(@class, 'logo')][contains(@src, 'pluginfile.php/1/theme_boost_union/logocompact/1/')]" "xpath_element" should exist @javascript @_file_upload Scenario: Setting: Favicon - Upload a custom favicon to the theme When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/favicon.ico" file to "Favicon" filemanager And I press "Save changes" + And Behat debugging is enabled # We can't check the uploaded favicon visually, but we can verify that the site's favicon is not shipped by pluginfile.php (for uploaded files) and not by theme/image.php (for image files from disk) anymore. Then "//head//link[contains(@rel, 'shortcut')][contains(@href, 'pluginfile.php/1/theme_boost_union/favicon')][contains(@href, 'favicon.ico')]" "xpath_element" should exist And "//head//link[contains(@rel, 'shortcut')][contains(@href, 'theme/image.php/boost_union')][contains(@href, 'favicon')]" "xpath_element" should not exist @@ -144,10 +158,12 @@ Feature: Configuring the theme_boost_union plugin for the "Site branding" tab on | config | value | plugin | | backgroundimageposition | | theme_boost_union | When I log in as "admin" + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And I click on "Site branding" "link" in the "#adminsettings .nav-tabs" "css_element" And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Background image" filemanager And I press "Save changes" + And Behat debugging is enabled And I am on site homepage Then DOM element "body" should have computed style "background-position" "" diff --git a/tests/behat/theme_boost_union_managers.feature b/tests/behat/theme_boost_union_managers.feature index 43fbc744eee..386e45cec30 100644 --- a/tests/behat/theme_boost_union_managers.feature +++ b/tests/behat/theme_boost_union_managers.feature @@ -20,10 +20,12 @@ Feature: Configuring the theme_boost_union plugin as manager And I follow "Site administration" Then ".secondary-navigation li[data-key='appearance']" "css_element" should exist # We just need to test the 'look' page as a representative of all theme admin pages. + And Behat debugging is disabled And I navigate to "Appearance > Boost Union > Look" in site administration And "body#page-admin-setting-theme_boost_union_look" "css_element" should exist And I should see "Look" in the "#region-main" "css_element" And I should see "General settings" in the "#region-main" "css_element" + And Behat debugging is enabled # However, we have to test the 'flavours' page as well as this is an external admin page. And I navigate to "Appearance > Boost Union > Flavours" in site administration And "body#page-admin-theme-boost_union-flavours-overview" "css_element" should exist