@@ -70,12 +70,12 @@ void main() {
70
70
return const SizedBox .shrink ();
71
71
})));
72
72
// First, shows a loading page instead of child.
73
- check (find.byType (CircularProgressIndicator )).findsOne ();
73
+ check (find.byType (BlankLoadingPlaceholder )).findsOne ();
74
74
check (globalStore).isNull ();
75
75
76
76
await tester.pump ();
77
77
// Then after loading, mounts child instead, with provided store.
78
- check (find.byType (CircularProgressIndicator )).findsNothing ();
78
+ check (find.byType (BlankLoadingPlaceholder )).findsNothing ();
79
79
check (globalStore).identicalTo (testBinding.globalStore);
80
80
81
81
await testBinding.globalStore.add (eg.selfAccount, eg.initialSnapshot ());
@@ -98,14 +98,15 @@ void main() {
98
98
await tester.pump ();
99
99
// Even after the store must have loaded,
100
100
// still shows loading page while blockingFuture is pending.
101
- check (find.byType (CircularProgressIndicator )).findsOne ();
101
+ check (find.byType (BlankLoadingPlaceholder )).findsOne ();
102
102
check (find.text ('done' )).findsNothing ();
103
103
104
104
// Once blockingFuture completes…
105
105
completer.complete ();
106
106
await tester.pump ();
107
+ await tester.pump (); // TODO why does GlobalStoreWidget need this extra frame?
107
108
// … mounts child instead of the loading page.
108
- check (find.byType (CircularProgressIndicator )).findsNothing ();
109
+ check (find.byType (BlankLoadingPlaceholder )).findsNothing ();
109
110
check (find.text ('done' )).findsOne ();
110
111
});
111
112
@@ -123,14 +124,15 @@ void main() {
123
124
await tester.pump ();
124
125
// Even after the store must have loaded,
125
126
// still shows loading page while blockingFuture is pending.
126
- check (find.byType (CircularProgressIndicator )).findsOne ();
127
+ check (find.byType (BlankLoadingPlaceholder )).findsOne ();
127
128
check (find.text ('done' )).findsNothing ();
128
129
129
130
// Once blockingFuture completes, even with an error…
130
131
completer.completeError (Exception ('oops' ));
131
132
await tester.pump ();
133
+ await tester.pump (); // TODO why does GlobalStoreWidget need this extra frame?
132
134
// … mounts child instead of the loading page.
133
- check (find.byType (CircularProgressIndicator )).findsNothing ();
135
+ check (find.byType (BlankLoadingPlaceholder )).findsNothing ();
134
136
check (find.text ('done' )).findsOne ();
135
137
});
136
138
0 commit comments