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/helpers
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
..
component-test.js FEATURE: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
create-pretender.js DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
create-store.js DEV: Replace topic-tracking-state:main with service:topic-tracking-state (#17802) 2022-08-05 08:48:55 +08:00
d-editor-helper.js DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
fixture-pretender.js Support for Testem in Ember CLI (#12442) 2021-03-19 09:32:46 -04:00
notification-types-helper.js DEV: Refactor new user menu files (#17879) 2022-08-16 10:37:56 +08:00
presence-pretender.js DEV: Always await for publishToMessageBus (#17626) 2022-07-24 19:55:58 +02:00
qunit-helpers.js DEV: Avoid cloning site settings in QUnit tests (#18811) 2022-11-02 20:07:17 +09:00
review-pretender.js DEV: Add reviewables tab to the new user menu (#17630) 2022-07-28 11:16:33 +03:00
reviewable-types-helper.js DEV: Refactor new user menu files (#17879) 2022-08-16 10:37:56 +08:00
select-kit-helper.js DEV: Remove all use of Ember/jQuery globals in core (#18670) 2022-10-19 17:04:49 +01:00
site-settings.js DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
site.js DEV: Remove hints of jshint (#14828) 2021-11-08 09:12:37 +08:00
store-pretender.js REFACTOR: Move javascript tests inside discourse app 2020-10-02 11:29:36 -04:00
textarea-selection-helper.js REFACTOR: Move javascript tests inside discourse app 2020-10-02 11:29:36 -04:00