also looking at this
feat: native trail maps and complete native mobile screens
#1017
60 files
+2505
-823
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -11,7 +11,7 @@ async function open(signedIn = true, geometry: string | null = TRAIL.geometry, r | ||
| 11 | 11 | answer(screen, await waitForRequest(screen, 0, r => r.payload?.module === 'Network'), ok({ success: true, trail: { ...TRAIL, geometry } })) |
| 12 | 12 | const review = await waitForRequest(screen, 0, r => r.payload?.args?.[0]?.url?.endsWith('/reviews')) |
| 13 | 13 | answer(screen, review, ok({ reviews: reviewRows })) |
| 14 | answer(screen, await waitForRequest(screen, 0, r => r.payload?.args?.[0]?.url?.endsWith('/forecast')), ok({ current: { temperature: 68, label: 'Clear' }, days: [{ date: '2026-10-17', low: 50, high: 70, label: 'Clear' }], attribution: { label: 'MET Norway', url: 'https://api.met.no' } })) | |
| 14 | answer(screen, await waitForRequest(screen, 0, r => r.payload?.args?.[0]?.url?.endsWith('/forecast')), ok({ current: { temperature: 68, label: 'Clear' }, days: [{ date: '2026-10-17', low: 50, high: 70, label: 'Clear', windMph: 5, precipitationMm: 2.54 }], attribution: { label: 'MET Norway', url: 'https://api.met.no' } })) | |
| 15 | 15 | answer(screen, await waitForRequest(screen, 0, r => r.payload?.args?.[0]?.url?.endsWith('/profile')), ok({ points: geometry ? [{ mi: 0, ft: 4000, lat: 37.7, lng: -119.5 }, { mi: 3, ft: 4500, lat: 37.72, lng: -119.5 }] : [] })) |
| 16 | 16 | if (signedIn) answer(screen, await waitForRequest(screen, 0, r => r.payload?.args?.[0]?.url?.endsWith('/viewer')), {...ok({ userId:12, saved:false, review:personalReview }),status:personalStatus}) |
| 17 | 17 | await waitForVisibility(screen, 'trail-detail-loading', 'none') |
| @@ -30,7 +30,10 @@ describe('native trail details', () => { | ||
| 30 | 30 | expect(nativeNodeProps(screen,'trail-write-review').title).toBe('Edit your review') |
| 31 | 31 | expect(shownText(screen)).toContain('Natural') |
| 32 | 32 | expect(shownText(screen)).toContain('Rock') |
| 33 | expect(shownText(screen)).toContain('68°F, Clear') | |
| 33 | expect(shownText(screen)).toContain('68°F') | |
| 34 | expect(shownText(screen)).toContain('Clear') | |
| 35 | expect(shownText(screen)).toContain('50°–70°F') | |
| 36 | expect(shownText(screen)).toContain('5 mph wind · 0.10 in precipitation') | |
| 34 | 37 | expect(shownText(screen)).toContain('3.0 mi · 4000–4500 ft') |
| 35 | 38 | expect(nativeNodeProps(screen,'trail-native-map')).toMatchObject({scrollEnabled:false,zoomEnabled:false,rotateEnabled:false}) |
| 36 | 39 | for (const id of ['trail-save','trail-directions','trail-share']) expect(nativeNodeStyle(screen,id).flexGrow).toBe(1) |