diff --git a/CHANGELOG.md b/CHANGELOG.md index 45215e2..6715f36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project are documented here. The project follows - DKNOG in Copenhagen joins the conference calendar every March. - A PNI in the customer’s city now meets their local-breakout requirement while your network is Tier 1 (#20). +- A deal’s “Go there” button takes you to a required city without a POP, instead of returning to a city you already serve. ## [1.26.1] — 2026-10-25 diff --git a/site/index.html b/site/index.html index 3fb4e9f..fb5dd47 100644 --- a/site/index.html +++ b/site/index.html @@ -2918,7 +2918,7 @@ function renderLeft(){checkLayer(); if(!S.offers.length)h+=`
${tr('No open offers right now. Businesses look for networks with POPs in their city. New ones pop up every few weeks.')}
`; for(const o of S.offers.slice().sort((a,b)=>a.exp-b.exp)){const has=bHas(o); h+=`${tr('Your Network Operations Center. Every notification also lands here. Things fail all the time on the internet. Redundant links and multiple upstreams let traffic reroute by itself.')}
`; diff --git a/tests/issues.test.js b/tests/issues.test.js index e72a737..91543e2 100644 --- a/tests/issues.test.js +++ b/tests/issues.test.js @@ -655,3 +655,18 @@ test('#20 local PNIs satisfy local breakout only while Tier 1, without changing ev("S.transit=[];S.ixp.fra=0");assert.equal(ev("REQS.local.ok({city:'fra'})"),true); assert.deepEqual(errors,[]); }); + +test('deal navigation visits the first missing POP, including second endpoints and multi-site offers',()=>{ + const {ev,dom,errors}=load();ev("ACT.start({});S.cash=1e8;UI.speed=0;UI.left='deals';UI.leftOpen=true;S.offers=[{id:'route',type:'l2vpn',name:'Missing POP circuit',city:'fra',city2:'bde',bw:10,rate:1000,reqs:[],exp:30}];renderLeft()"); + const go=()=>dom.window.document.querySelector('#leftBody [data-act="focusCity"]'); + assert.equal(JSON.parse(go().dataset.args).city,'bde'); + ev(`ACT.focusCity(${go().dataset.args})`);assert.equal(ev('UI.sel.id'),'bde');assert.equal(ev('!!S.pops.bde'),false,'navigation does not buy a POP'); + ev("S.pops.bde={routers:1,rgen:0};delete S.pops.fra;renderLeft()");assert.equal(JSON.parse(go().dataset.args).city,'fra','the first endpoint can also be missing'); + ev("delete S.pops.bde;renderLeft()");assert.equal(JSON.parse(go().dataset.args).city,'fra','both missing uses the first required city'); + ev("S.pops.fra={routers:1,rgen:0};S.offers[0].type='sdwan';S.offers[0].city2=null;S.offers[0].sites=['fra','ams','par'];window.innerWidth=360;renderLeft()"); + assert.equal(JSON.parse(go().dataset.args).city,'ams'); + ev("S.pops.ams={routers:1,rgen:0};renderLeft()");assert.equal(JSON.parse(go().dataset.args).city,'par'); + ev("S.pops.par={routers:1,rgen:0};renderLeft()");assert.equal(go(),null);assert.ok(dom.window.document.querySelector('#leftBody [data-act="accept"]')); + ev("S.offers[0].type='l2vpn';delete S.offers[0].sites;S.offers[0].city='bde';renderLeft()");assert.equal(JSON.parse(go().dataset.args).city,'bde','single-site offers still work'); + assert.deepEqual(errors,[]); +});