Skip to content

JS test gaps: api_tokens and feature_flags pages have no tests #514

Closed

Description

@antosubash

Tier 3: test coverage

Problem

Module pages compared with JS test files (tests-js/):

module pages JS tests
api_tokens 6 0
feature_flags 5 0
background_tasks 20 3
settings 15 3
dashboard 8 1
users 21 6
file_storage 7 7

api_tokens (#455) is the newest module, and it shipped security-sensitive UI with no JS tests: the one-time token reveal, copy, and revoke.

On the Python side, coverage is weakest in tenants (test-to-source line ratio about 0.54) and permissions (about 0.66). There are no direct unit tests for tenants/shared_props.py or file_storage/upload_guards.py.

Fix

  1. Add smoke and interaction tests for the api_tokens pages. Cover especially that the secret is shown once, is never re-rendered after navigation, and that revoke asks for confirmation.
  2. Add feature_flags page tests.
  3. Cover the background_tasks mutation flows (retry, purge, outbox replay).
  4. Add direct tests for tenants/shared_props.py and file_storage/upload_guards.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions