Merge commit 'ef671d2e3e902a4db3fa13336cabd26012084ea7' into pipelines/run-20261112-1912-ctrl-e-toggles-files-ctrl-shift-e-center-719c

This commit is contained in:
2026-11-12 19:52:52 +00:00
4 changed files with 63 additions and 24 deletions
+18 -18
View File
@@ -139,24 +139,24 @@ void main() {
expect(find.text('Chat — Not implemented'), findsOneWidget);
});
testWidgets('content learns the bar height as bottom padding', (
tester,
) async {
for (final size in const [Size(390, 844), Size(640, 800)]) {
await setSize(tester, size);
await tester.pumpWidget(shell());
await tester.pump();
final rect = size.width < 600
? tester.getRect(find.byType(NavigationBar))
: tester.getRect(pill());
// The content's bottom padding clears the whole bar and its margin.
expect(
contentBottomPadding,
moreOrLessEquals(size.height - rect.top, epsilon: 0.5),
reason: '$size',
);
}
});
testWidgets(
'phone content has no floating-bar padding; tablet content does',
(tester) async {
for (final size in const [Size(390, 844), Size(640, 800)]) {
await setSize(tester, size);
await tester.pumpWidget(shell());
await tester.pump();
final rect = size.width < 600
? tester.getRect(find.byType(NavigationBar))
: tester.getRect(pill());
expect(
contentBottomPadding,
size.width < 600 ? 0 : size.height - rect.top,
reason: '$size',
);
}
},
);
testWidgets('resizing moves the bar without remounting content', (
tester,
@@ -70,6 +70,24 @@ void main() {
expect(tester.widget<NavigationBar>(bar()).selectedIndex, 4);
});
testWidgets('the phone destination body ends at the bar top', (tester) async {
await pumpPhone(
tester,
bodies: {
AppDestination.pipelines: (_) => const ColoredBox(
key: ValueKey('phone.destination-body'),
color: Colors.red,
),
},
);
final body = tester.getRect(
find.byKey(const ValueKey('phone.destination-body')),
);
final navigationBar = tester.getRect(bar());
expect(body.bottom, navigationBar.top);
});
testWidgets('a tap shows its destination, and a re-tap of the shown one '
'still reports it to the shell', (tester) async {
final selected = <AppDestination>[];