mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-12-05 23:43:59 +01:00
The trainer-app picker now shows an external-link button next to every app that has an official site, opening it in the browser. Adds an officialUrl to SupportedApp with per-app overrides (Strappo, MyWhoosh, Rouvy, Zwift, TrainingPeaks Virtual, Biketerra, BikeControl, OpenBikeControl). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28 lines
835 B
Dart
28 lines
835 B
Dart
import 'package:bike_control/utils/keymap/apps/supported_app.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
void main() {
|
|
SupportedApp byName(String name) =>
|
|
SupportedApp.supportedApps.firstWhere((app) => app.name == name);
|
|
|
|
test('trainer apps expose an https officialUrl for the chooser link', () {
|
|
const named = [
|
|
'Strappo',
|
|
'MyWhoosh',
|
|
'Rouvy',
|
|
'Zwift',
|
|
'Biketerra',
|
|
'TrainingPeaks Virtual',
|
|
];
|
|
for (final name in named) {
|
|
final url = byName(name).officialUrl;
|
|
expect(url, isNotNull, reason: '$name should link to its official site');
|
|
expect(url, startsWith('https://'), reason: '$name url should be https');
|
|
}
|
|
});
|
|
|
|
test('Strappo links to getstrappo.com', () {
|
|
expect(byName('Strappo').officialUrl, 'https://getstrappo.com');
|
|
});
|
|
}
|