diff --git a/lib/graphql/dashboard/views/layouts/graphql/dashboard/application.html.erb b/lib/graphql/dashboard/views/layouts/graphql/dashboard/application.html.erb
index 7c53122ba81..1b38cb5d5aa 100644
--- a/lib/graphql/dashboard/views/layouts/graphql/dashboard/application.html.erb
+++ b/lib/graphql/dashboard/views/layouts/graphql/dashboard/application.html.erb
@@ -5,11 +5,11 @@
GraphQL Dashboard <%= content_for?(:title) ? " ยท #{content_for(:title)}" : "" %>
- <%= stylesheet_link_tag graphql_dashboard.static_path("bootstrap-5.3.3.min.css") %>
- <%= stylesheet_link_tag graphql_dashboard.static_path("charts.min.css") %>
- <%= stylesheet_link_tag graphql_dashboard.static_path("dashboard.css") %>
- <%= javascript_include_tag graphql_dashboard.static_path("bootstrap-5.3.3.min.js") %>
- <%= javascript_include_tag graphql_dashboard.static_path("dashboard.js") %>
+ " media="screen" />
+ " media="screen" />
+ " media="screen" />
+
+
<%= csrf_meta_tags %>
diff --git a/spec/dummy/app/views/layouts/application.html.erb b/spec/dummy/app/views/layouts/application.html.erb
index 465617889dc..ff780611953 100644
--- a/spec/dummy/app/views/layouts/application.html.erb
+++ b/spec/dummy/app/views/layouts/application.html.erb
@@ -3,7 +3,9 @@
Dummy
<%= csrf_meta_tags %>
- <%= javascript_include_tag 'application' %>
+ <%=
+ javascript_include_tag 'application', host: "" # work around config.asset_host which is set to test dashboard
+ %>
diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb
index 147ae683d6e..cb63d0237b0 100644
--- a/spec/dummy/config/application.rb
+++ b/spec/dummy/config/application.rb
@@ -19,5 +19,6 @@ module Dummy
class Application < Rails::Application
# Don't generate system test files.
config.generators.system_tests = nil
+ config.asset_host = "http://some.cdn"
end
end
diff --git a/spec/dummy/test/controllers/dashboard/landings_controller_test.rb b/spec/dummy/test/controllers/dashboard/landings_controller_test.rb
index 97fd9822bc6..9fc0fbb5e05 100644
--- a/spec/dummy/test/controllers/dashboard/landings_controller_test.rb
+++ b/spec/dummy/test/controllers/dashboard/landings_controller_test.rb
@@ -2,9 +2,10 @@
require "test_helper"
class DashboardLandingsControllerTest < ActionDispatch::IntegrationTest
- def test_it_shows_a_landing_page
+ def test_it_shows_a_landing_page_with_local_static_asset_links
get graphql_dashboard.root_path
assert_includes response.body, "Welcome to the GraphQL-Ruby Dashboard"
+ assert_includes response.body, '', "it doesn't use config.asset_host"
end
def test_it_shows_version_and_schema_info