Skip to content

Commit 2117fe1

Browse files
emoji_reaction test: Use isSystemTextScaler, for Flutter migration
Flutter PR flutter/flutter#159999 (fixing a bug where MediaQuery provides an incorrect TextScaler) breaks this test; fix it with isSystemTextScaler. Co-authored-by: Chris Bobbe <[email protected]>
1 parent cb9a849 commit 2117fe1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/widgets/emoji_reaction_test.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import 'package:flutter_checks/flutter_checks.dart';
99

1010
import 'package:flutter_test/flutter_test.dart';
1111
import 'package:http/http.dart' as http;
12+
import 'package:legacy_checks/legacy_checks.dart';
1213
import 'package:zulip/api/model/events.dart';
1314
import 'package:zulip/api/model/model.dart';
1415
import 'package:zulip/api/route/realm.dart';
@@ -141,8 +142,8 @@ void main() {
141142
await setupChipsInBox(tester, reactions: reactions);
142143

143144
final reactionChipsList = tester.element(find.byType(ReactionChipsList));
144-
check(MediaQuery.of(reactionChipsList))
145-
.textScaler.equals(TextScaler.linear(textScaleFactor));
145+
check(MediaQuery.of(reactionChipsList).textScaler).legacyMatcher(
146+
isSystemTextScaler(withScaleFactor: textScaleFactor));
146147
check(Directionality.of(reactionChipsList)).equals(textDirection);
147148

148149
// TODO(upstream) Do these in an addTearDown, once we can:

0 commit comments

Comments
 (0)