File tree Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -46,21 +46,26 @@ void main() {
46
46
}) async {
47
47
final message = eg.streamMessage (reactions: reactions);
48
48
49
+ final locale = switch (textDirection) {
50
+ TextDirection .ltr => const Locale ('en' ),
51
+ TextDirection .rtl => const Locale ('ar' ),
52
+ };
53
+ tester.platformDispatcher.localeTestValue = locale;
54
+ tester.platformDispatcher.localesTestValue = [locale];
55
+ addTearDown (tester.platformDispatcher.clearLocaleTestValue);
56
+ addTearDown (tester.platformDispatcher.clearLocalesTestValue);
57
+
49
58
await tester.pumpWidget (TestZulipApp (accountId: eg.selfAccount.id,
50
- child: Directionality (
51
- textDirection: textDirection,
52
- child: Center (
53
- child: ColoredBox (
54
- color: Colors .white,
55
- child: SizedBox (
56
- width: width,
57
- child: ReactionChipsList (
58
- messageId: message.id,
59
- reactions: message.reactions! ,
60
- )))))));
61
-
62
- // global store, per-account store
63
- await tester.pumpAndSettle ();
59
+ child: Center (
60
+ child: ColoredBox (
61
+ color: Colors .white,
62
+ child: SizedBox (
63
+ width: width,
64
+ child: ReactionChipsList (
65
+ messageId: message.id,
66
+ reactions: message.reactions! ,
67
+ ))))));
68
+ await tester.pumpAndSettle (); // global store, per-account store
64
69
65
70
final reactionChipsList = tester.element (find.byType (ReactionChipsList ));
66
71
check (Directionality .of (reactionChipsList)).equals (textDirection);
You can’t perform that action at this time.
0 commit comments