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 <noreply@anthropic.com>pull/1355/head
parent
959667e6b5
commit
d296a5fab0
@ -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',
|
||||
);
|
||||
});
|
||||
}
|
||||
Loading…
Reference in new issue