Skip to content

docs: catalog tests.utils helpers and indexing rules in TESTING.md#511

Merged
FelipeDefensor merged 1 commit into
devfrom
docs/testing-helpers
Jun 23, 2026
Merged

docs: catalog tests.utils helpers and indexing rules in TESTING.md#511
FelipeDefensor merged 1 commit into
devfrom
docs/testing-helpers

Conversation

@FelipeDefensor

@FelipeDefensor FelipeDefensor commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two takeaways from PR #501 review threads, surfaced as guidance in TESTING.md:

  • New Use helpers in tests.utils section — short catalog of the helpers tests most often reach for (save_and_reopen, undoable, reloadable, load_local_media, menu/command discovery, modal-dialog patches). Several PR feat: range timeline #501 threads pointed at copy-pasted save-load sequences that should have been save_and_reopen(tmp_path); this section makes the helpers discoverable.
  • New Index timelines and UI elements directly section — prefer range_tlui[0] over list(range_tlui)[0], and prefer UI-layer access (range_tlui[0].get_data("joined_right")) over reaching into the backend.

Test plan

  • Read both new sections; confirm phrasing and helper list match the codebase.
  • Confirm placement (between "How to simulate interaction with timelines?" and "How to test the right actions are available in the UI?") reads naturally.

Two takeaways from PR #501 review threads:

- Add a "Use helpers in tests.utils" section listing the helpers most
  test files reach for (save_and_reopen, undoable, reloadable,
  load_local_media, menu/command discovery, modal-dialog patches) so
  authors find them before re-inventing the same sequences.
- Add an "Index timelines and UI elements directly" section: prefer
  range_tlui[0] over list(range_tlui)[0], and prefer UI-layer access
  (range_tlui[0].get_data("joined_right")) over reaching into the
  backend through .timeline / .rows / .components.
@FelipeDefensor FelipeDefensor requested a review from azfoo May 6, 2026 15:09
@FelipeDefensor FelipeDefensor added this to the 0.6.3 milestone Jun 16, 2026
@FelipeDefensor FelipeDefensor merged commit a3459b5 into dev Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants