diff --git a/src/pages/resources/ResourcesMethodologyPage.test.tsx b/src/pages/resources/ResourcesMethodologyPage.test.tsx index 24b143dc..1627902a 100644 --- a/src/pages/resources/ResourcesMethodologyPage.test.tsx +++ b/src/pages/resources/ResourcesMethodologyPage.test.tsx @@ -5,9 +5,6 @@ import ResourcesMethodologyPage from "./ResourcesMethodologyPage"; import { REGION_MAPPING_DISCLAIMER } from "../../utils/geographyUtils"; import { MockIntersectionObserver } from "../../test/mockIntersectionObserver"; -const TERRITORIAL_CLAIMS = - "RMI does not make any statements on country delineations and/or conflicting territorial claims."; - const renderPage = () => render( @@ -23,19 +20,16 @@ const countOf = (haystack: string, needle: string): number => haystack.split(needle).length - 1; describe("ResourcesMethodologyPage — Regions note", () => { - it("states that region mappings come from the pathway's model, not RMI (#800)", () => { + it("states that regional representations follow the data sources, not RMI (#917)", () => { const { container } = renderPage(); - expect(flatText(container)).toContain(REGION_MAPPING_DISCLAIMER); + expect(flatText(container)).toContain(`Note: ${REGION_MAPPING_DISCLAIMER}`); }); - it("keeps the existing territorial-claims sentence in the same note", () => { + it("drops the earlier territorial-claims sentence and shows the note once", () => { const { container } = renderPage(); const text = flatText(container); - expect(text).toContain(TERRITORIAL_CLAIMS); - // Reconciled into one note rather than added alongside the old one — a second - // near-duplicate note is exactly what #800 asked us to avoid. - expect(countOf(text, TERRITORIAL_CLAIMS)).toBe(1); + expect(text).not.toContain("conflicting territorial claims"); expect(countOf(text, REGION_MAPPING_DISCLAIMER)).toBe(1); }); @@ -43,10 +37,9 @@ describe("ResourcesMethodologyPage — Regions note", () => { const { container } = renderPage(); const italics = Array.from(container.querySelectorAll("i")).filter((el) => - (el.textContent ?? "").replace(/\s+/g, " ").includes(TERRITORIAL_CLAIMS), + flatText(el).includes(REGION_MAPPING_DISCLAIMER), ); expect(italics).toHaveLength(1); - expect(flatText(italics[0])).toContain(REGION_MAPPING_DISCLAIMER); }); it("shows the note without any interaction, now that subsections no longer collapse (#955)", () => { diff --git a/src/pages/resources/ResourcesMethodologyPage.tsx b/src/pages/resources/ResourcesMethodologyPage.tsx index df03e823..43b83702 100644 --- a/src/pages/resources/ResourcesMethodologyPage.tsx +++ b/src/pages/resources/ResourcesMethodologyPage.tsx @@ -356,16 +356,13 @@ const ResourcesMethodologyPage: React.FC = () => { are allowed, based on ISO2 (3166) definitions. Regions are provided as defined in the pathway.

- {/* Kept as a single italic block: #800 reconciled two - near-duplicate notes into this one, and the test suite - asserts exactly one italic run carries it. */} + {/* Kept as a single italic block: #917 replaced the + earlier two-sentence note with the policy wording alone, + and the test suite asserts exactly one italic run carries + it. */}

- - Note: {REGION_MAPPING_DISCLAIMER} RMI does not make - any statements on country delineations and/or - conflicting territorial claims. - + Note: {REGION_MAPPING_DISCLAIMER}

diff --git a/src/utils/geographyUtils.ts b/src/utils/geographyUtils.ts index c8aa8258..90c8d61a 100644 --- a/src/utils/geographyUtils.ts +++ b/src/utils/geographyUtils.ts @@ -5,13 +5,13 @@ countries.registerLocale(en); export type GeographyKind = "global" | "region" | "country"; -// Approved wording from #800 (2026-08-10). Single source of truth for the -// region-mapping disclaimer, rendered on the methodology page, in the detail-page -// geography tooltip, and under the Geography filter dropdown — the three places a -// user meets a region→country mapping. +// Wording from the RMI policy doc (#917, replacing #800's). Single source of truth +// for the region-mapping disclaimer, rendered on the methodology page, in the +// detail-page geography tooltip, and under the Geography filter dropdown — the +// three places a user meets a region→country mapping. export const REGION_MAPPING_DISCLAIMER = - "The mapping of any individual country or territory to a region reflects the " + - "mappings of the model used in the pathway. It does not reflect any opinion of RMI."; + "Country and regional representations follow the conventions used in the " + + "underlying data sources and do not reflect any institutional point of view by RMI."; // Flatten the structured geography object into the ordered flat token list the // rest of the app historically operated on: "Global" (when global) → region