mirror of
https://github.com/discourse/discourse.git
synced 2026-08-02 09:29:37 -05:00
DEV: Only load specific plugin bundles during qunit test (#33678)
Previously, running qunit tests for a plugin would load the JS of all installed plugins. This can be problematic because, depending on the plugins installed in the current environment, there can be unexpected interactions between the plugins. This commit updates our qunit system to check the `tests.requiredPlugins` list from the theme/plugin `about.json` file, and only loads the listed plugins. This means that the environment is much more consistent across CI and different development environments. Alongside that change, this commit also: - Starts storing the original `about.json` for themes in the database - Improves qunit error handling when the test environment fails to boot (e.g. there's a bad import in a plugin) - Restores plugin CSS in theme qunit tests
This commit is contained in:
@@ -279,7 +279,7 @@ jobs:
|
||||
|
||||
- name: Plugin QUnit
|
||||
if: matrix.build_type == 'frontend' && matrix.target == 'plugins'
|
||||
run: QUNIT_WRITE_EXECUTION_FILE=1 bin/rake plugin:qunit['*']
|
||||
run: bin/rake plugin:qunit['*']
|
||||
|
||||
- name: Theme QUnit
|
||||
if: matrix.build_type == 'frontend' && matrix.target == 'themes'
|
||||
|
||||
Reference in New Issue
Block a user