FIX: When using Ember CLI, plugin admin code was not being loaded in tests (#16239)
This commit is contained in:
parent
581d435d09
commit
d025405130
|
@ -1,6 +1,4 @@
|
|||
<%
|
||||
require_asset("main_include_admin.js")
|
||||
|
||||
DiscoursePluginRegistry.admin_javascripts.each { |js| require_asset(js) }
|
||||
|
||||
DiscoursePluginRegistry.each_globbed_asset(admin: true) do |f|
|
|
@ -0,0 +1,2 @@
|
|||
//= require main_include_admin
|
||||
//= require admin-plugins
|
|
@ -301,7 +301,10 @@ module.exports = {
|
|||
|
||||
contentFor: function (type, config) {
|
||||
if (shouldLoadPluginTestJs() && type === "test-plugin-js") {
|
||||
return `<script src="${config.rootURL}assets/discourse/tests/active-plugins.js"></script>`;
|
||||
return `
|
||||
<script src="${config.rootURL}assets/discourse/tests/active-plugins.js"></script>
|
||||
<script src="${config.rootURL}assets/admin-plugins.js"></script>
|
||||
`;
|
||||
} else if (shouldLoadPluginTestJs() && type === "test-plugin-tests-js") {
|
||||
return `<script id="plugin-test-script" src="${config.rootURL}assets/discourse/tests/plugin-tests.js"></script>`;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,9 @@ if (shouldLoadPluginTestJs()) {
|
|||
"/assets/discourse/tests/active-plugins.js": {
|
||||
target,
|
||||
},
|
||||
"/assets/admin-plugins.js": {
|
||||
target,
|
||||
},
|
||||
"/assets/discourse/tests/plugin-tests.js": {
|
||||
target,
|
||||
},
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
<script src="{{rootURL}}assets/discourse.js"></script>
|
||||
<script src="{{rootURL}}assets/discourse-markdown.js"></script>
|
||||
{{content-for "test-plugin-js"}}
|
||||
<script src="{{rootURL}}assets/admin.js"></script>
|
||||
{{content-for "test-plugin-js"}}
|
||||
<script src="{{rootURL}}assets/test-helpers.js"></script>
|
||||
<script src="{{rootURL}}assets/core-tests.js"></script>
|
||||
{{content-for "test-plugin-tests-js"}}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<%= preload_script @app_bundle %>
|
||||
<%= preload_script "admin" %>
|
||||
<%= preload_script "discourse/tests/active-plugins" %>
|
||||
<%= preload_script "admin-plugins" %>
|
||||
<%= support_bundles %>
|
||||
<%= theme_translations_lookup %>
|
||||
<%= theme_js_lookup %>
|
||||
|
|
|
@ -177,6 +177,7 @@ module Discourse
|
|||
onpopstate-handler.js
|
||||
embed-application.js
|
||||
discourse/tests/active-plugins.js
|
||||
admin-plugins.js
|
||||
discourse/tests/test_starter.js
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue