A platform for community discussion. Free, open, simple.
DEV: Remove ember-cli flags from the backend (#17147)
Jarek Radosz2c1fc28d00c4
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 9e045655590..270ee753d9e 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -153,9 +153,9 @@ jobs:if: matrix.build_type == 'backend' && matrix.target == 'plugins'run: bin/rake plugin:spec- - name: Plugin QUnit (Ember CLI)+ - name: Plugin QUnitif: matrix.build_type == 'frontend' && (matrix.target == 'plugins' || matrix.target == 'core-plugins')- run: QUNIT_EMBER_CLI=1 bin/rake plugin:qunit['*','1200000']+ run: bin/rake plugin:qunit['*','1200000']timeout-minutes: 30- name: Check Annotationsdiff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rbindex 1eaaabdcb6f..9f02aff3ee5 100644--- a/app/controllers/application_controller.rb+++ b/app/controllers/application_controller.rb@@ -102,7 +102,7 @@ class ApplicationController < ActionController::Baseenddef ember_cli_required?- Rails.env.development? && ENV['NO_EMBER_CLI'] != '1' && request.headers['X-Discourse-Ember-CLI'] != 'true'+ Rails.env.development? && ENV["ALLOW_EMBER_CLI_PROXY_BYPASS"] != "1" && request.headers['X-Discourse-Ember-CLI'] != 'true'enddef application_layoutdiff --git a/app/controllers/qunit_controller.rb b/app/controllers/qunit_controller.rbindex fe4ed7ce1a0..4ee3392d507 100644--- a/app/controllers/qunit_controller.rb+++ b/app/controllers/qunit_controller.rb@@ -8,16 +8,6 @@ class QunitController < ApplicationController}layout false- def is_ember_cli_proxy?- request.headers["HTTP_X_DISCOURSE_EMBER_CLI"] == "true"- end-- # only used in non-ember-cli test / dev- def index- raise Discourse::NotFound.new if is_ember_cli_proxy? || EmberCli.enabled?- raise Discourse::InvalidAccess.new if Rails.env.production?- end-def themeraise Discourse::NotFound.new if !can_see_theme_qunit?diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rbindex 82b29b7ddaa..3b2306eae21 100644--- a/app/helpers/application_helper.rb+++ b/app/helpers/application_helper.rb@@ -136,11 +136,9 @@ module ApplicationHelperenddef preload_script(script)- script = EmberCli.transform_name(script)-scripts = [script]- if EmberCli.enabled? && chunks = EmberCli.script_chunks[script]+ if chunks = EmberCli.script_chunks[script]scripts.push(*chunks)enddiff --git a/app/helpers/qunit_helper.rb b/app/helpers/qunit_helper.rbindex edeefa8d988..e0376a1ad26 100644--- a/app/helpers/qunit_helper.rb+++ b/app/helpers/qunit_helper.rb@@ -1,33 +1,6 @@# frozen_string_literal: truemodule QunitHelper-- def vendor_theme_tests- if EmberCli.enabled?- preload_script("vendor")- else- preload_script("vendor-theme-tests")- end- end-- def support_bundles- result = [- preload_script("discourse/tests/test-support-rails"),- preload_script("discourse/tests/test-helpers-rails")- ].join("\n").html_safe- end-- def boot_bundles- result = []- if EmberCli.enabled?- result << preload_script("scripts/discourse-test-listen-boot")- result << preload_script("scripts/discourse-boot")- else- result << preload_script("discourse/tests/test_starter")- end- result.join("\n").html_safe- end-def theme_teststheme = Theme.find_by(id: request.env[:resolved_theme_id])return "" if theme.blank?diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erbindex 2449c821fe8..f0cef4d66b3 100644--- a/app/views/layouts/application.html.erb+++ b/app/views/layouts/application.html.erb@@ -28,7 +28,7 @@<%= preload_script_url ExtraLocalesController.url('overrides') %><%- end %><%= preload_script "vendor" %>- <%= preload_script "application" %>+ <%= preload_script "discourse" %><%- Discourse.find_plugin_js_assets(include_official: allow_plugins?, include_unofficial: allow_third_party_plugins?, request: request).each do |file| %><%= preload_script file %><%- end %>@@ -57,7 +57,6 @@<meta name="apple-itunes-app" content="app-id=<%= SiteSetting.ios_app_id %><%= ios_app_argument %>"><%- end %>-<%= yield :head %><%= build_plugin_html 'server:before-head-close' %>@@ -118,7 +117,6 @@</form><% end %>-<script defer src="<%= script_asset_path "start-discourse" %>"></script><%= yield :data %>diff --git a/app/views/qunit/index.html.erb b/app/views/qunit/index.html.erbdeleted file mode 100644index 3dbac746a16..00000000000--- a/app/views/qunit/index.html.erb+++ /dev/null@@ -1,27 +0,0 @@-<!DOCTYPE html>-<html>- <head>- <title>QUnit Test Runner</title>- <%= discourse_color_scheme_stylesheets %>- <%= discourse_stylesheet_link_tag(:desktop, theme_id: nil) %>- <%= discourse_stylesheet_link_tag(:test_helper, theme_id: nil) %>- <%= preload_script "locales/#{I18n.locale}" %>- <%= preload_script "vendor" %>- <%= preload_script "application" %>- <%= preload_script "admin" %>- <%= preload_script "wizard" %>- <%= preload_script "discourse/tests/test-support-rails" %>- <%= preload_script "discourse/tests/test-helpers-rails" %>- <%= preload_script "discourse/tests/active-plugins" %>- <%= preload_script "discourse/tests/core-tests" %>- <%= preload_script "discourse/tests/plugin-tests" %>- <%= preload_script "discourse/tests/test_starter" %>- <%= csrf_meta_tags %>- <meta property="og:title" content="">- <meta property="og:url" content="">- </head>- <body>- <div id="qunit"></div>- <div id="qunit-fixture"></div>- </body>-</html>diff --git a/app/views/qunit/theme.html.erb b/app/views/qunit/theme.html.erbindex 25ab0eff67a..5b2b4c1cdee 100644--- a/app/views/qunit/theme.html.erb+++ b/app/views/qunit/theme.html.erb@@ -7,12 +7,13 @@<%= discourse_stylesheet_link_tag(:desktop, theme_id: nil) %><%= discourse_stylesheet_link_tag(:test_helper, theme_id: nil) %><%= preload_script "locales/#{I18n.locale}" %>- <%= vendor_theme_tests %>- <%= preload_script "application" %>+ <%= preload_script "vendor" %>+ <%= preload_script "discourse" %><%= preload_script "admin" %><%= preload_script "discourse/tests/active-plugins" %><%= preload_script "admin-plugins" %>- <%= support_bundles %>+ <%= preload_script "test-support" %>+ <%= preload_script "test-helpers" %><%= theme_translations_lookup %><%= theme_js_lookup %><%= theme_lookup("head_tag") %>@@ -33,12 +34,7 @@<%- end %></head><body>- <%- if !@suggested_themes %>- <%- if !EmberCli.enabled? %>- <div id="qunit"></div>- <div id="qunit-fixture"></div>- <%- end %>- <%- else %>+ <%- if @suggested_themes %><h2>Theme QUnit Test Runner</h2><%- if @suggested_themes.size == 0 %><p>Cannot find any theme tests.</p>@@ -51,6 +47,7 @@<%- end %></body><%- if !@suggested_themes %>- <%= boot_bundles %>+ <%= preload_script "scripts/discourse-test-listen-boot" %>+ <%= preload_script "scripts/discourse-boot" %><%- end %></html>diff --git a/config/application.rb b/config/application.rbindex 2b69416af9a..249b0874452 100644--- a/config/application.rb+++ b/config/application.rb@@ -188,13 +188,11 @@ module DiscourseSprockets.register_mime_type 'application/javascript', extensions: ['.js', '.es6', '.js.es6'], charset: :unicodeSprockets.register_postprocessor 'application/javascript', DiscourseJsProcessor- if EmberCli.enabled?- Discourse::Application.initializer :prepend_ember_assets do |app|- # Needs to be in its own initializer so it runs after the append_assets_path initializer defined by Sprockets- app.config.assets.paths.unshift "#{app.config.root}/app/assets/javascripts/discourse/dist/assets"- Sprockets.unregister_postprocessor 'application/javascript', Sprockets::Rails::SourcemappingUrlProcessor- Sprockets.register_postprocessor 'application/javascript', DiscourseSourcemappingUrlProcessor- end+ Discourse::Application.initializer :prepend_ember_assets do |app|+ # Needs to be in its own initializer so it runs after the append_assets_path initializer defined by Sprockets+ app.config.assets.paths.unshift "#{app.config.root}/app/assets/javascripts/discourse/dist/assets"+ Sprockets.unregister_postprocessor 'application/javascript', Sprockets::Rails::SourcemappingUrlProcessor+ Sprockets.register_postprocessor 'application/javascript', DiscourseSourcemappingUrlProcessorendrequire 'discourse_redis'diff --git a/config/initializers/assets.rb b/config/initializers/assets.rbindex 22bbcb067e5..e07b3cc12f5 100644--- a/config/initializers/assets.rb+++ b/config/initializers/assets.rb@@ -22,9 +22,12 @@ Rails.application.config.assets.precompile += [lambda do |filename, path|end]Rails.application.config.assets.precompile += %w{+ discourse.jsvendor.jsadmin.jswizard.js+ test-support.js+ test-helpers.jsbrowser-detect.jsbrowser-update.jsbreak_string.js@@ -44,18 +47,11 @@ Rails.application.config.assets.precompile += %w{onpopstate-handler.jsembed-application.jsadmin-plugins.js+ scripts/discourse-test-listen-boot+ scripts/discourse-boot}-if EmberCli.enabled?- Rails.application.config.assets.precompile += %w{- discourse.js- test-support.js- test-helpers.js- scripts/discourse-test-listen-boot- scripts/discourse-boot- }- Rails.application.config.assets.precompile += EmberCli::ASSETS.map { |name| name.sub('.js', '.map') }-end+Rails.application.config.assets.precompile += EmberCli::ASSETS.map { |name| name.sub('.js', '.map') }# Precompile all available localesunless GlobalSetting.try(:omit_base_locales)diff --git a/config/routes.rb b/config/routes.rbindex 8d30a1fd671..3f8954ea9e9 100644--- a/config/routes.rb+++ b/config/routes.rb@@ -1001,10 +1001,6 @@ Discourse::Application.routes.draw doget "/safe-mode" => "safe_mode#index"post "/safe-mode" => "safe_mode#enter", as: "safe_mode_enter"- unless Rails.env.production?- get "/qunit" => "qunit#index"- get "/wizard/qunit" => "wizard#qunit"- endget "/theme-qunit" => "qunit#theme"post "/push_notifications/subscribe" => "push_notification#subscribe"diff --git a/lib/ember_cli.rb b/lib/ember_cli.rbindex 04387c67e77..a1944f4585d 100644--- a/lib/ember_cli.rb+++ b/lib/ember_cli.rb@@ -10,19 +10,6 @@ module EmberClivendor.js)- ALIASES ||= {- "application" => "discourse",- "discourse/tests/test-support-rails" => "test-support",- "discourse/tests/test-helpers-rails" => "test-helpers"- }-- def self.enabled?- if !Rails.env.production? && ENV["EMBER_CLI_PROD_ASSETS"] == "0"- STDERR.puts "The 'legacy' ember environment is discontinued. Running with ember-cli assets. Remove the EMBER_CLI_PROD_ASSETS=0 flag."- end- true- end-def self.script_chunksreturn @@chunk_infos if defined? @@chunk_infos@@ -40,17 +27,7 @@ module EmberCli{}end- # Some assets have changed name following the switch- # to ember-cli. When the switch is complete, we can- # drop this method and update all the references- # to use the new names- def self.transform_name(name)- return name if !enabled?- ALIASES[name] || name- end-def self.is_ember_cli_asset?(name)- return false if !enabled?ASSETS.include?(name) || name.start_with?("chunk.")endenddiff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rakeindex d5c84ec344a..12859f99012 100644--- a/lib/tasks/assets.rake+++ b/lib/tasks/assets.rake@@ -1,15 +1,6 @@# frozen_string_literal: true-if !defined?(EMBER_CLI)- EMBER_CLI = EmberCli.enabled?-end--if ENV["EMBER_CLI_PROD_ASSETS"] == "0"- STDERR.puts "The 'legacy' ember environment is discontinued. Compiling with ember-cli assets..."-end-task 'assets:precompile:before' do-require 'uglifier'require 'open3'@@ -17,7 +8,7 @@ task 'assets:precompile:before' doraise "rake assets:precompile should only be run in RAILS_ENV=production, you are risking unminified assets"end- if EMBER_CLI && !(ENV["EMBER_CLI_COMPILE_DONE"] == "1")+ if ENV["EMBER_CLI_COMPILE_DONE"] != "1"compile_command = "NODE_OPTIONS='--max-old-space-size=2048' yarn --cwd app/assets/javascripts/discourse run ember build -prod"only_assets_precompile_remaining = (ARGV.last == "assets:precompile")@@ -55,12 +46,10 @@ task 'assets:precompile:before' dorequire 'sprockets'require 'digest/sha1'- if EMBER_CLI- # Add ember cli chunks- Rails.configuration.assets.precompile.push(- *EmberCli.script_chunks.values.flatten.flat_map { |name| ["#{name}.js", "#{name}.map"] }- )- end+ # Add ember cli chunks+ Rails.configuration.assets.precompile.push(+ *EmberCli.script_chunks.values.flatten.flat_map { |name| ["#{name}.js", "#{name}.map"] }+ )endtask 'assets:precompile:css' => 'environment' do@@ -102,7 +91,6 @@ task 'assets:flush_sw' => 'environment' doenddef is_ember_cli_asset?(name)- return false if !EMBER_CLI%w(discourse.jsadmin.jsdiff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rakeindex 80c08d31063..c1d2c2d6c98 100644--- a/lib/tasks/docker.rake+++ b/lib/tasks/docker.rake@@ -214,9 +214,9 @@ task 'docker:test' dounless ENV["SKIP_PLUGINS"]if ENV["SINGLE_PLUGIN"]- @good &&= run_or_fail("CI=1 QUNIT_EMBER_CLI=1 bundle exec rake plugin:qunit['#{ENV['SINGLE_PLUGIN']}','#{js_timeout}']")+ @good &&= run_or_fail("CI=1 bundle exec rake plugin:qunit['#{ENV['SINGLE_PLUGIN']}','#{js_timeout}']")else- @good &&= run_or_fail("CI=1 QUNIT_EMBER_CLI=1 bundle exec rake plugin:qunit['*','#{js_timeout}']")+ @good &&= run_or_fail("CI=1 bundle exec rake plugin:qunit['*','#{js_timeout}']")endendenddiff --git a/lib/tasks/qunit.rake b/lib/tasks/qunit.rakeindex a7294a38ba7..a4941c8e932 100644--- a/lib/tasks/qunit.rake+++ b/lib/tasks/qunit.rake@@ -28,24 +28,18 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|falseend- if ENV['QUNIT_EMBER_CLI'] == "0"+ if ENV["QUNIT_EMBER_CLI"] == "0"puts "The 'legacy' ember environment is discontinued - running tests with ember-cli assets..."end- ember_cli = true-port = ENV['TEST_SERVER_PORT'] || 60099while !port_available? portport += 1end- if ember_cli- unicorn_port = 60098- while unicorn_port == port || !port_available?(unicorn_port)- unicorn_port += 1- end- else- unicorn_port = port+ unicorn_port = 60098+ while unicorn_port == port || !port_available?(unicorn_port)+ unicorn_port += 1endenv = {@@ -61,10 +55,6 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|"UNICORN_TIMEOUT" => "90",}- if !ember_cli- env["EMBER_CLI_PROD_ASSETS"] = "0"- end-pid = Process.spawn(env,"#{Rails.root}/bin/unicorn",@@ -75,7 +65,6 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|success = truetest_path = "#{Rails.root}/test"qunit_path = args[:qunit_path]- qunit_path ||= "/qunit" if !ember_clioptions = { seed: (ENV["QUNIT_SEED"] || Random.new.seed), hidepassed: 1 }@@ -96,9 +85,10 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|# wait for server to accept connectionsrequire 'net/http'- warmup_path = ember_cli ? "/assets/discourse/tests/active-plugins.js" : "/qunit"+ warmup_path = "/assets/discourse/tests/active-plugins.js"uri = URI("http://localhost:#{unicorn_port}/#{warmup_path}")puts "Warming up Rails server"+beginNet::HTTP.get(uri)rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Net::ReadTimeout, EOFError@@ -109,24 +99,20 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|endputs "Rails server is warmed up"- if ember_cli- cmd = ["env", "UNICORN_PORT=#{unicorn_port}"]- if qunit_path- # Bypass `ember test` - it only works properly for the `/tests` path.- # We have to trigger a `build` manually so that JS is available for rails to serve.- system("yarn", "ember", "build", chdir: "#{Rails.root}/app/assets/javascripts/discourse")- test_page = "#{qunit_path}?#{query}&testem=1"- cmd += ["yarn", "testem", "ci", "-f", "testem.js", "-t", test_page]- else- cmd += ["yarn", "ember", "test", "--query", query]- end- system(*cmd, chdir: "#{Rails.root}/app/assets/javascripts/discourse")+ cmd = ["env", "UNICORN_PORT=#{unicorn_port}"]++ if qunit_path+ # Bypass `ember test` - it only works properly for the `/tests` path.+ # We have to trigger a `build` manually so that JS is available for rails to serve.+ system("yarn", "ember", "build", chdir: "#{Rails.root}/app/assets/javascripts/discourse")+ test_page = "#{qunit_path}?#{query}&testem=1"+ cmd += ["yarn", "testem", "ci", "-f", "testem.js", "-t", test_page]else- cmd = "node #{test_path}/run-qunit.js http://localhost:#{port}#{qunit_path}"- cmd += "?#{query.gsub('+', '%20').gsub("&", '\\\&')}"- cmd += " #{args[:timeout]}" if args[:timeout].present?- system(cmd)+ cmd += ["yarn", "ember", "test", "--query", query]end++ system(*cmd, chdir: "#{Rails.root}/app/assets/javascripts/discourse")+success &&= $?.success?ensure# was having issues with HUPdiff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rbindex fdf4ce1faa2..84138e8ec1b 100644--- a/spec/helpers/application_helper_spec.rb+++ b/spec/helpers/application_helper_spec.rb@@ -31,9 +31,9 @@ describe ApplicationHelper doset_cdn_url "https://awesome.com"helper.request.env["HTTP_ACCEPT_ENCODING"] = 'br'- link = helper.preload_script('application')+ link = helper.preload_script('discourse')- expect(link).to eq(preload_link("https://awesome.com/brotli_asset/#{EmberCli.transform_name("application")}.js"))+ expect(link).to eq(preload_link("https://awesome.com/brotli_asset/discourse.js"))endcontext "with s3 CDN" do@@ -47,41 +47,41 @@ describe ApplicationHelper doit "deals correctly with subfolder" doset_subfolder "/community"- expect(helper.preload_script("application")).to include("https://s3cdn.com/assets/#{EmberCli.transform_name("application")}.js")+ expect(helper.preload_script("discourse")).to include("https://s3cdn.com/assets/discourse.js")endit "replaces cdn URLs with s3 cdn subfolder paths" doglobal_setting :s3_cdn_url, 'https://s3cdn.com/s3_subpath'set_cdn_url "https://awesome.com"set_subfolder "/community"- expect(helper.preload_script("application")).to include("https://s3cdn.com/s3_subpath/assets/#{EmberCli.transform_name("application")}.js")+ expect(helper.preload_script("discourse")).to include("https://s3cdn.com/s3_subpath/assets/discourse.js")endit "returns magic brotli mangling for brotli requests" dohelper.request.env["HTTP_ACCEPT_ENCODING"] = 'br'- link = helper.preload_script('application')+ link = helper.preload_script('discourse')- expect(link).to eq(preload_link("https://s3cdn.com/assets/#{EmberCli.transform_name("application")}.br.js"))+ expect(link).to eq(preload_link("https://s3cdn.com/assets/discourse.br.js"))endit "gives s3 cdn if asset host is not set" do- link = helper.preload_script('application')+ link = helper.preload_script('discourse')- expect(link).to eq(preload_link("https://s3cdn.com/assets/#{EmberCli.transform_name("application")}.js"))+ expect(link).to eq(preload_link("https://s3cdn.com/assets/discourse.js"))endit "can fall back to gzip compression" dohelper.request.env["HTTP_ACCEPT_ENCODING"] = 'gzip'- link = helper.preload_script('application')- expect(link).to eq(preload_link("https://s3cdn.com/assets/#{EmberCli.transform_name("application")}.gz.js"))+ link = helper.preload_script('discourse')+ expect(link).to eq(preload_link("https://s3cdn.com/assets/discourse.gz.js"))endit "gives s3 cdn even if asset host is set" doset_cdn_url "https://awesome.com"- link = helper.preload_script('application')+ link = helper.preload_script('discourse')- expect(link).to eq(preload_link("https://s3cdn.com/assets/#{EmberCli.transform_name("application")}.js"))+ expect(link).to eq(preload_link("https://s3cdn.com/assets/discourse.js"))endit "gives s3 cdn but without brotli/gzip extensions for theme tests assets" dodiff --git a/spec/requests/invites_controller_spec.rb b/spec/requests/invites_controller_spec.rbindex 35e7b4a5ee0..b310e7f75ea 100644--- a/spec/requests/invites_controller_spec.rb+++ b/spec/requests/invites_controller_spec.rb@@ -10,7 +10,7 @@ describe InvitesController doit 'shows the accept invite page' doget "/invites/#{invite.invite_key}"expect(response.status).to eq(200)- expect(response.body).to have_tag(:script, with: { src: "/assets/#{EmberCli.transform_name("application")}.js" })+ expect(response.body).to have_tag(:script, with: { src: "/assets/discourse.js" })expect(response.body).not_to include(invite.email)expect(response.body).to_not include(I18n.t('invite.not_found_template', site_name: SiteSetting.title, base_url: Discourse.base_url))@@ -34,7 +34,7 @@ describe InvitesController doit 'shows unobfuscated email' doget "/invites/#{invite.invite_key}"expect(response.status).to eq(200)- expect(response.body).to have_tag(:script, with: { src: "/assets/#{EmberCli.transform_name("application")}.js" })+ expect(response.body).to have_tag(:script, with: { src: "/assets/discourse.js" })expect(response.body).to include(invite.email)expect(response.body).not_to include('i*****g@a***********e.ooo')enddiff --git a/spec/requests/qunit_controller_spec.rb b/spec/requests/qunit_controller_spec.rbindex 2eadff46e6f..63de764cd17 100644--- a/spec/requests/qunit_controller_spec.rb+++ b/spec/requests/qunit_controller_spec.rb@@ -99,7 +99,7 @@ describe QunitController doexpect(response.body).to include("/test-support")expect(response.body).to include("/test-helpers")expect(response.body).to include("/assets/markdown-it-bundle.js")- expect(response.body).to include("/assets/#{EmberCli.transform_name("application")}.js")+ expect(response.body).to include("/assets/discourse.js")expect(response.body).to include("/assets/admin.js")expect(response.body).to match(/\/theme-javascripts\/\h{40}\.js/)expect(response.body).to include("/theme-javascripts/tests/#{theme.id}-")diff --git a/spec/requests/topics_controller_spec.rb b/spec/requests/topics_controller_spec.rbindex 8b13a2607fe..b5a13613327 100644--- a/spec/requests/topics_controller_spec.rb+++ b/spec/requests/topics_controller_spec.rb@@ -2362,7 +2362,7 @@ RSpec.describe TopicsController dobody = response.body- expect(body).to have_tag(:script, src: "/assets/#{EmberCli.transform_name("application")}.js")+ expect(body).to have_tag(:script, src: "/assets/discourse.js")expect(body).to have_tag(:meta, with: { name: 'fragment' })endend@@ -2638,7 +2638,7 @@ RSpec.describe TopicsController dobody = response.bodyexpect(response.status).to eq(200)- expect(body).to have_tag(:script, with: { src: "/assets/#{EmberCli.transform_name("application")}.js" })+ expect(body).to have_tag(:script, with: { src: "/assets/discourse.js" })expect(body).to_not have_tag(:meta, with: { name: 'fragment' })endend@@ -2653,7 +2653,7 @@ RSpec.describe TopicsController dobody = response.body- expect(body).to have_tag(:script, with: { src: "/assets/#{EmberCli.transform_name("application")}.js" })+ expect(body).to have_tag(:script, with: { src: "/assets/discourse.js" })expect(body).to have_tag(:meta, with: { name: 'fragment' })end@@ -4306,7 +4306,7 @@ RSpec.describe TopicsController dobody = response.body- expect(body).to have_tag(:script, with: { src: "/assets/#{EmberCli.transform_name("application")}.js" })+ expect(body).to have_tag(:script, with: { src: "/assets/discourse.js" })expect(body).to have_tag(:meta, with: { name: 'fragment' })endend