From 51c1e69e23032d940217ecac24f2bc10ed8938b5 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Tue, 21 Nov 2023 15:01:06 +0100 Subject: [PATCH] test: Fix size of virtual window in test --- packages/app_center/test/test_utils.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/app_center/test/test_utils.dart b/packages/app_center/test/test_utils.dart index 980a71e55..78584c80c 100644 --- a/packages/app_center/test/test_utils.dart +++ b/packages/app_center/test/test_utils.dart @@ -27,7 +27,9 @@ extension WidgetTesterX on WidgetTester { BuildContext get context => element(find.byType(Scaffold).first); AppLocalizations get l10n => AppLocalizations.of(context); Future pumpApp(WidgetBuilder builder) async { - view.physicalSize = view.physicalSize * 5; + // The intended minimum size of the window. + view.physicalSize = + (Size(800, 600) + Offset(54, 54)) * view.devicePixelRatio; final ubuntuRegular = File('test/fonts/Ubuntu-Regular.ttf'); final content = ByteData.view( Uint8List.fromList(ubuntuRegular.readAsBytesSync()).buffer);