Skip to content

Commit 4ba596f

Browse files
committed
text test [nfc]: Move text-scale-factors constant here
As Greg suggests: #629 (comment)
1 parent 42a0c05 commit 4ba596f

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

test/widgets/emoji_reaction_test.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import '../example_data.dart' as eg;
1616
import '../model/binding.dart';
1717
import '../model/test_store.dart';
1818
import '../test_images.dart';
19+
import 'text_test.dart';
1920

2021
void main() {
2122
TestZulipBinding.ensureInitialized();
@@ -36,14 +37,6 @@ void main() {
3637
await fontLoader.load();
3738
}
3839

39-
// From trying the options on an iPhone 13 Pro running iOS 16.6.1:
40-
const textScaleFactors = <double>[
41-
0.8235, // smallest
42-
1,
43-
1.3529, // largest without using the "Larger Accessibility Sizes" setting
44-
3.1176, // largest
45-
];
46-
4740
Future<void> setupChipsInBox(WidgetTester tester, {
4841
required List<Reaction> reactions,
4942
double? width,
@@ -76,7 +69,7 @@ void main() {
7669
for (final displayEmojiReactionUsers in [true, false]) {
7770
for (final emojiset in [Emojiset.text, Emojiset.google]) {
7871
for (final textDirection in TextDirection.values) {
79-
for (final textScaleFactor in textScaleFactors) {
72+
for (final textScaleFactor in kTextScaleFactors) {
8073
Future<void> runSmokeTest(
8174
String description,
8275
List<Reaction> reactions, {

test/widgets/text_test.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ import 'package:zulip/widgets/text.dart';
66

77
import '../flutter_checks.dart';
88

9+
// From trying the options on an iPhone 13 Pro running iOS 16.6.1:
10+
const kTextScaleFactors = <double>[
11+
0.8235, // smallest
12+
1,
13+
1.3529, // largest without using the "Larger Accessibility Sizes" setting
14+
3.1176, // largest
15+
];
16+
917
void main() {
1018
group('zulipTypography', () {
1119
Future<Typography> getZulipTypography(WidgetTester tester, {

0 commit comments

Comments
 (0)