From ae476b25b6b7997c78a15af56e919b960a1587a3 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Tue, 16 Jul 2024 12:23:49 -0700 Subject: [PATCH] emoji_reaction test: Add another convenient test-setup check --- test/flutter_checks.dart | 5 +++++ test/widgets/emoji_reaction_test.dart | 2 ++ 2 files changed, 7 insertions(+) diff --git a/test/flutter_checks.dart b/test/flutter_checks.dart index af66b031a5..b3b6b88980 100644 --- a/test/flutter_checks.dart +++ b/test/flutter_checks.dart @@ -121,3 +121,8 @@ extension ElementChecks on Subject { Subject get size => has((t) => t.size, 'size'); // TODO more } + +extension MediaQueryDataChecks on Subject { + Subject get textScaler => has((x) => x.textScaler, 'textScaler'); + // TODO more +} diff --git a/test/widgets/emoji_reaction_test.dart b/test/widgets/emoji_reaction_test.dart index 6b78de6b4c..f8af9d0d7b 100644 --- a/test/widgets/emoji_reaction_test.dart +++ b/test/widgets/emoji_reaction_test.dart @@ -127,6 +127,8 @@ void main() { await setupChipsInBox(tester, reactions: reactions); final reactionChipsList = tester.element(find.byType(ReactionChipsList)); + check(MediaQuery.of(reactionChipsList)) + .textScaler.equals(TextScaler.linear(textScaleFactor)); check(Directionality.of(reactionChipsList)).equals(textDirection); // TODO(upstream) Do these in an addTearDown, once we can: