i don't know what's happening here... i am seeing ...
# support
e
i don't know what's happening here... i am seeing this code in
Copy code
<% if spree.respond_to? :root_path %>
      <li data-hook="store-frontend-link">
        <%= link_to spree.root_path, target: '_blank' do %>
          <i class='fa fa-external-link'></i>
          <%= t('spree.back_to_store') %>
        <% end %>
      </li>
    <% end %>
and it's kicking off
Copy code
Failures:

  1) Dashboard access when accessing the Solidus dashboard with access will go to the dashboard
     Failure/Error:
                   def #{method}(*args)
                     options = args.extract_options!
                     options = url_options.merge((options || {}).symbolize_keys)

                     if @script_namer
                       options[:script_name] = merge_script_names(
                         options[:script_name],
                         @script_namer.call(options)
                       )
                     end

     ActionView::Template::Error:
       undefined method `root_path' for #<Module:0x000000010c98d700>

     [Screenshot Image]: /Users/eric/dev/slipwise/mos/tmp/capybara/failures_r_spec_example_groups_dashboard_access_when_accessing_the_solidus_dashboard_with_access_will_go_to_the_dashboard_498.png


     # /Users/eric/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/actionpack-7.0.5/lib/action_dispatch/routing/routes_proxy.rb:45:in `root_path'
     # /Users/eric/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/solidus_backend-4.0.0/app/views/spree/admin/shared/_navigation_footer_fallback.html.erb:33:in `___sers_eric__asdf_installs_ruby_______lib_ruby_gems_______gems_solidus_backend_______app_views_spree_admin_shared__navigation_footer_fallback_html_erb___4161283517603043021_318580'
     # /Users/eric/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.0.5/lib/action_view/base.rb:244:in `public_send'
     # /Users/eric/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.0.5/lib/action_view/base.rb:244:in `_run'
via this spec
Copy code
context "when accessing the Solidus dashboard" do
    describe "with access" do
      let(:admin) { create(:account, :admin) }

      it "will go to the dashboard" do
        passwordless_sign_in(admin)
        visit spree.admin_path
        expect(page).to have_css "li", exact_text: "Orders"
      end
    end
  end
i gather that it is expected that i don't have a
spree.root_path
because i am not using the front-end, only core & the back-end. i am happy to add
spree.root_path
if anyone knows how, or does anyone have any ideas without having to edit the template?
k
it’s very strange since there’s this check
Copy code
<% if spree.respond_to? :root_path %>
which should prevent to enter the code block that calls
spree.root_path
. Can you please check the return value of that
if
statement in that context?