Merge branch 'spike/block2-derisking'
This commit is contained in:
commit
0e9b1045a6
1 changed files with 9 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ class FakeOfferTransport implements OfferTransport {
|
|||
for (final o in offers) {
|
||||
if (o.approxGeohash.startsWith(query.geohashPrefix)) c.add(o);
|
||||
}
|
||||
unawaited(c.close()); // finite: deliver buffered matches, then done
|
||||
return c.stream;
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +92,10 @@ void main() {
|
|||
]));
|
||||
await tester.pumpWidget(_wrapBody(cubit, selfPubkey: me));
|
||||
await cubit.discover('sp3');
|
||||
await tester.pumpAndSettle();
|
||||
// Pump a couple of frames (NOT pumpAndSettle — the brief "searching" spinner
|
||||
// never settles). The buffered offers deliver on a microtask.
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('You'), findsOneWidget);
|
||||
// My own listing offers no "Message yourself" button.
|
||||
|
|
@ -108,7 +112,10 @@ void main() {
|
|||
|
||||
await tester.pumpWidget(_wrapBody(cubit));
|
||||
await cubit.discover('sp3');
|
||||
await tester.pumpAndSettle();
|
||||
// Pump a couple of frames (NOT pumpAndSettle — the brief "searching" spinner
|
||||
// never settles). The buffered offers deliver on a microtask.
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('Tomate rosa de Barbastro'), findsOneWidget);
|
||||
expect(find.text('Judía del ganxet'), findsOneWidget);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue