diff --git a/assets/javascripts/wizard/tests/bootstrap.js.es6 b/assets/javascripts/wizard/tests/bootstrap.js.es6
index 8579e884..29cdfe80 100644
--- a/assets/javascripts/wizard/tests/bootstrap.js.es6
+++ b/assets/javascripts/wizard/tests/bootstrap.js.es6
@@ -1,24 +1,26 @@
// discourse-skip-module
/*global document, Logster, QUnit */
-document.addEventListener("DOMContentLoaded", function () {
- document.body.insertAdjacentHTML(
- "afterbegin",
- `
-
-
- `
- );
-});
+if (window.location.pathname.indexOf("/w/") > -1 && Ember.testing) {
+ document.addEventListener("DOMContentLoaded", function () {
+ document.body.insertAdjacentHTML(
+ "afterbegin",
+ `
+
+
+ `
+ );
+ });
-Object.keys(requirejs.entries).forEach(function (entry) {
- if (/\-test/.test(entry)) {
- requirejs(entry);
+ Object.keys(requirejs.entries).forEach(function (entry) {
+ if (/\-test/.test(entry)) {
+ requirejs(entry);
+ }
+ });
+
+ if (window.Logster) {
+ Logster.enabled = false;
+ } else {
+ window.Logster = { enabled: false };
}
-});
-
-if (window.Logster) {
- Logster.enabled = false;
-} else {
- window.Logster = { enabled: false };
}