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
Martin Brennan ac7bf98ad1
DEV: Load client site settings YML into JS tests (#18413)
Our method of loading a subset of client settings into tests via
tests/helpers/site-settings.js can be improved upon. Currently we have a
hardcoded subset of the client settings, which may get out of date and not have
the correct defaults. As well as this plugins do not get their settings into the
tests, so whenever you need a setting from a plugin, even if it has a default,
you have to do needs.setting({ ... }) which is inconvenient.

This commit introduces an ember CLI build step to take the site_settings.yml and
all the plugin settings.yml files, pull out the client settings, and dump them
into a variable in a single JS file we can load in our tests, so we have the
correct selection of settings and default values in our JS tests. It also fixes
many, many tests that were operating under incorrect assumptions or old
settings.

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2022-11-08 09:17:43 +10:00
..
acceptance DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
addons/truth-helpers/integration/helpers DEV: adds includes helper to templates (#18259) 2022-09-15 14:20:37 +02:00
fixtures FIX: Clientside checks for personal_message_enabled_groups (#18691) 2022-10-21 14:38:33 +10:00
helpers DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
integration DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
unit DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
index.html DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
setup-tests.js DEV: Avoid cloning site settings in QUnit tests (#18811) 2022-11-02 20:07:17 +09:00
test-boot-ember-cli.js DEV: Remove all use of Ember/jQuery globals in core (#18670) 2022-10-19 17:04:49 +01:00