mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
test(tours): the wiring test follows the map stage's shared edit gate
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user