mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:02:24 +08:00
9667485951
Until now, we have allowed testing themes in production environments via `/theme-qunit`. This was made possible by hacking the ember-cli build so that it would create the `tests.js` bundle in production. However, this is fundamentally problematic because a number of test-specific things are still optimized out of the Ember build in production mode. It also makes asset compilation significantly slower, and makes it more difficult for us to update our build pipeline (e.g. to introduce Embroider). This commit removes the ability to run qunit tests in production builds of the JS app when the Embdroider flag is enabled. If a production instance of Discourse exists exclusively for the development of themes (e.g. discourse.theme-creator.io) then they can add `EMBER_ENV: development` to their `app.yml` file. This will build the entire app in development mode, and has a significant performance impact. This must not be used for real production sites. This commit also refactors many of the request specs into system specs. This means that the tests are guaranteed to have Ember assets built, and is also a better end-to-end test than simply checking for the presence of certain `<script>` tags in the HTML. |
||
---|---|---|
.. | ||
about | ||
admin/backups | ||
application | ||
badges | ||
categories | ||
common | ||
default | ||
embed | ||
exceptions | ||
finish_installation | ||
groups | ||
invites | ||
layouts | ||
list | ||
metadata | ||
offline | ||
posts | ||
published_pages | ||
qunit | ||
robots_txt | ||
safe_mode | ||
search | ||
session | ||
sitemap | ||
static | ||
tags | ||
topics | ||
user_api_keys | ||
user_notifications | ||
users | ||
users_email |