mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 13:23:04 +00:00
fix(ci): today's changes pass the release gates
- iOS: the navigation proxy reports an error page through a callback the controller sets; it called the controller's method on itself and did not build. - keyboard: the done key reads the field's text in the capture phase, before the field's own handler, so a list that adds an item on Enter and clears itself keeps the keyboard; the tests wire it as the app does. - Ireland migration: the queued writes use addSql instead of awaiting inside loops; only table constants and integer ids reach the SQL. - tests: the Dawarich GL test types its two layer specs once (strict baseline lowered), the collab test reads the id off the listed message, the reasoning test runs its four servers in parallel, and a wasm copy covers the precompressed branch without a charset. - en wording: the deviations agreement no longer calls TREK self-hosted.
This commit is contained in:
@@ -180,19 +180,23 @@ describe('useDawarichTrailGL', () => {
|
||||
expect(gl.spies.addSource).toHaveBeenCalledWith(SOURCE, expect.objectContaining({ type: 'geojson' }))
|
||||
|
||||
const [casingCall, lineCall] = gl.spies.addLayer.mock.calls
|
||||
expect(casingCall[0].id).toBe(CASING_LAYER)
|
||||
expect(casingCall[0].paint['line-color']).toBe(DAWARICH_TRAIL_CASING)
|
||||
expect(casingCall[0].paint['line-width']).toBe(7)
|
||||
expect(casingCall[0].paint['line-opacity']).toBe(0.9)
|
||||
expect(lineCall[0].id).toBe(LINE_LAYER)
|
||||
if (!casingCall || !lineCall) throw new Error('expected the casing and the line layer')
|
||||
type LayerSpec = { id: string; paint: Record<string, unknown> }
|
||||
const casing = casingCall[0] as LayerSpec
|
||||
const line = lineCall[0] as LayerSpec
|
||||
expect(casing.id).toBe(CASING_LAYER)
|
||||
expect(casing.paint['line-color']).toBe(DAWARICH_TRAIL_CASING)
|
||||
expect(casing.paint['line-width']).toBe(7)
|
||||
expect(casing.paint['line-opacity']).toBe(0.9)
|
||||
expect(line.id).toBe(LINE_LAYER)
|
||||
// Per-feature colour, with the casing white as the fallback a feature
|
||||
// without one falls back to. The GPX layer uses the same shape.
|
||||
expect(lineCall[0].paint['line-color']).toEqual(['coalesce', ['get', 'color'], DAWARICH_TRAIL_CASING])
|
||||
expect(line.paint['line-color']).toEqual(['coalesce', ['get', 'color'], DAWARICH_TRAIL_CASING])
|
||||
// Dashed, so the recording is distinguishable from the planned route for
|
||||
// someone who cannot tell the two hues apart.
|
||||
expect(lineCall[0].paint['line-dasharray']).toEqual([2.5, 1.25])
|
||||
expect(lineCall[0].paint['line-width']).toBe(4)
|
||||
expect(lineCall[0].paint['line-opacity']).toBe(1)
|
||||
expect(line.paint['line-dasharray']).toEqual([2.5, 1.25])
|
||||
expect(line.paint['line-width']).toBe(4)
|
||||
expect(line.paint['line-opacity']).toBe(1)
|
||||
|
||||
// Both go beneath the planned route's casing. The line is inserted second
|
||||
// and therefore ends up above its own casing and still below the plan.
|
||||
|
||||
Reference in New Issue
Block a user