DEV: Arrange theme QUnit dependencies in the right order (#12907)
This commit is contained in:
parent
6f8413fd85
commit
486550c6fe
|
@ -0,0 +1,6 @@
|
|||
// discourse-skip-module
|
||||
|
||||
//= require env
|
||||
//= require jquery.debug
|
||||
//= require ember.debug
|
||||
//= require discourse-loader
|
|
@ -1,14 +1,10 @@
|
|||
// discourse-skip-module
|
||||
|
||||
//= require env
|
||||
//= require jquery.debug
|
||||
//= require ember.debug
|
||||
//= require qunit
|
||||
//= require ember-qunit
|
||||
//= require fake_xml_http_request
|
||||
//= require route-recognizer
|
||||
//= require pretender
|
||||
//= require discourse-loader
|
||||
|
||||
// These are not loaded in prod or development
|
||||
// But we need them for testing handlebars templates in qunit
|
|
@ -7,13 +7,14 @@
|
|||
<%= discourse_stylesheet_link_tag(:desktop, theme_ids: nil) %>
|
||||
<%= discourse_stylesheet_link_tag(:test_helper, theme_ids: nil) %>
|
||||
<%= preload_script "locales/en" %>
|
||||
<%= preload_script "discourse/tests/theme_test_vendor" %>
|
||||
<%= preload_script "discourse/tests/theme_qunit_ember_jquery" %>
|
||||
<%= preload_script "vendor" %>
|
||||
<%= preload_script "discourse/tests/theme_qunit_vendor" %>
|
||||
<%= preload_script "pretty-text-bundle" %>
|
||||
<%= preload_script "markdown-it-bundle" %>
|
||||
<%= preload_script "application" %>
|
||||
<%= preload_script "admin" %>
|
||||
<%= preload_script "discourse/tests/theme_test_helper" %>
|
||||
<%= preload_script "discourse/tests/theme_qunit_helper" %>
|
||||
<%= theme_translations_lookup %>
|
||||
<%= theme_js_lookup %>
|
||||
<%= theme_lookup("head_tag") %>
|
||||
|
|
|
@ -174,8 +174,9 @@ module Discourse
|
|||
confirm-new-email/bootstrap.js
|
||||
onpopstate-handler.js
|
||||
embed-application.js
|
||||
discourse/tests/theme_test_helper.js
|
||||
discourse/tests/theme_test_vendor.js
|
||||
discourse/tests/theme_qunit_helper.js
|
||||
discourse/tests/theme_qunit_vendor.js
|
||||
discourse/tests/theme_qunit_ember_jquery.js
|
||||
discourse/tests/test_starter.js
|
||||
}
|
||||
|
||||
|
|
|
@ -92,8 +92,15 @@ describe QunitController do
|
|||
expect(response.body).to include("/stylesheets/color_definitions_base_")
|
||||
expect(response.body).to include("/stylesheets/desktop_")
|
||||
expect(response.body).to include("/stylesheets/test_helper_")
|
||||
expect(response.body).to include("/assets/discourse/tests/theme_test_helper.js")
|
||||
expect(response.body).to include("/assets/discourse/tests/theme_test_vendor.js")
|
||||
expect(response.body).to include("/assets/locales/en.js")
|
||||
expect(response.body).to include("/assets/discourse/tests/theme_qunit_ember_jquery.js")
|
||||
expect(response.body).to include("/assets/vendor.js")
|
||||
expect(response.body).to include("/assets/discourse/tests/theme_qunit_vendor.js")
|
||||
expect(response.body).to include("/assets/pretty-text-bundle.js")
|
||||
expect(response.body).to include("/assets/markdown-it-bundle.js")
|
||||
expect(response.body).to include("/assets/application.js")
|
||||
expect(response.body).to include("/assets/admin.js")
|
||||
expect(response.body).to include("/assets/discourse/tests/theme_qunit_helper.js")
|
||||
expect(response.body).to match(/\/theme-javascripts\/\h{40}\.js/)
|
||||
expect(response.body).to include("/theme-javascripts/tests/#{theme.id}-")
|
||||
expect(response.body).to include("/assets/discourse/tests/test_starter.js")
|
||||
|
|
Loading…
Reference in New Issue