From e382a0045f8c6ad43dad543c310917b227d2c9a6 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Fri, 29 Dec 2023 11:09:45 +0100 Subject: [PATCH 1/4] Fix capybara screenshot setup We need to load rspec first in order to get automatic screenshots --- spec/rails_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 3b7da99..c1479ac 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -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. From 3df56a8397a984a13a55585daea78030cceaa48f Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 20 Dec 2023 08:44:57 +0100 Subject: [PATCH 2/4] Add deface overrides for Alchemy 7.1 The link dialog in Alchemy 7.1 has changed. It now uses Shoelace Tabs made out of Custom Web Components. This keeps existing overrides. Note: That will cause a note in Rails log about not matching overrides. Those can safely be ignored. --- .../admin/pages/link/product_link.html.erb.deface | 2 +- .../pages/link/product_link_panel.html.erb.deface | 5 +++++ .../pages/link/product_link_sl_tab.html.erb.deface | 5 +++++ spec/features/alchemy/link_overlay_spec.rb | 12 ++++++++++-- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 app/overrides/alchemy/admin/pages/link/product_link_panel.html.erb.deface create mode 100644 app/overrides/alchemy/admin/pages/link/product_link_sl_tab.html.erb.deface diff --git a/app/overrides/alchemy/admin/pages/link/product_link.html.erb.deface b/app/overrides/alchemy/admin/pages/link/product_link.html.erb.deface index 9905c42..7844cad 100644 --- a/app/overrides/alchemy/admin/pages/link/product_link.html.erb.deface +++ b/app/overrides/alchemy/admin/pages/link/product_link.html.erb.deface @@ -1,4 +1,4 @@ - +
- <%= 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" } %>
-<% end %> + <%= render "product_link_script" %> From b601670bcf95b275d91196ca4970d5ee6844e6d3 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 21 Dec 2023 13:05:43 +0100 Subject: [PATCH 4/4] Test with Alchemy 7.1.a --- .github/workflows/ci.yml | 3 ++- Gemfile | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4770d64..afb703e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,8 @@ jobs: - "3.1" - "3.2" alchemy: - - "7.0.0" + - "7.0" + - "main" solidus: - "3.3" - "4.0" diff --git a/Gemfile b/Gemfile index a3a8dcb..90cb937 100644 --- a/Gemfile +++ b/Gemfile @@ -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