test(app): cover floating destination bar insets
This commit is contained in:
@@ -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', (
|
||||
|
||||
Reference in New Issue
Block a user