Skip to content

Commit

Permalink
Merge pull request #100 from tvdeyen/alchemy-7.1
Browse files Browse the repository at this point in the history
Add deface overrides for Alchemy 7.1
  • Loading branch information
tvdeyen authored Dec 29, 2023
2 parents 3daf168 + b601670 commit f01d924
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
- "3.1"
- "3.2"
alchemy:
- "7.0.0"
- "7.0"
- "main"
solidus:
- "3.3"
- "4.0"
Expand Down
8 changes: 7 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ else
gem "solidus_frontend", "~> #{solidus_version}.0"
end

gem "alchemy_cms", "~> 7.0.0"
alchemy_version = ENV.fetch("ALCHEMY_VERSION", "main")
if alchemy_version == "main"
gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: "main"
else
gem "alchemy_cms", "~> #{alchemy_version}.0"
end

gem "alchemy-devise", github: "AlchemyCMS/alchemy-devise", branch: "main"

# Specify your gem's dependencies in alchemy-solidus.gemspec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- insert_bottom "#overlay_tabs" -->
<!-- insert_bottom "div#overlay_tabs" -->

<div id="overlay_tab_product_link">
<%= render "product_link" %>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- insert_bottom "sl-tab-group#overlay_tabs" -->

<sl-tab-panel name="overlay_tab_product_link" id="overlay_tab_product_link">
<%= render "product_link" %>
</sl-tab-panel>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- insert_bottom "sl-tab-group#overlay_tabs" -->

<sl-tab slot="nav" panel="overlay_tab_product_link">
<%= Alchemy.t("link_overlay_tab_label.product") %>
</sl-tab>
6 changes: 3 additions & 3 deletions app/views/alchemy/admin/pages/_product_link.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= form_tag do %>
<form data-link-form-type="product">
<%= render_message do %>
<h3><%= Alchemy.t(:choose_product_to_link) %></h3>
<% end %>
Expand All @@ -23,8 +23,8 @@
class: 'alchemy_selectbox link_target' %>
</div>
<div class="submit">
<%= button_tag Alchemy.t(:apply), class: 'create-link button', data: { link_type: 'product' } %>
<%= button_tag Alchemy.t(:apply), class: "create-link button", data: { link_type: "product" } %>
</div>
<% end %>
</form>

<%= render "product_link_script" %>
12 changes: 10 additions & 2 deletions spec/features/alchemy/link_overlay_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,19 @@

within "#element_#{element.id}" do
fill_in "Headline", with: "Link me"
click_link "Link text"
begin
click_link Alchemy.t(:place_link)
rescue Capybara::ElementNotFound
click_button_with_tooltip Alchemy.t(:place_link)
end
end

within "#overlay_tabs" do
click_link "Product"
begin
find("sl-tab", text: "Product").click
rescue Capybara::ElementNotFound
click_link "Product"
end
end

within "#overlay_tab_product_link" do
Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }

require "rspec/rails"
require "capybara/rails"
require "capybara-screenshot/rspec"
require "factory_bot"
require "ffaker"
require "rspec/rails"

# Checks for pending migrations and applies them before tests are run.
# If you are not using ActiveRecord, you can remove this line.
Expand Down

0 comments on commit f01d924

Please sign in to comment.