mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
e0ef88abca
Why this change? As the number of themes which the Discourse team supports officially grows, we want to ensure that changes made to Discourse core do not break the plugins. As such, we are adding a step to our Github actions test job to run the QUnit tests for all official themes. What does this change do? This change adds a new job to our tests Github actions workflow to run the QUnit tests for all official plugins. This is achieved with the following changes: 1. Update `testem.js` to rely on the `THEME_TEST_PAGES` env variable to set the `test_page` option when running theme QUnit tests with testem. The `test_page` option [allows an array to be specified](https://github.com/testem/testem#multiple-test-pages) such that tests for multiple pages can be run at the same time. We are relying on a ENV variable because the `testem` CLI does not support passing a list of pages to the `--test_page` option. 2. Support a `/testem-theme-qunit/:testem_id/theme-qunit` Rails route in the development environment. This is done because testem prefixes the path with a unique ID to the configured `test_page` URL. This is problematic for us because we proxy all testem requests to the Rails server and testem's proxy configuration option does not allow us to easily rewrite the URL to remove the prefix. Therefore, we configure a proxy in testem to prefix `theme-qunit` requests with `/testem-theme-qunit` which can then be easily identified by the Rails server and routed accordingly. 3. Update `qunit:test` to support a `THEME_IDS` environment variable which will allow it to run QUnit tests for multiple themes at the same time. 4. Support `bin/rake themes:qunit[ids,"<theme_id>|<theme_id>"]` to run the QUnit tests for multiple themes at the same time. 5. Adds a `themes:qunit_all_official` Rake task which runs the QUnit tests for all the official themes. |
||
---|---|---|
.. | ||
001-redis.rb | ||
002-freedom_patches.rb | ||
002-rails_failover.rb | ||
004-message_bus.rb | ||
005-site_settings.rb | ||
006-ensure_login_hint.rb | ||
006-mini_profiler.rb | ||
008-rack-cors.rb | ||
009-omniauth.rb | ||
012-web_hook_events.rb | ||
013-excon_defaults.rb | ||
014-track-setting-changes.rb | ||
099-anon-cache.rb | ||
099-drain_pool.rb | ||
100-i18n.rb | ||
100-logster.rb | ||
100-oj.rb | ||
100-onebox_options.rb | ||
100-push-notifications.rb | ||
100-quiet_logger.rb | ||
100-regex-timeout.rb | ||
100-secret_token.rb | ||
100-session_store.rb | ||
100-sidekiq.rb | ||
100-silence_logger.rb | ||
100-strong_parameters.rb | ||
100-verify_config.rb | ||
100-wrap_parameters.rb | ||
101-lograge.rb | ||
102-truncate-logs.rb | ||
200-first_middlewares.rb | ||
300-perf.rb | ||
400-deprecations.rb | ||
000-development_reload_warnings.rb | ||
000-mini_sql.rb | ||
000-post_migration.rb | ||
000-trace_pg_connections.rb | ||
000-zeitwerk.rb | ||
assets.rb | ||
filter_parameter_logging.rb | ||
new_framework_defaults_7_0.rb |