FEATURE: Allow theme tests to be run in production (PR #12815)

This PR allows site admins to run theme tests in production via a new /theme-qunit route. When you visit /theme-qunit, you’ll see a list of the themes/components installed on your site that have tests, and from there you can select a theme or component that you run its tests.

We also have a new rake task themes:install_and_test that installs a list of themes/components on a temporary database and runs the tests of the themes/components that are installed. This rake task can be useful when upgrading/deploying a Discourse instance to make sure that the installed themes/components are compatible with the new Discourse version being deployed, and if the tests fail you can abort the build/deploy process so you don’t end up with a broken site.


This is a nice side effect, Sprockets might be snappier without watching node_modules.

Nice work, looks great to me!

I’m not marking it approved only because it touches on a lot of parts of the app and it might be good to have another set of eyes go through it.

Overall this looks great and I’m excited to see progress. It is important to me that this does not break the current Ember CLI test flow though. Can you confirm:

  1. ember test still works?
  2. Visiting /tests in Ember CLI still works?

@eviltrout yes, I can confirm that both still work.

Because it’s a big PR and might break random things, I recommend merging when you are around for a while to support it. Maybe a Monday?

Sure, Monday sounds good!

This pull request has been mentioned on Discourse Meta. There might be relevant details there: