From d578fe96bcf425144832a23d6aff7dfc32a7677a Mon Sep 17 00:00:00 2001 From: Levi Date: Sun, 13 Sep 2026 15:39:04 +0800 Subject: [PATCH] test(ui): cover minimum extension card width --- ui/flutter/test/widget_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/flutter/test/widget_test.dart b/ui/flutter/test/widget_test.dart index 3b49b4b6..3a6c087c 100644 --- a/ui/flutter/test/widget_test.dart +++ b/ui/flutter/test/widget_test.dart @@ -542,7 +542,7 @@ void main() { }); testWidgets('extension cards compact large counts without crowding their actions', (WidgetTester tester) async { - await _setTestSize(tester, const Size(750, 608)); + await _setTestSize(tester, const Size(722, 608)); await tester.pumpWidget( ProviderScope( overrides: [extensionsControllerProvider.overrideWith(CrowdedExtensionCardController.new)], @@ -560,6 +560,7 @@ void main() { final cardRect = tester.getRect(find.byKey(const ValueKey('extension-card-crowded-extension'))); final statsRect = tester.getRect(find.byKey(const ValueKey('extension-card-stats-crowded-extension'))); final actionsRect = tester.getRect(find.byKey(const ValueKey('extension-card-actions-crowded-extension'))); + expect(cardRect.width, closeTo(290, 0.01)); expect(statsRect.right, lessThanOrEqualTo(actionsRect.left - 8)); expect(actionsRect.right, lessThanOrEqualTo(cardRect.right - 14)); expect(tester.takeException(), isNull);