discourse/app/assets/javascripts
Osama Sayegh ce53152e53
DEV: Include theme_uploads and theme_uploads_local objects in theme tests (#18645)
Our theme system injects a magical `settings` object at the top of themes JS modules to allow theme authors to access the settings as configured by admins in the UI. Within this `settings` object, there are a couple of special objects `theme_uploads` and `theme_uploads_local` that contain URLs for all the assets/uploads that the theme has.

For test modules/files, the theme system also injects a `settings` object at the top of tests modules, but it's not the same object as the object that's injected in non-test files. The difference is that in tests we want the settings to have their default values as opposed to any custom values that may exist in the site's database. This ensures that test results are consistent no matter the site that runs them.

However, the `settings` object in tests files currently doesn't have the special objects `theme_uploads` and `theme_uploads_local` which means that if a theme includes an asset that's lazy-loaded, it's not possible to write tests for anything that depends on the lazy-loaded asset because the theme will not be able to load the asset during the tests since `theme_uploads_local` and `theme_uploads` don't exist. This PR adds these special objects inside the `settings` object for test files.

Internal topic: t/71825/52.
2022-10-20 08:00:29 +03:00
..
admin Build(deps): Bump ember-auto-import in /app/assets/javascripts (#18618) 2022-10-16 23:57:28 +02:00
confirm-new-email DEV: Update linting setup and fix issues (#17345) 2022-07-06 10:37:54 +02:00
discourse DEV: Include theme_uploads and theme_uploads_local objects in theme tests (#18645) 2022-10-20 08:00:29 +03:00
discourse-common DEV: Introduce a @debounce(delay) decorator (#18667) 2022-10-19 20:43:58 +02:00
discourse-ensure-deprecation-order DEV: Silence 3.x deprecations 2022-07-19 10:00:59 +01:00
discourse-hbr Build(deps): Bump ember-auto-import in /app/assets/javascripts (#18618) 2022-10-16 23:57:28 +02:00
discourse-plugins DEV: Support colocation of component templates in plugins (#18598) 2022-10-17 09:38:20 +01:00
discourse-widget-hbs Build(deps): Bump ember-auto-import in /app/assets/javascripts (#18618) 2022-10-16 23:57:28 +02:00
docs
ember-addons
ember-cli-progress-ci DEV: Add progress output in CI during ember-cli build (#17977) 2022-08-17 22:39:52 +01:00
locales FEATURE: Add Croatian language (#17130) 2022-06-18 00:18:22 +02:00
pretty-text UX: Fix alt text cancel button in dark mode (#18644) 2022-10-18 09:40:29 -07:00
select-kit FIX: Prevent layout shift while traversing dropdown (#18624) 2022-10-17 11:40:03 -07:00
truth-helpers Build(deps): Bump ember-auto-import in /app/assets/javascripts (#18618) 2022-10-16 23:57:28 +02:00
wizard Build(deps): Bump ember-auto-import in /app/assets/javascripts (#18618) 2022-10-16 23:57:28 +02:00
.licensee.json DEV: Add Ember CLI workspace license checks (#16603) 2022-05-03 13:06:19 -04:00
.npmrc
discourse-js-processor.js DEV: Introduce minification and source maps for Theme JS (#18646) 2022-10-18 18:20:10 +01:00
handlebars-shim.js
package.json DEV: Introduce flag for compiling Plugin JS with Ember CLI (#17965) 2022-08-22 09:56:39 +01:00
polyfills.js DEV: Add polyfill for String.prototype.replaceAll (#16301) 2022-03-28 17:18:56 +01:00
service-worker.js.erb DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
yarn.lock Build(deps): Bump qunit from 2.19.1 to 2.19.2 in /app/assets/javascripts (#18631) 2022-10-18 09:33:39 +08:00