From 5fd42e803eb048352f28ad3ec00d0a4c7608c44c Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Sat, 31 Oct 2026 01:16:14 +0000 Subject: [PATCH] test(app): cover floating destination bar insets --- app/test/shell/shell_bar_test.dart | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/test/shell/shell_bar_test.dart b/app/test/shell/shell_bar_test.dart index 10471189..2a6c889d 100644 --- a/app/test/shell/shell_bar_test.dart +++ b/app/test/shell/shell_bar_test.dart @@ -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', (