Skip to content

Commit

Permalink
[CIVIC-1204] Added SVG support for Logos.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-salsadigital committed Jul 16, 2023
1 parent 5b96278 commit 88fa9be
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/behat/features/theme.settings.components.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
19 changes: 19 additions & 0 deletions tests/behat/fixtures/test_svg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 88fa9be

Please sign in to comment.