Add saved payout destination UX and service contracts (#54)
This commit is contained in:
1 parent
a5689876ff
commit
24af794112
49 files changed
+4687
-62
No files matched your search
@@ -11,6 +11,8 @@ import 'package:sxchnge_wallet/sxchnge_wallet.dart';
|
||||
import 'package:sxchnge_app/main.dart';
|
||||
import 'package:sxchnge_app/providers/locale.dart';
|
||||
|
||||
import 'destination_helpers.dart';
|
||||
|
||||
Future<void> tap(WidgetTester t, Finder f) async {
|
||||
await t.ensureVisible(f);
|
||||
await t.tap(f);
|
||||
@@ -32,6 +34,7 @@ Future<DummyWalletService> open(
|
||||
settlement: settlement,
|
||||
initialLocale: locale,
|
||||
);
|
||||
await seedDestination(service.destinations);
|
||||
await t.pumpWidget(
|
||||
SxchngeApp(
|
||||
identityService: identity,
|
||||
@@ -78,10 +81,7 @@ void main() {
|
||||
expect(find.byKey(const ValueKey('operation-completed')), findsOneWidget);
|
||||
await tap(t, find.text('Pay out').last);
|
||||
await t.enterText(find.byKey(const ValueKey('transfer-amount')), '5');
|
||||
await t.enterText(
|
||||
find.byKey(const ValueKey('transfer-recipient')),
|
||||
'Sample recipient',
|
||||
);
|
||||
await selectPayout(t);
|
||||
await tap(t, find.byKey(const ValueKey('transfer-review')));
|
||||
expect(find.text('Recipient receives'), findsOneWidget);
|
||||
await tap(t, find.byKey(const ValueKey('transfer-confirm')));
|
||||
@@ -101,10 +101,7 @@ void main() {
|
||||
);
|
||||
s.failNextOperation = true;
|
||||
await t.enterText(find.byKey(const ValueKey('transfer-amount')), '10');
|
||||
await t.enterText(
|
||||
find.byKey(const ValueKey('transfer-recipient')),
|
||||
'Sample recipient',
|
||||
);
|
||||
await selectPayout(t);
|
||||
await tap(t, find.byKey(const ValueKey('transfer-review')));
|
||||
await tap(t, find.byKey(const ValueKey('transfer-confirm')));
|
||||
// Settlement is service-owned; refresh after the simulated processing period.
|
||||
|
||||
Reference in new issue
Block a user