Drop "Details:" label from the mission stats pill to save footer space
The icons (flag/ruler/clock) already convey what each value means, so the label was redundant. Gave the pill a stable Key since tests relied on the now-removed text to find and tap it.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user