From c3d863fc3ff7e4da8ccd27a85fe892a0fc166e2d Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Tue, 1 Dec 2026 15:15:56 +0530 Subject: [PATCH] OpenConceptLab/ocl_online#327 | Links to TBv3 go to app., where TBv3 now is, not app.v3. Co-Authored-By: Claude Opus 5.5 --- src/common/__tests__/appUrls.test.js | 11 ++++++----- src/common/appUrls.js | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/common/__tests__/appUrls.test.js b/src/common/__tests__/appUrls.test.js index ac921a00..46544f6a 100644 --- a/src/common/__tests__/appUrls.test.js +++ b/src/common/__tests__/appUrls.test.js @@ -11,10 +11,11 @@ test('localhost points to the local TermBrowser', () => { assert.equal(resolveV3URL('', 'http://localhost:4004', 'localhost:4004'), 'http://localhost:4002') }) -test('official Mapper hosts map to the matching TermBrowser environment', () => { - assert.equal(resolveV3URL('', 'https://map.openconceptlab.org', 'map.openconceptlab.org'), 'https://app.v3.openconceptlab.org') - assert.equal(resolveV3URL('', 'https://map.qa.openconceptlab.org', 'map.qa.openconceptlab.org'), 'https://app.v3.qa.openconceptlab.org') - assert.equal(resolveV3URL(undefined, 'https://map.staging.who.openconceptlab.org', 'map.staging.who.openconceptlab.org'), 'https://app.v3.staging.who.openconceptlab.org') +test('official Mapper hosts map to the matching TermBrowser environment at app.', () => { + assert.equal(resolveV3URL('', 'https://map.openconceptlab.org', 'map.openconceptlab.org'), 'https://app.openconceptlab.org') + assert.equal(resolveV3URL('', 'https://map.qa.openconceptlab.org', 'map.qa.openconceptlab.org'), 'https://app.qa.openconceptlab.org') + assert.equal(resolveV3URL('', 'https://map.staging.openconceptlab.org', 'map.staging.openconceptlab.org'), 'https://app.staging.openconceptlab.org') + assert.equal(resolveV3URL(undefined, 'https://map.staging.who.openconceptlab.org', 'map.staging.who.openconceptlab.org'), 'https://app.staging.who.openconceptlab.org') }) test('custom hosts without configuration point to production', () => { @@ -26,7 +27,7 @@ test('an integrated TermBrowser needs configuration or an official Mapper host', assert.equal(resolveIntegratedV3URL('https://tb.example.org/', 'https://mapper.example.org', 'mapper.example.org'), 'https://tb.example.org') assert.equal(resolveIntegratedV3URL('http://localhost:4002', 'http://localhost:4004', 'localhost:4004'), 'http://localhost:4002') assert.equal(resolveIntegratedV3URL('', 'http://localhost:4004', 'localhost:4004'), '', 'a standalone local Mapper keeps its own pages') - assert.equal(resolveIntegratedV3URL('', 'https://map.qa.openconceptlab.org', 'map.qa.openconceptlab.org'), 'https://app.v3.qa.openconceptlab.org') + assert.equal(resolveIntegratedV3URL('', 'https://map.qa.openconceptlab.org', 'map.qa.openconceptlab.org'), 'https://app.qa.openconceptlab.org') assert.equal(resolveIntegratedV3URL('', 'https://mapper.example.org', 'mapper.example.org'), '') assert.equal(resolveIntegratedV3URL('', undefined, undefined), '') }) diff --git a/src/common/appUrls.js b/src/common/appUrls.js index 073cfeef..fc03eed0 100644 --- a/src/common/appUrls.js +++ b/src/common/appUrls.js @@ -1,4 +1,4 @@ -export const PRODUCTION_TERMBROWSER_URL = 'https://app.v3.openconceptlab.org' +export const PRODUCTION_TERMBROWSER_URL = 'https://app.openconceptlab.org' const OFFICIAL_MAPPER_ORIGIN = /^https:\/\/map\.([a-z]+\.)*openconceptlab\.org$/ @@ -9,7 +9,7 @@ export const resolveIntegratedV3URL = (configured, origin) => { if(url) return url if(OFFICIAL_MAPPER_ORIGIN.test(origin || '')) - return origin.replace('//map.', '//app.v3.') + return origin.replace('//map.', '//app.') return '' }