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
David Taylor ff5a6edb71 DEV: Update plugin JS loading in Ember CLI testem environment
Previously we were adding `/assets/discourse/tests/core_plugin_tests.js` to the test html all the time. This works in development mode, but fails silently when using testem via the `ember test` CLI, because there is no proxy running.

This commit makes a few changes to fix this, and make it more useful:

- Only renders the plugin `<script>` when in development mode, or when `LOAD_PLUGINS=1` (matching core's behavior)
- Only loads plugin translations based on the same logic
- When running via testem, and the above conditions are met, testem is configured to proxy `core_plugin_tests.js` through to a rails server. (port based on the `UNICORN_PORT` env variable)
- Adds a descriptive error if the plugin `<script>` fails to load. This can happen if the rails server hasn't been started
- Updates the logic for testem browsers. Ember CLI always launches testem in "CI" mode, and we don't really want 3 browsers opening by default. Our CI explicitly specifies the 3 browsers at runtime
2022-01-18 10:16:29 +00:00
..
app UX: Apply new quote-button spacing behavior to all mobile devices (#15608) 2022-01-18 10:13:49 +00:00
config DEV: Allow ember server --environment production to be used (#15431) 2021-12-31 12:26:23 +00:00
lib DEV: Update plugin JS loading in Ember CLI testem environment 2022-01-18 10:16:29 +00:00
public/assets/scripts DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
tests DEV: Update plugin JS loading in Ember CLI testem environment 2022-01-18 10:16:29 +00:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Fix missing test paths for Ember CLI (#15578) 2022-01-14 11:53:52 +10:00
package.json DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
testem.js DEV: Update plugin JS loading in Ember CLI testem environment 2022-01-18 10:16:29 +00:00