File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -92,9 +92,16 @@ void main() {
92
92
93
93
TestZulipBinding .ensureInitialized ();
94
94
95
- Future <void > prepareContentBare (WidgetTester tester, String html) async {
95
+ Future <void > prepareContentBare (WidgetTester tester, String html, {
96
+ bool wrapWithPerAccountStoreWidget = false ,
97
+ }) async {
96
98
Widget widget = BlockContentList (nodes: parseContent (html).nodes);
97
99
100
+ if (wrapWithPerAccountStoreWidget) {
101
+ await testBinding.globalStore.add (eg.selfAccount, eg.initialSnapshot ());
102
+ widget = PerAccountStoreWidget (accountId: eg.selfAccount.id, child: widget);
103
+ }
104
+
98
105
widget = GlobalStoreWidget (child: widget);
99
106
addTearDown (testBinding.reset);
100
107
@@ -106,6 +113,9 @@ void main() {
106
113
supportedLocales: ZulipLocalizations .supportedLocales,
107
114
home: widget)));
108
115
await tester.pump (); // global store
116
+ if (wrapWithPerAccountStoreWidget) {
117
+ await tester.pump ();
118
+ }
109
119
}
110
120
111
121
/// Test that the given content example renders without throwing an exception.
You can’t perform that action at this time.
0 commit comments