Skip to content

Add regression test for Board's titleEditableViaCell primary-field/groupBy collision fallback #272

Description

@brylie

Board's titleEditableViaCell derivation (BoardCollectionView.svelte:164-171) falls back to a plain, non-editable card title whenever the Collection's primary field is also groupBy or swimlaneBy — avoiding a duplicate editable control for the same value (documented in docs/specifications/collection-views.md §7, issue #104). This behavior is currently correct only by code inspection: BoardCollectionView.svelte.test.ts has no test exercising it.

Surfaced during PR reflection on #268, which added the equivalent test for Calendar's mirror of this same pattern (CalendarCollectionView.svelte.test.ts, "falls back to a plain non-editable title when the primary field is also the groupBy date property").

  • Add a Board component test setting a Collection's primaryFieldKey equal to config.groupBy, asserting the card renders exactly one editable control for that field's value (e.g. via getAllByDisplayValue length 1) and the static fallback label, not a duplicate PropertyValueCell
  • Add the equivalent test for primaryFieldKey equal to config.swimlaneBy
  • No production code change expected — this is a coverage gap, not a behavior change

Done when: a future refactor of Board's grouping/primary-field derivation that reintroduces a duplicate editable control for a colliding field would fail a test, not just a manual reading of the code.

Priority: P2 — matches comparable test-coverage-backfill issues on this board (#233, #221), no user-facing bug today. Targeted at 0.4.0 since it backfills coverage for #96/#104/#105, all shipped in this milestone, and needs QA closure before the release rather than drifting into 0.5.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions