From 8edc344191eab4d99c27d37bfdb2a99896dade1f Mon Sep 17 00:00:00 2001 From: zarzet <42882290+zarzet@users.noreply.github.com> Date: Fri, 23 Oct 2026 15:39:44 +0700 Subject: [PATCH] test(library): expect the sort sheet to scroll at its cap With the file size sorts there are fourteen options, which no longer fit a 915 point phone. The sheet now stops at its 85% cap and scrolls, so the test checks the cap and reaches the last sort by scrolling. --- test/album_completeness_query_test.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/album_completeness_query_test.dart b/test/album_completeness_query_test.dart index 6c4e9b264..eced47afd 100644 --- a/test/album_completeness_query_test.dart +++ b/test/album_completeness_query_test.dart @@ -342,9 +342,10 @@ void main() { await tester.pump(const Duration(milliseconds: 500)); expect(find.text('Shell navigation').hitTestable(), findsNothing); final sortSheet = find.byType(AppBottomSheet); - final sheetHeight = tester.getSize(sortSheet).height; - expect(sheetHeight, lessThan(915 * 0.85)); - expect(find.text('Genre (Z-A)').hitTestable(), findsOneWidget); + // Every sort no longer fits a phone: the sheet stops at its cap and + // scrolls, leaving the screen above it visible. + expect(tester.getSize(sortSheet).height, closeTo(915 * 0.85, 1)); + expect(find.text('Latest').hitTestable(), findsWidgets); final sheetScroll = find.descendant( of: sortSheet, matching: find.byType(SingleChildScrollView), @@ -367,7 +368,6 @@ void main() { await tester.pump(); await tester.pump(const Duration(milliseconds: 400)); expect(tester.getSize(sortSheet).height, closeTo(915 * 0.85, 1)); - expect(tester.getSize(sortSheet).height, greaterThan(sheetHeight)); await tester.drag(sheetScroll, const Offset(0, -200)); await tester.pump(); await tester.pump(const Duration(milliseconds: 500));