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.
| @@ -100,6 +100,21 @@ describe('native Record checkpoint recovery',()=>{ | ||
| 100 | 100 | const read=await waitForRequest(screen,requests(screen).indexOf(host)+1,r=>r.payload.method==='readRecording') |
| 101 | 101 | expect(read.payload.args[0]).toMatchObject({expectedId:'run-7'}) |
| 102 | 102 | }) |
| 103 | it('recovers a registered start whose native acknowledgement was interrupted',async()=>{ | |
| 104 | const screen=await start('Record',{},['fetch','secureStorage','storage','storageCompareAndSet','geolocation','locationRecordingOwnership','lifecycle'],new Map([['auth_token','record-token'],['wildloop-account',JSON.stringify({token:'record-token',user:{id:7}})]])) | |
| 105 | const intent={...checkpoint,phase:'starting',pending:undefined} | |
| 106 | const stored=await waitForRequest(screen,0,r=>r.payload.module==='Storage' && r.payload.method==='get') | |
| 107 | answer(screen,stored,intent) | |
| 108 | const host=await waitForRequest(screen,0,r=>r.payload.method==='getRecordingState') | |
| 109 | expect(host.payload.args[0]).toEqual({expectedId:'run-7'}) | |
| 110 | answer(screen,host,{active:true,paused:false,id:'run-7',startedAt:100000}) | |
| 111 | const read=await waitForRequest(screen,0,r=>r.payload.method==='readRecording') | |
| 112 | answer(screen,read,[]) | |
| 113 | const durable=await waitForRequest(screen,0,r=>r.payload.method==='compareAndSet') | |
| 114 | expect(durable.payload.args[1]).toMatchObject({id:'run-7',phase:'starting'}) | |
| 115 | expect(durable.payload.args[2]).toMatchObject({id:'run-7',phase:'recording'}) | |
| 116 | expect(requests(screen).some(r=>r.payload.method==='startRecording')).toBe(false) | |
| 117 | }) | |
| 103 | 118 | it('does not read GPS when a legacy checkpoint has no verifiable host identity',async()=>{ |
| 104 | 119 | const screen=await start('Record',{},['fetch','secureStorage','storage','geolocation','locationRecordingOwnership','lifecycle','liveActivity'],new Map([['auth_token','record-token'],['wildloop-account',JSON.stringify({token:'record-token',user:{id:7}})]])) |
| 105 | 120 | const stored=await waitForRequest(screen,0,r=>r.payload.module==='Storage' && r.payload.method==='get') |