Skip to content

Commit 3abb652

Browse files
committed
re-add qunit bootstrap conditional
1 parent 576d96b commit 3abb652

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed
Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
// discourse-skip-module
22
/*global document, Logster, QUnit */
33

4-
document.addEventListener("DOMContentLoaded", function () {
5-
document.body.insertAdjacentHTML(
6-
"afterbegin",
7-
`
8-
<div id="ember-testing-container"><div id="ember-testing"></div></div>
9-
<style>#ember-testing-container { position: absolute; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; } #ember-testing { zoom: 50%; }</style>
10-
`
11-
);
12-
});
4+
if (window.location.pathname.indexOf("/w/") > -1 && Ember.testing) {
5+
document.addEventListener("DOMContentLoaded", function () {
6+
document.body.insertAdjacentHTML(
7+
"afterbegin",
8+
`
9+
<div id="ember-testing-container"><div id="ember-testing"></div></div>
10+
<style>#ember-testing-container { position: absolute; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; } #ember-testing { zoom: 50%; }</style>
11+
`
12+
);
13+
});
1314

14-
Object.keys(requirejs.entries).forEach(function (entry) {
15-
if (/\-test/.test(entry)) {
16-
requirejs(entry);
17-
}
18-
});
15+
Object.keys(requirejs.entries).forEach(function (entry) {
16+
if (/\-test/.test(entry)) {
17+
requirejs(entry);
18+
}
19+
});
1920

20-
if (window.Logster) {
21-
Logster.enabled = false;
22-
} else {
23-
window.Logster = { enabled: false };
21+
if (window.Logster) {
22+
Logster.enabled = false;
23+
} else {
24+
window.Logster = { enabled: false };
25+
}
2426
}

0 commit comments

Comments
 (0)