discourse/spec/system/user_page
Osama Sayegh c6bbbd0608
FIX: Set the correct state of the dark mode checkbox user preference (#31214)
This commit fixes a bug in the "Dark Mode" checkbox in the interface user
preferences where the checkbox state doesn't appear in the disabled
state if the user disables dark mode.

This happens because when rendering the checkbox, we check the relevant
user options field within the controller's `init` method, but at that
point in the controller's life cycle, the `user_option` object isn't
available. What we should do instead is move this check to the route's
`setupController` method where the `user_option` object is available and
we can set the correct state on the controller.

https://meta.discourse.org/t/-/349976 (private topic)
2025-02-06 20:31:37 +03:00
..
hide_from_public_spec.rb DEV: Improve UX when user profiles are hidden from public (#26293) 2024-03-21 17:53:52 +00:00
staff_info_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
user_notifications_spec.rb DEV: Plugin-api methods for user-notifications route customizations (#24873) 2023-12-13 15:15:42 -06:00
user_page_search_spec.rb FIX: "in posts by" user search (#27628) 2024-06-27 14:20:18 +10:00
user_preferences_account_spec.rb FIX: Serialize uploaded_avatars_allowed_groups check on current user (#25515) 2024-02-02 09:32:45 +10:00
user_preferences_interface_spec.rb FIX: Set the correct state of the dark mode checkbox user preference (#31214) 2025-02-06 20:31:37 +03:00
user_preferences_navigation_spec.rb FIX: Serialize uploaded_avatars_allowed_groups check on current user (#25515) 2024-02-02 09:32:45 +10:00
user_preferences_profile_spec.rb UX: move "hide profile" checkbox to profile tab (#31095) 2025-01-31 17:04:20 +01:00
user_preferences_security_spec.rb FIX: User can't reset password with backup codes when only security key is enabled (#27368) 2024-06-06 14:30:42 +08:00
user_profile_info_panel_spec.rb FIX: Render user profile trust level name for TL0 (#22740) 2023-07-21 15:16:34 +08:00
users_directory_spec.rb DEV: Remove flaky test for now (#29249) 2024-10-17 16:58:35 +08:00