Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix: the merged tour, home and lightbox changes pass their checks

Maurice8c7fc989dc1e
diff --git a/client/scripts/rtl-baseline.json b/client/scripts/rtl-baseline.json
index 41c1eace1..cf8f5f91c 100644
--- a/client/scripts/rtl-baseline.json
+++ b/client/scripts/rtl-baseline.json
@@ -18,7 +18,6 @@
"components/Journey/JourneyMap.tsx": 1,
"components/Journey/JourneyMapGL.tsx": 2,
"components/Journey/MobileEntryView.tsx": 1,
- "components/Journey/PhotoLightbox.tsx": 3,
"components/Journey/journeyPhotoLayer.ts": 1,
"components/Layout/Navbar.tsx": 1,
"components/Layout/OfflineBanner.tsx": 1,
diff --git a/client/src/components/Assistant/cards/home/TripChatBlock.test.tsx b/client/src/components/Assistant/cards/home/TripChatBlock.test.tsx
index 4b6651098..7333a994e 100644
--- a/client/src/components/Assistant/cards/home/TripChatBlock.test.tsx
+++ b/client/src/components/Assistant/cards/home/TripChatBlock.test.tsx
@@ -39,7 +39,8 @@ describe('TripChatBlock', () => {
expect(screen.getByRole('region', { name: 'Continue in a trip chat' })).toBeInTheDocument();
expect(screen.getByText('Kyoto')).toBeInTheDocument();
expect(screen.getByText('Trip chat')).toBeInTheDocument();
- expect(screen.getByText(/ to /)).toBeInTheDocument();
+ // The dates, not the hidden label of the question, which has a "to" of its own.
+ expect(screen.getByText(/\d to \w/)).toBeInTheDocument();
expect(screen.getByText('Next')).toBeInTheDocument();
expect(screen.getByText('12 places')).toBeInTheDocument();
expect(screen.getByText('What is still missing?')).toBeInTheDocument();
diff --git a/client/tests/helpers/storeRegistry.ts b/client/tests/helpers/storeRegistry.ts
index b15187292..f740b6fa1 100644
--- a/client/tests/helpers/storeRegistry.ts
+++ b/client/tests/helpers/storeRegistry.ts
@@ -59,6 +59,7 @@ export const UNRESET_STORES: Record<string, string> = {
'its own tests put it back with clear(); it holds one open collection and nothing else reads it',
useDocSyncOfferStore: NOT_YET,
useHelpStore: NOT_YET,
+ useOpenTourStore: 'the saved tour open in the Tours tab, set by its stage; the tests that read it set it themselves',
usePluginStore: NOT_YET,
useRoadtripPreferencesStore: NOT_YET,
useSaveToCollectionStore: NOT_YET,
diff --git a/server/src/nest/tours/tours.module.ts b/server/src/nest/tours/tours.module.ts
index 5661d6303..dca5fdb46 100644
--- a/server/src/nest/tours/tours.module.ts
+++ b/server/src/nest/tours/tours.module.ts
@@ -77,9 +77,9 @@ import { TourPoiSearchService } from './tour-poi-search.service';
import { TourSkiController } from './tour-ski.controller';
import { TourSkiService } from './tour-ski.service';
import { TourSportWritesMcp } from './tour-sport-writes.mcp';
-import { TourTrailDetailsService } from './tour-trail-details.service';
import { TourStopsMcp } from './tour-stops.mcp';
import { TourStopsService } from './tour-stops.service';
+import { TourTrailDetailsService } from './tour-trail-details.service';
import { TourTrailGradeController } from './tour-trail-grade.controller';
import { TourTrailGradeService } from './tour-trail-grade.service';
import { TourVisitsController } from './tour-visits.controller';
diff --git a/server/tests/unit/mcp/demo-tool-gate.test.ts b/server/tests/unit/mcp/demo-tool-gate.test.ts
index 46f69ee26..372992254 100644
--- a/server/tests/unit/mcp/demo-tool-gate.test.ts
+++ b/server/tests/unit/mcp/demo-tool-gate.test.ts
@@ -15,7 +15,7 @@ import { db as testDb } from '../../../src/db/database';
import { DEMO_UNGATED_WRITE_TOOLS, isDemoGatedTool, trekDemoToolGate } from '../../../src/mcp/nest-mcp-policy';
import type { McpContext, McpRegistry, McpRegistryListing } from '../../../src/nest-mcp';
import { withRequestContext } from '../../../src/nest/database/request-context';
-import { createUser } from '../../helpers/factories';
+import { createUser, setAppSetting } from '../../helpers/factories';
import { createMcpTestRegistry } from '../../helpers/mcp-test-controllers';
import { bootTestApp } from '../../helpers/test-app';
import { resetTestDb, setAddonEnabled } from '../../helpers/test-db';
@@ -77,6 +77,8 @@ beforeAll(async () => {
beforeEach(() => {
resetTestDb(testDb);
for (const id of Object.values(ADDON_IDS)) setAddonEnabled(testDb, id, true);
+ // The wanderer tools show only while wanderer is allowed under Tours.
+ setAppSetting(testDb, 'tours_wanderer_enabled', 'true');
});
afterEach(() => {