From 20d8bae46b9196313fb406ff78996bf5e328e2aa Mon Sep 17 00:00:00 2001 From: Maurice Date: Wed, 14 Oct 2026 13:02:44 +0200 Subject: [PATCH] test(tours): the wiring test follows the map stage's shared edit gate --- client/src/pages/tripPlanner/b4a-wiring.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/pages/tripPlanner/b4a-wiring.test.ts b/client/src/pages/tripPlanner/b4a-wiring.test.ts index 89a4ffca3..f9000b762 100644 --- a/client/src/pages/tripPlanner/b4a-wiring.test.ts +++ b/client/src/pages/tripPlanner/b4a-wiring.test.ts @@ -187,8 +187,10 @@ test('B4A desktop page delegates Tours state and permissions to its page hook', const mapClickGate = collect(mapStage, node => ts.isJsxAttribute(node) && node.name.getText(mapStage) === 'onMapClick' && node.initializer && ts.isJsxExpression(node.initializer) - && !!node.initializer.expression && node.initializer.expression.getText(mapStage).includes('canPlaceEdit')) + && !!node.initializer.expression && /canEditRoute|canPlaceEdit/.test(node.initializer.expression.getText(mapStage))) assert.ok(mapClickGate.length > 0) + // The gate the 2D and 3D maps share is derived from the place permission. + assert.match(mapStageText, /const canEditRoute = canPlaceEdit && /) }) test('B4A dedicated desktop controller retains GPX, draft, focus, and saved rail wiring', () => {