zulip/frontend_tests
Sahil Batra 6ad8e276de settings: Refactor code for realm message retention setting.
This commit refactors the code for realm message retention
setting to make it more similar to code for other time-limit
realm settings. There are still separate functions for the
message retention setting but they are similar to that of
other time-limit settings and can probably help us to
deduplicate the code in future. This refactor also helps
us in reusing some code for stream message retention
setting for changes in #23013.

This commit also fixes a bug where save-discard widget
not being hidden when resetting the setting to original
value. This can only be reproduced when the original
setting value is "retain_forever".

Following changes have been done in this commit -

- Added data-setting-widget-type attribute which is set to
"message-retention-setting" similar to "time-limit" value for
message edit and delete limit settings.

- Added get_message_retention_setting_value function similar
to get_time_limit_setting_value function which is used by
get_input_element_value.

- Removed "message-retention" block from
get_complete_data_for_subsection and the message retention
setting is now added to request data in populate_data_for_request
itself using data-setting-widget-type attribute.

- Updated id and class of elements to support the above changes.
2022-11-10 16:13:49 -08:00
..
node_tests settings: Refactor code for realm message retention setting. 2022-11-10 16:13:49 -08:00
puppeteer_lib dependencies: Remove formdata-node, node-fetch. 2022-10-11 10:50:57 -07:00
puppeteer_tests narrow-banner: Exclude bots when checking org sending pms policy. 2022-11-04 14:37:45 -07:00
zjsunit js: Fix type issue with FormatJS rich text elements. 2022-11-03 14:48:40 -07:00