mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
1677754762
What does this change do? This change improves the `upload_theme` system test helper method by automatically setting the uploaded theme as the default theme for the site. This is to make it easier for users to use the theme instead of having to fiddle with theme previews. The default behaviour of setting the uploaded theme as the site's default theme can be disabled by passing `false` to the `set_theme_as_default` keyword argument. This change also introduces a new `upload_theme_component` system test helper method for uploading theme components. The difference between the `upload_theme` helper method is that the theme component is automatically added to the site's default theme when uploaded. The theme which the theme component is added to can be configured via the `parent_theme_id` keyword argument. For both methods, we also no longer require the path to the theme to be provided. Instead both methods will look through the callstack and can figure out the theme's directory based on the convention that the theme's system tests are placed in the `spec/system` directory of the theme folder. This change simplifies the usage of the methods for users and helps to remove code like `upload_theme_component(File.expand_path("../..", __dir__))`. |
||
---|---|---|
.. | ||
versioning | ||
bookmarkable_helper.rb | ||
common_basic_reviewable_serializer.rb | ||
concurrency.rb | ||
diagnostics_helper.rb | ||
discourse_event_helper.rb | ||
dom_matcher.rb | ||
dummy_custom_summarization.rb | ||
fake_bookmark_hashtag_data_source.rb | ||
fake_logger.rb | ||
fake_s3.rb | ||
fast_image_helpers.rb | ||
final_destination_helper.rb | ||
helpers.rb | ||
imap_helper.rb | ||
integration_helpers.rb | ||
match_html_matcher.rb | ||
mock_git_importer.rb | ||
negated_matcher.rb | ||
onebox_helpers.rb | ||
rate_limit_matcher.rb | ||
sample_plugin_site_settings.yml | ||
session_controller_helper_routes.rb | ||
shared_examples_for_custom_fields.rb | ||
shared_examples_for_stats_cacheable.rb | ||
sidekiq_helpers.rb | ||
site_settings_helpers.rb | ||
system_helpers.rb | ||
test_second_factor_action.rb | ||
time_matcher.rb | ||
topic_guardian_can_see_consistency_check.rb | ||
ts_vector_matcher.rb | ||
uploads_helpers.rb | ||
user_sidebar_serializer_attributes.rb | ||
webauthn_integration_helpers.rb |