fix(block2): clearer market states — 'can't reach servers' (retry) vs 'set your area'
Feedback: the market sometimes looked 'disabled'. Now the offline/empty states are distinct and honest: - No working relay (defaults exist, so it's a reachability issue) → 'Can't reach the community servers right now' + a Retry. - Online but no area set → 'Set your area' prompt (you'd otherwise see a bare 'nothing nearby'). - Area set + nothing found → the existing empty state. i18n en/es/pt; offline tests updated; analyzer clean.
This commit is contained in:
parent
5f87ad2d56
commit
cfba85b9d9
9 changed files with 86 additions and 8 deletions
|
|
@ -66,7 +66,7 @@ Widget _wrapMarket(SocialService social, SocialSettings settings,
|
|||
}
|
||||
|
||||
void main() {
|
||||
testWidgets('offline (no transport) shows the "set up sharing" prompt',
|
||||
testWidgets('offline (no transport) shows the "can\'t reach servers" state',
|
||||
(tester) async {
|
||||
final cubit = OffersCubit(null);
|
||||
addTearDown(cubit.close);
|
||||
|
|
@ -74,8 +74,8 @@ void main() {
|
|||
await tester.pumpWidget(_wrapBody(cubit));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text("Sharing isn't set up yet"), findsOneWidget);
|
||||
expect(find.text('Set up sharing'), findsOneWidget);
|
||||
expect(find.textContaining("Can't reach the community servers"),
|
||||
findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('MarketScreen with no relays configured degrades to offline',
|
||||
|
|
@ -88,7 +88,7 @@ void main() {
|
|||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Seeds near you'), findsOneWidget); // app bar title
|
||||
expect(find.text('Set up sharing'), findsOneWidget); // offline prompt
|
||||
expect(find.text('Retry'), findsOneWidget); // can't-reach state offers retry
|
||||
});
|
||||
|
||||
testWidgets('"use my location" fills the area with a coarse geohash',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue