feat(app): run detail tabs are a full-width bottom bar on phones

This commit is contained in:
2026-10-23 16:57:52 +01:00
parent b5a28e56ae
commit 2864c0b4c7
3 changed files with 73 additions and 9 deletions
@@ -74,6 +74,32 @@ void main() {
}
});
testWidgets('${platform.name} phone tabs sit at the bottom, wide ones '
'under the header', (tester) async {
await pumpRunDetail(tester, platform, size: const Size(390, 844));
final strip = tester.getRect(find.byKey(const Key('run-detail-tabs')));
final body = tester.getRect(
find.byKey(const Key('run-detail-tab-body-summary')),
);
expect(strip.top, greaterThanOrEqualTo(body.bottom));
expect(strip.bottom, greaterThan(844 - 80));
// Every tab is on screen without scrolling the bar.
for (final tab in renderedRunDetailTabs) {
final rect = tester.getRect(runDetailTab(tab));
expect(rect.left, greaterThanOrEqualTo(0), reason: tab.name);
expect(rect.right, lessThanOrEqualTo(390), reason: tab.name);
}
await pumpRunDetail(tester, platform, size: const Size(1000, 844));
final wideStrip = tester.getRect(
find.byKey(const Key('run-detail-tabs')),
);
final wideBody = tester.getRect(
find.byKey(const Key('run-detail-tab-body-summary')),
);
expect(wideStrip.bottom, lessThanOrEqualTo(wideBody.top));
});
testWidgets('${platform.name} missing graph states the exact wording', (
tester,
) async {