From 4cb788f4e786f0563c2a3a6f7f451c7c245bee86 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 14:17:32 +0000 Subject: [PATCH] test(plugin-map): point the reach test narration at where the 'Marker' placeholder actually lives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment above the discriminating `titleField` arm in `ObjectMap.listViewMapConfigReach.test.tsx` said `'Marker'` was "the literal `getMapConfig` falls back to". It never lived there. `getMapConfig` starts at `ObjectMap.tsx:345`; the placeholder is `getRecordDisplayName`'s `fallback` option in the marker-building transform some 400 lines away, and since objectui#5953 `getMapConfig` forges no title binding on any branch. The historical half was also merged with a different branch's symptom. Measured at the parent of the forward commit (e2e8e68f1^): the read site was `mapConfig.titleField ? record[mapConfig.titleField] : 'Marker'`, and `getMapConfig`'s flat branch carried `titleField: schema.titleField || 'name'`. Pre-forward `ListView` always emitted `locationField: 'location'`, so this arm took that flat branch, got a forged `'name'`, and — these fixture records carry no `name` key — read `undefined`, not `'Marker'`. Also drops the now-stale "the marker transform reads `record[titleField]`": the transform resolves through `getRecordDisplayName`, which checks `options.titleField` at step 0, so the declared binding still wins outright and the arm still pins a real read rather than a forwarded prop. Comment only. No assertion, fixture or expected value changed. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_011SfZeFWrhGLHmfq61xbz4q --- .changeset/plugin-map-reach-test-narration.md | 4 ++++ .../src/ObjectMap.listViewMapConfigReach.test.tsx | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .changeset/plugin-map-reach-test-narration.md diff --git a/.changeset/plugin-map-reach-test-narration.md b/.changeset/plugin-map-reach-test-narration.md new file mode 100644 index 0000000000..7fe78586d7 --- /dev/null +++ b/.changeset/plugin-map-reach-test-narration.md @@ -0,0 +1,4 @@ +--- +--- + +Comment-only correction in `packages/plugin-map/src/ObjectMap.listViewMapConfigReach.test.tsx`: the narration above the `titleField` arm attributed the `'Marker'` placeholder to `getMapConfig`, which never held it. No assertion, fixture or published behaviour changes. diff --git a/packages/plugin-map/src/ObjectMap.listViewMapConfigReach.test.tsx b/packages/plugin-map/src/ObjectMap.listViewMapConfigReach.test.tsx index 2ef89a5879..f2658100ad 100644 --- a/packages/plugin-map/src/ObjectMap.listViewMapConfigReach.test.tsx +++ b/packages/plugin-map/src/ObjectMap.listViewMapConfigReach.test.tsx @@ -134,10 +134,16 @@ describe('a view-level `map` block reaches getMapConfig through ListView (object await waitFor(() => expect(screen.getAllByTestId('map-marker').length).toBe(2)); // The title is a real read, not a forwarded prop: `getMapConfig` resolves - // `titleField`, the marker transform reads `record[titleField]`, and the - // popup renders it. Before the forward landed this read `'Marker'` — the - // literal `getMapConfig` falls back to — which is the `undefined`/placeholder - // marker-title symptom the card was filed for. + // the declared `titleField`, the marker transform hands it to + // `getRecordDisplayName` as `options.titleField` — step 0 of that resolver, + // so a declared binding still wins outright — and the popup renders it. + // Before the forward landed the block never reached `getMapConfig` at all: + // the flat branch forged `titleField: 'name'` (dropped by objectui#5953) + // and these records carry no `name`, so this read `undefined` — the + // marker-title symptom the card was filed for. `'Marker'` is not a + // `getMapConfig` literal and never was: it is `getRecordDisplayName`'s + // `fallback` option in the marker transform, reached now only by an + // id-less record. fireEvent.click(screen.getAllByTestId('map-marker')[0]); await waitFor(() => expect(screen.queryByTestId('map-popup')).not.toBeNull()); expect(screen.getByText('Install rooftop unit')).toBeTruthy();