test(app): cover floating destination bar insets

This commit is contained in:
2026-10-31 01:16:14 +00:00
parent 19d27d102f
commit 5fd42e803e
+19
View File
@@ -5,6 +5,7 @@ import 'package:pipelines_app/shell/adaptive_shell.dart';
import 'package:pipelines_app/shell/destination.dart';
import 'package:pipelines_app/shell/shell_bar.dart';
import 'package:pipelines_app/ui/adaptive/floating_destination_bar.dart';
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
Widget _app({required bool cupertino, required bool open, VoidCallback? back}) {
final shell = AdaptiveShell(
@@ -61,6 +62,24 @@ void main() {
expect(find.byKey(const ValueKey('shell.search')), findsNothing);
expect(find.byType(FloatingDestinationBar), findsOneWidget);
});
testWidgets('$host: floating tabs stay inset and select destinations', (
tester,
) async {
tester.view.physicalSize = const Size(390, 844);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset);
await tester.pumpWidget(_app(cupertino: cupertino, open: false));
final destinationPill = find.descendant(
of: find.byType(FloatingDestinationBar),
matching: find.byType(GlassPill),
);
expect(tester.getSize(destinationPill).width, 358);
await tester.tap(find.text('Chat'));
await tester.pump();
expect(find.text('Chat — Not implemented'), findsOneWidget);
});
}
testWidgets('tabs show the running and unread counts their screens publish', (