Revert "DEV: Support for running theme test with Ember CLI" (#15547)

This reverts commit ea84a82f77f22c793baa0fca6d951ba029169adc.

This is causing problems with `/theme-qunit` on legacy, non-ember-cli production sites. Reverting while we work on a fix
This commit is contained in:
David Taylor
2022-01-11 23:38:59 +00:00
committed by GitHub
parent 1d0e5ae4c8
commit 252bb87ab3
26 changed files with 129 additions and 227 deletions

View File

@ -69,7 +69,7 @@ class BootstrapController < ApplicationController
locale_script: locale,
stylesheets: @stylesheets,
plugin_js: plugin_js,
plugin_test_js: [script_asset_path("plugin-tests")],
plugin_test_js: [script_asset_path("plugin_tests")],
setup_data: client_side_setup_data,
preloaded: @preloaded,
html: create_html,

View File

@ -8,28 +8,15 @@ class QunitController < ApplicationController
}
layout false
def is_ember_cli_proxy?
request.headers["HTTP_X_DISCOURSE_EMBER_CLI"] == "true"
end
# only used in test / dev
def index
raise Discourse::NotFound.new if is_ember_cli_proxy?
raise Discourse::NotFound.new if request.headers["HTTP_X_DISCOURSE_EMBER_CLI"] == "true"
raise Discourse::InvalidAccess.new if Rails.env.production?
end
def theme
raise Discourse::NotFound.new if !can_see_theme_qunit?
@is_proxied = is_ember_cli_proxy?
@legacy_ember = Rails.env.development? && !@is_proxied
# In production mode all bundles use `application`
@app_bundle = "application"
if Rails.env.development? && @is_proxied
@app_bundle = "discourse"
end
param_key = nil
@suggested_themes = nil
if (id = get_param(:id)).present?