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/unit/models
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
..
badge-test.js DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
bookmark-test.js FIX: Remove last_unread_post excerpt logic for bookmarks (#17979) 2022-08-19 09:35:25 +10:00
category-test.js UX: Change ordering of categories shown in sidebar (#18803) 2022-11-04 05:21:49 +09:00
composer-test.js DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
email-log-test.js DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
group-test.js DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
invite-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
nav-item-test.js FIX: NavItem and Composer prop overriding was broken (#17092) 2022-06-14 21:16:33 +02:00
pending-post-test.js DEV: Make settled() work in the legacy env (#16122) 2022-03-07 20:00:09 +01:00
post-stream-test.js DEV: Use async and sinon.resolves instead of rsvp (#18001) 2022-08-20 11:20:55 +02:00
post-test.js DEV: Bump eslint-config-discourse (#14868) 2021-11-10 09:31:41 +10:00
private-message-topic-tracking-state-test.js DEV: Convert pm-topic-tracking-state to Ember Service (#17688) 2022-07-27 13:00:43 +01:00
report-test.js DEV: Remove most of jQuery usage from tests (#17474) 2022-07-13 19:29:19 +02:00
rest-model-test.js DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
result-set-test.js DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
session-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
site-test.js UX: Change ordering of categories shown in sidebar (#18803) 2022-11-04 05:21:49 +09:00
staff-action-log-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
theme-test.js DEV: Use the block form of module() (#17151) 2022-06-20 15:42:10 +02:00
topic-details-test.js DEV: Use store.createRecord for Topic models (#18837) 2022-11-03 12:32:20 +01:00
topic-test.js DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
topic-tracking-state-test.js FIX: topic tracking stage error when no tags (#18901) 2022-11-08 10:16:05 +11:00
user-action-test.js DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
user-badge-test.js DEV: Fix a test leak (#15135) 2021-11-30 13:45:26 +11:00
user-drafts-test.js DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
user-stream-test.js DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
user-test.js FIX: make sure every user instance has correct status tracking counter 2022-07-26 18:42:55 +04:00
wizard-field-test.js DEV: Make wizard an ember addon (#17027) 2022-06-17 14:50:21 +02:00