Fix APRS counters, BBS reads and chat parsing; add reliable packet TX helpers
This commit is contained in:
1 parent
0668a73d40
commit
3643638090
15 files changed
+119
-56
No files matched your search
+3
-14
@@ -60,22 +60,11 @@ test('APRS removes only stations outside the filter and retains the local marker
|
||||
});
|
||||
|
||||
const journalData=()=>({since:'2026-01-01',warnings:['fixture.log: partial tail'],limited:false,own:{call:'N0LOCAL',position:{lat:44,lon:9}},stations:[station('N0AAA')],sessions:[{id:'one',call:'N0AAA',startedAt:new Date().toISOString(),connectedAt:new Date().toISOString(),service:'BBS',direction:'incoming',transport:'Radio',status:'complete',duration:12}]});
|
||||
function journalHarness(){
|
||||
let next=journalData();const h=harness('journal.js','globalThis.fixture={load,zoom,renderMap,mapInfo,getView:()=>[...view]};',async()=>structuredClone(next));
|
||||
h.context.page='map';h.$('#map-period').value='7';h.$('#journal-period').value='7';h.$('#map-tracks').checked=true;
|
||||
return {...h,setNext:value=>next=value};
|
||||
}
|
||||
test('journal refresh keeps the zoom and unchanged SVG instead of fitting or rebuilding the map',async()=>{
|
||||
const h=journalHarness();await h.fixture.load();h.fixture.zoom(.65);const view=h.fixture.getView(),svg=h.$('#station-map'),writes=svg.writes;
|
||||
await h.fixture.load(true,true);await h.fixture.load(true,true);
|
||||
assert.deepEqual(h.fixture.getView(),view);assert.equal(svg.writes,writes);
|
||||
test('journal loads without the removed station map and preserves coverage warnings',async()=>{
|
||||
const h=harness('journal.js','globalThis.fixture={load};',async()=>journalData());
|
||||
h.context.page='journal';h.$('#journal-period').value='7';await h.fixture.load();
|
||||
assert.equal(h.$('#journal-warning').hidden,false);assert.match(h.$('#journal-warning-detail').textContent,/partial tail/);
|
||||
});
|
||||
test('map refresh preserves an unsaved locator even after the field loses focus',async()=>{
|
||||
const h=journalHarness();await h.fixture.load();const s=station('N0AAA');h.fixture.mapInfo(s);
|
||||
const input=h.$('#station-locator');input.defaultValue='JN45MM';input.value='JN45NN';const writes=h.$('#map-info').writes;
|
||||
h.fixture.mapInfo({...s,lastAt:new Date().toISOString()});assert.equal(input.value,'JN45NN');assert.equal(h.$('#map-info').writes,writes);
|
||||
});
|
||||
|
||||
test('background API polls stay quiet, while interactive requests finish the busy indicator even on error',async()=>{
|
||||
let starts=0,finishes=0,request,fail=false;
|
||||
|
||||
Reference in new issue
Block a user