diff --git a/app/lib/ui/widgets/bottom_stats_bar.dart b/app/lib/ui/widgets/bottom_stats_bar.dart index e555305..254411e 100644 --- a/app/lib/ui/widgets/bottom_stats_bar.dart +++ b/app/lib/ui/widgets/bottom_stats_bar.dart @@ -249,6 +249,11 @@ class BottomStatsBar extends ConsumerWidget { : _fmtDuration(totalDurationSec); return GestureDetector( + // Testhaken (siehe widget_test.dart): seit dem Entfernen des + // "Details:"-Labels (Nutzerwunsch: Platz sparen in Plan- und + // Fly-Modus) gibt es keinen eindeutigen Text mehr, um die Pille in + // Tests anzutippen. + key: const Key('detailsPill'), onTap: onTap, child: Container( height: _footerElementHeight, @@ -260,15 +265,6 @@ class BottomStatsBar extends ConsumerWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - const Text( - 'Details:', - style: TextStyle( - color: Colors.white70, - fontWeight: _footerFontWeight, - fontSize: _footerFontSize, - ), - ), - const SizedBox(width: 10), const Icon(Icons.flag, size: _footerIconSize, color: Colors.white), const SizedBox(width: 4), Text(waypointText, diff --git a/app/test/widget_test.dart b/app/test/widget_test.dart index 8684b1b..8a88856 100644 --- a/app/test/widget_test.dart +++ b/app/test/widget_test.dart @@ -359,7 +359,7 @@ void main() { (tester) async { await _pumpWithContainer(tester); - await tester.tap(find.text('Details:')); + await tester.tap(find.byKey(const Key('detailsPill'))); // Die Liste wird als eigene Route mit Fade-Transition gepusht: erst ein // Frame ohne Dauer, damit der synchron ausgeloeste Navigator.push() // registriert wird, danach die Animationszeit abwarten. @@ -377,7 +377,7 @@ void main() { await tester.tap(find.byType(ReticleButton)); await tester.pump(); - await tester.tap(find.text('Details:')); + await tester.tap(find.byKey(const Key('detailsPill'))); await tester.pump(); await tester.pump(const Duration(milliseconds: 200)); expect(find.byType(WaypointListPanel), findsOneWidget); @@ -400,7 +400,7 @@ void main() { await tester.tap(find.byType(ReticleButton)); await tester.pump(); - await tester.tap(find.text('Details:')); + await tester.tap(find.byKey(const Key('detailsPill'))); await tester.pump(); await tester.pump(const Duration(milliseconds: 200)); @@ -424,7 +424,7 @@ void main() { await tester.tap(find.byType(ReticleButton)); await tester.pump(); - await tester.tap(find.text('Details:')); + await tester.tap(find.byKey(const Key('detailsPill'))); await tester.pump(); await tester.pump(const Duration(milliseconds: 200)); @@ -457,7 +457,7 @@ void main() { await tester.tap(find.byType(ReticleButton)); await tester.pump(); - await tester.tap(find.text('Details:')); + await tester.tap(find.byKey(const Key('detailsPill'))); await tester.pump(); await tester.pump(const Duration(milliseconds: 200)); @@ -492,7 +492,7 @@ void main() { await tester.tap(find.byType(ReticleButton)); await tester.pump(); - await tester.tap(find.text('Details:')); + await tester.tap(find.byKey(const Key('detailsPill'))); await tester.pump(); await tester.pump(const Duration(milliseconds: 200)); @@ -519,7 +519,7 @@ void main() { await tester.tap(find.byType(ReticleButton)); await tester.pump(); - await tester.tap(find.text('Details:')); + await tester.tap(find.byKey(const Key('detailsPill'))); await tester.pump(); await tester.pump(const Duration(milliseconds: 200));