This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/test_helper.js
Robin Ward b460a6d059 REFACTOR: Continue to converge on what Ember CLI wants us to do
* The creation of a testing div is specific to Rails, so that is
moved back out of setupTests();

* We've removed the `Discourse` globals from the acceptance helpers in favor of
`setApplication`/`getApplication`.

* We pass the container to setupTests because there is no
`__container__` in later Ember versions.

* `App` is now `app` because it's not a constant or class, it's an
instance of an application.
2020-10-16 10:53:13 -04:00

57 lines
1.6 KiB
JavaScript

// discourse-skip-module
//= require env
//= require jquery.debug
//= require jquery.ui.widget
//= require ember.debug
//= require message-bus
//= require qunit/qunit/qunit
//= require ember-qunit
//= require fake_xml_http_request
//= require route-recognizer
//= require pretender/pretender
//= require locales/i18n
//= require locales/en_US
//= require discourse-loader
// Our base application
//= require vendor
//= require discourse-shims
//= require pretty-text-bundle
//= require markdown-it-bundle
//= require application
//= require admin
// These are not loaded in prod or development
// But we need them for testing handlebars templates in qunit
//= require handlebars
//= require ember-template-compiler
// Test helpers
//= require sinon/pkg/sinon
//= require_tree ./helpers
//= require break_string
// Finally, the tests themselves
//= require_tree ./fixtures
//= require_tree ./acceptance
//= require_tree ./integration
//= require_tree ./unit
//= require_tree ../../admin/tests/admin
//= require plugin_tests
//= require setup-tests
//= require test-shims
//= require jquery.magnific-popup.min.js
document.write(
'<div id="ember-testing-container"><div id="ember-testing"></div></div>'
);
document.write(
"<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>"
);
let app = window.Discourse;
app.injectTestHelpers();
let setupTests = require("discourse/tests/setup-tests").default;
setupTests(app, app.__container__);