DEV: Support for running theme test with Ember CLI (third attempt)

The second attempt fixed issues with smoke test.

This one makes sure minification only happens in production mode.
This commit is contained in:
Robin Ward
2022-01-13 15:16:34 -05:00
parent f82f0e1179
commit 6272edd121
30 changed files with 274 additions and 153 deletions

View File

@ -176,13 +176,18 @@ module Discourse
confirm-new-email/bootstrap.js
onpopstate-handler.js
embed-application.js
discourse/tests/theme_qunit_ember_jquery.js
discourse/tests/theme_qunit_vendor.js
discourse/tests/theme_qunit_tests_vendor.js
discourse/tests/theme_qunit_helper.js
discourse/tests/active-plugins.js
discourse/tests/test_starter.js
}
if ENV['EMBER_CLI_PROD_ASSETS'] != "1"
config.assets.precompile += %w{
discourse/tests/test-support-rails.js
discourse/tests/test-helpers-rails.js
vendor-theme-tests.js
}
end
# Precompile all available locales
unless GlobalSetting.try(:omit_base_locales)
Dir.glob("#{config.root}/app/assets/javascripts/locales/*.js.erb").each do |file|
@ -370,7 +375,7 @@ module Discourse
%w{qunit.js
qunit.css
test_helper.css
discourse/tests/test_helper.js
discourse/tests/test-boot-rails.js
wizard/test/test_helper.js
}.include?(logical_path) ||
logical_path =~ /\/node_modules/ ||