From 3a6d66158771013c5e7c27392a715ee7d43249cc Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Fri, 30 Jun 2023 10:56:16 +0200 Subject: [PATCH] Update basic_test.dart for M3 compliance (#129714) ## Description This PR fixes two test failures in `basic_test.dart` which surfaced when switching to M3 (see https://github.com/flutter/flutter/pull/127501) Those failures are related to M3 typography which sets line height to 1.43. Forcing line height to 1.0 seems reasonable for these particular tests. With this change these two test are successful for both M2 and M3. ## Related Issue fixes https://github.com/flutter/flutter/issues/129713 ## Tests Updates 2 tests. --- packages/flutter/test/widgets/basic_test.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/flutter/test/widgets/basic_test.dart b/packages/flutter/test/widgets/basic_test.dart index fc96b78db4..5fb6bc82ef 100644 --- a/packages/flutter/test/widgets/basic_test.dart +++ b/packages/flutter/test/widgets/basic_test.dart @@ -471,11 +471,11 @@ void main() { children: [ Text('big text', key: key1, - style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1), + style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1, height: 1.0), ), Text('one\ntwo\nthree\nfour\nfive\nsix\nseven', key: key2, - style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2), + style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2, height: 1.0), ), ], ), @@ -526,11 +526,11 @@ void main() { children: [ Text('big text', key: key1, - style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1), + style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1, height: 1.0), ), Text('one\ntwo\nthree\nfour\nfive\nsix\nseven', key: key2, - style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2), + style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2, height: 1.0), ), const FlutterLogo(size: 250), ],