Hi,
Firstly, welcome to the Forum.
runs like a dream
replaced the battery to pass the roadworthy test.
check the charging system first
Uh-uh, check the
battery first; not only is it the last thing you replaced, it's a
good battery that's required to run the electrics, never assume "new battery" = good battery.
However, also, is the headlamp bulb standard? Standard on your bike was either 45/40 (Watts main/dip) or 45/35, depending on who you believe (respectively Lucas or Triumph). Not only are some later replacements 48/48, they're all super-crap BPF (British Pre Focus) and the headlamp is often upgraded to modern 60/55. Problem with higher-Watts bulbs is the standard charging system struggles if you don't use plenty of revs. all the time, including cruising.
Testing the battery/charging system
Trickle-charge battery overnight, reconnect it to the bike, turn ignition switch on briefly, turn off - this'll dissipate any misleading 'surface charge' that can be present after charging.
All switches on the bike turned off, connect a well-calibrated Volt- or multi-meter one meter lead to each battery terminal.
Assuming standard lead-acid-type battery (liquid acid, AGM or gel), good battery, well-calibrated meter should read 12.6V (higher Volts is not 'better', it's just a poorly-calibrated meter

).
Lower than 12.6V after overnight trickle-charging might also be a poorly-calibrated meter, but it might also be a bad battery; return to the supplier for verification?
Assuming the meter displays 12.6V with everything switched off, turn on just the ignition, the meter display should change very little; even a drop to 12.5V isn't good with a new battery.
Assuming little or no change in the meter display with just the ignition on, turn on all the lamps; the meter display will change a little but shouldn't drop as low as, say, 12.3V (unless the headlamp bulb is actually some fantastic-Watts floodlamp ...?

).
Assuming only a little change in the meter display with both ignition and lighting turned on, leave the bike that way (engine not started) for either half-an-hour or 'til the meter display falls to 12.3V (battery half-discharged), whichever is the earlier.
Assuming the battery isn't half-discharged in about five minutes (suspicious), recharge the battery.
Battery recharged and reconnected to the bike, start the engine, reconnect the meter across the battery, raise engine rpm slowly, meter reading should rise with engine rpm to ~15V @ 3,500~4,000 rpm then remain steady even when rpm are raised further. Volts should only fall when rpm falls.
Btw, when charging the battery, I always take it off the bike. On the bike, the fuse must be removed but, in any case, does not offer any protection if, say, the open seat closes and the pan comes into contact with the charger terminal in the battery -ve terminal.
Hth, post how you get on? Also look out for a PM ("Started a conversation" in this Forum's software vernacular).
Regards,