9551eceaed
Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
45 lines
1.2 KiB
Dart
45 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:pipelines_app/ui/adaptive/floating_destination_bar.dart';
|
|
|
|
void main() {
|
|
testWidgets('caption clicks select once and preserve text-field focus', (
|
|
tester,
|
|
) async {
|
|
final focus = FocusNode();
|
|
addTearDown(focus.dispose);
|
|
var selections = 0;
|
|
await tester.pumpWidget(
|
|
MaterialApp(
|
|
home: Scaffold(
|
|
body: Column(
|
|
children: [
|
|
TextField(focusNode: focus),
|
|
FloatingDestinationBar(
|
|
currentIndex: 0,
|
|
showLabels: true,
|
|
items: const [
|
|
FloatingDestinationItem(
|
|
label: 'Chat',
|
|
icon: Icon(Icons.chat),
|
|
),
|
|
],
|
|
onTap: (_) => selections++,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
await tester.pumpAndSettle();
|
|
focus.requestFocus();
|
|
await tester.pump();
|
|
expect(focus.hasFocus, isTrue);
|
|
await tester.tap(find.text('Chat'));
|
|
await tester.pump();
|
|
expect(selections, 1);
|
|
expect(focus.hasFocus, isTrue);
|
|
expect(tester.takeException(), isNull);
|
|
});
|
|
}
|