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 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" %> diff --git a/spec/features/alchemy/link_overlay_spec.rb b/spec/features/alchemy/link_overlay_spec.rb index d128394..3b04b7b 100644 --- a/spec/features/alchemy/link_overlay_spec.rb +++ b/spec/features/alchemy/link_overlay_spec.rb @@ -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 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.