Files
swiftcontrol/test/strappo_app_test.dart
Jonas Bark 7e1de77bdd feat(apps): add Strappo as an officially supported trainer app
Strappo (getstrappo.com) integrates the open OpenBikeControl protocol, so it
joins the supported-apps list as an official network/BLE partner (obpMdns +
obpBle) — button events arrive over the protocol, so no keyboard keymap is
needed. Adds the SupportedApp definition, registry entry, partner logo asset,
and a registration test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 12:38:30 +02:00

29 lines
1.0 KiB
Dart

import 'package:bike_control/utils/keymap/apps/supported_app.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
SupportedApp strappo() =>
SupportedApp.supportedApps.firstWhere((app) => app.name == 'Strappo');
test('Strappo is registered as an official supported app', () {
final matches =
SupportedApp.supportedApps.where((app) => app.name == 'Strappo');
expect(matches, hasLength(1));
expect(matches.first.officialIntegration, isTrue);
});
test('Strappo connects via the OpenBikeControl protocol (mDNS + BLE)', () {
final app = strappo();
expect(app.supportLevel(AppConnectionMethod.obpMdns),
ConnectionSupport.supported);
expect(app.supportLevel(AppConnectionMethod.obpBle),
ConnectionSupport.supported);
// OBC delivers button events over the protocol, so there is no keyboard map.
expect(app.keymap.keyPairs, isEmpty);
});
test('Strappo ships an official partner logo asset', () {
expect(strappo().logoAsset, 'assets/strappo.png');
});
}