Merge branch 'main' into run/lists-polish-r2
This commit is contained in:
@@ -4,6 +4,8 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
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(
|
||||
@@ -58,6 +60,25 @@ void main() {
|
||||
expect(AppDestination.values, hasLength(5));
|
||||
expect(find.text('Search'), findsOneWidget);
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user