feat(app): run detail tabs are a full-width bottom bar on phones
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user