Skip to content

v0.1.28

Choose a tag to compare

@github-actions github-actions released this 23 Jun 15:22
431c964

Summary

Two small, related cleanups to the communication-preferences feature added in #195:

  1. Restore the confirm-password autocomplete regression test. #195 accidentally deleted the def line for test_register_page_confirm_password_has_autocomplete, collapsing its body into test_register_page_shows_password_requirements and demoting its docstring to a no-op string statement. The issue #156 autocomplete check is restored as its own test. The comm-preference assertions remain in test_register_page_shows_password_requirements, where they correctly verify the register page renders the new fields.

  2. Drop the syncSubPreferences helper. In communication_preferences_fields.html the helper was only ever called from the master checkbox's change handler (disable branch) and never on init — initial visibility is already set server-side via the Jinja style="display: none;" guard. Inlining it removes the indirection and the enable/disable asymmetry. Behavior is preserved exactly: enabling reveals the sub-preferences and checks comm_updates; disabling hides them and clears both sub-preferences.

Test plan

  • uv run pytest tests/routers/core/test_account.py (91 passed)
  • uv run pytest tests/test_templates.py (30 passed)
  • Both test_register_page_shows_password_requirements and test_register_page_confirm_password_has_autocomplete are collected as separate tests
  • uv run ty check . clean