From d296a5fab04a8f88759066c806e9951daef5970f Mon Sep 17 00:00:00 2001 From: diffwireauto <330573775+diffwireauto@users.noreply.github.com> Date: Mon, 30 Nov 2026 23:31:00 -0500 Subject: [PATCH] test(#807): an Offband radio is recognized by name prefix The Windows live scan now filters advertisers by name prefix, so the list must include Offband-, or our own radios disappear from the scan. This test uses only the prefix list, which dev already has, so it fails on dev (Offband- missing) and passes with #807. The existing prefix test also uses the new matcher and can't compile on dev. Co-Authored-By: Claude Opus 5.5 --- test/connector/device_name_prefixes_test.dart | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/connector/device_name_prefixes_test.dart diff --git a/test/connector/device_name_prefixes_test.dart b/test/connector/device_name_prefixes_test.dart new file mode 100644 index 00000000..4e77aea1 --- /dev/null +++ b/test/connector/device_name_prefixes_test.dart @@ -0,0 +1,17 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/connector/meshcore_uuids.dart'; + +/// #807: the Windows live scan filters advertisers by these name prefixes, +/// because the WinRT watcher ignores the service filter. Offband radios +/// advertise as `Offband-...`, so without that prefix the filter would hide +/// our own radios. Uses only the prefix list, which predates #807. +void main() { + test('Offband radios are recognized by name prefix (#807)', () { + const offbandRadio = 'Offband-MC-Strycher-R1W'; + expect( + MeshCoreUuids.deviceNamePrefixes.any(offbandRadio.startsWith), + isTrue, + reason: 'an Offband radio must not be filtered out of the scan', + ); + }); +}