From 88fa9bebaf209ad037790d06f786c9efc4570244 Mon Sep 17 00:00:00 2001 From: Joshua Fernandes Date: Sun, 16 Jul 2023 22:14:05 +0530 Subject: [PATCH] [CIVIC-1204] Added SVG support for Logos. --- .../theme.settings.components.feature | 16 ++++++++-------- ...g => test_image_logo_svg_dark_desktop.svg} | 0 ...vg => test_image_logo_svg_dark_mobile.svg} | 0 ... => test_image_logo_svg_light_desktop.svg} | 0 ...g => test_image_logo_svg_light_mobile.svg} | 0 tests/behat/fixtures/test_svg.svg | 19 +++++++++++++++++++ 6 files changed, 27 insertions(+), 8 deletions(-) rename tests/behat/fixtures/{test_image_logo_dark_desktop.svg => test_image_logo_svg_dark_desktop.svg} (100%) rename tests/behat/fixtures/{test_image_logo_dark_mobile.svg => test_image_logo_svg_dark_mobile.svg} (100%) rename tests/behat/fixtures/{test_image_logo_light_desktop.svg => test_image_logo_svg_light_desktop.svg} (100%) rename tests/behat/fixtures/{test_image_logo_light_mobile.svg => test_image_logo_svg_light_mobile.svg} (100%) create mode 100644 tests/behat/fixtures/test_svg.svg diff --git a/tests/behat/features/theme.settings.components.feature b/tests/behat/features/theme.settings.components.feature index 5ba6ff387..7669b4333 100644 --- a/tests/behat/features/theme.settings.components.feature +++ b/tests/behat/features/theme.settings.components.feature @@ -223,10 +223,10 @@ Feature: Components settings are available in the theme settings Given I am logged in as a user with the "Site Administrator" role And I visit current theme settings page - When I attach the file "test_image_logo_light_desktop.svg" to "Upload Primary Light logo for Desktop" - And I attach the file "test_image_logo_light_mobile.svg" to "Upload Primary Light logo for Mobile" - And I attach the file "test_image_logo_dark_desktop.svg" to "Upload Primary Dark logo for Desktop" - And I attach the file "test_image_logo_dark_mobile.svg" to "Upload Primary Dark logo for Mobile" + When I attach the file "test_image_logo_svg_light_desktop.svg" to "Upload Primary Light logo for Desktop" + And I attach the file "test_image_logo_svg_light_mobile.svg" to "Upload Primary Light logo for Mobile" + And I attach the file "test_image_logo_svg_dark_desktop.svg" to "Upload Primary Dark logo for Desktop" + And I attach the file "test_image_logo_svg_dark_mobile.svg" to "Upload Primary Dark logo for Mobile" And I select the radio button "Light" with the id "edit-components-header-theme-light" And I select the radio button "Default" with the id "edit-components-header-logo-type-default" And I select the radio button "Dark" with the id "edit-components-footer-theme-dark" @@ -235,10 +235,10 @@ Feature: Components settings are available in the theme settings Then I should see the text "The configuration options have been saved." And I go to the homepage - And I should see the ".ct-logo img.ct-image" element with the "src" attribute set to "/sites/default/files/civictheme_test/logo_light_desktop.svg" - And I should see the ".ct-logo img.ct-image" element with the "src" attribute set to "/sites/default/files/civictheme_test/logo_light_mobile.svg" - And I should see the ".ct-logo img.ct-image" element with the "src" attribute set to "/sites/default/files/civictheme_test/logo_dark_desktop.svg" - And I should see the ".ct-logo img.ct-image" element with the "src" attribute set to "/sites/default/files/civictheme_test/logo_dark_mobile.svg" + And I should see the ".ct-logo img.ct-image" element with the "src" attribute set to "/sites/default/files/test_image_logo_svg_light_desktop.svg" + And I should see the ".ct-logo img.ct-image" element with the "src" attribute set to "/sites/default/files/test_image_logo_svg_light_mobile.svg" + And I should see the ".ct-logo img.ct-image" element with the "src" attribute set to "/sites/default/files/test_image_logo_svg_dark_desktop.svg" + And I should see the ".ct-logo img.ct-image" element with the "src" attribute set to "/sites/default/files/test_image_logo_svg_dark_mobile.svg" # Reset settings. When I visit current theme settings page diff --git a/tests/behat/fixtures/test_image_logo_dark_desktop.svg b/tests/behat/fixtures/test_image_logo_svg_dark_desktop.svg similarity index 100% rename from tests/behat/fixtures/test_image_logo_dark_desktop.svg rename to tests/behat/fixtures/test_image_logo_svg_dark_desktop.svg diff --git a/tests/behat/fixtures/test_image_logo_dark_mobile.svg b/tests/behat/fixtures/test_image_logo_svg_dark_mobile.svg similarity index 100% rename from tests/behat/fixtures/test_image_logo_dark_mobile.svg rename to tests/behat/fixtures/test_image_logo_svg_dark_mobile.svg diff --git a/tests/behat/fixtures/test_image_logo_light_desktop.svg b/tests/behat/fixtures/test_image_logo_svg_light_desktop.svg similarity index 100% rename from tests/behat/fixtures/test_image_logo_light_desktop.svg rename to tests/behat/fixtures/test_image_logo_svg_light_desktop.svg diff --git a/tests/behat/fixtures/test_image_logo_light_mobile.svg b/tests/behat/fixtures/test_image_logo_svg_light_mobile.svg similarity index 100% rename from tests/behat/fixtures/test_image_logo_light_mobile.svg rename to tests/behat/fixtures/test_image_logo_svg_light_mobile.svg diff --git a/tests/behat/fixtures/test_svg.svg b/tests/behat/fixtures/test_svg.svg new file mode 100644 index 000000000..73d679fbb --- /dev/null +++ b/tests/behat/fixtures/test_svg.svg @@ -0,0 +1,19 @@ + + + Download Icon + + + + + + + + + + + + + + + +