Submit customer identity proofs and show reviewed limits
This commit is contained in:
1 parent
7bf8b8087a
commit
1354551ae8
50 files changed
+1777
-67
No files matched your search
@@ -67,6 +67,10 @@ void main() {
|
||||
|
||||
Future<void> submit(WidgetTester t) async {
|
||||
await tap(t, find.byKey(const ValueKey('kyc-start')));
|
||||
await t.enterText(find.byKey(const ValueKey('kyc-name')), 'Example Person');
|
||||
await t.enterText(find.byKey(const ValueKey('kyc-birth')), '1990-04-23');
|
||||
await t.enterText(find.byKey(const ValueKey('kyc-country')), 'PL');
|
||||
await t.pumpAndSettle();
|
||||
await tap(t, find.byKey(const ValueKey('pick-passport')));
|
||||
await tap(t, find.byKey(const ValueKey('kyc-next')));
|
||||
await tap(t, find.byKey(const ValueKey('pick-selfie')));
|
||||
@@ -100,6 +104,25 @@ void main() {
|
||||
await tap(t, find.text('Contact support'));
|
||||
expect(find.byType(AlertDialog), findsOneWidget);
|
||||
});
|
||||
testWidgets('optional onboarding can be skipped before collecting proofs', (
|
||||
t,
|
||||
) async {
|
||||
t.platformDispatcher.defaultRouteNameTestValue = '/identity?onboarding=1';
|
||||
addTearDown(t.platformDispatcher.clearDefaultRouteNameTestValue);
|
||||
await t.pumpWidget(
|
||||
SxchngeApp(
|
||||
identityService: DummyIdentityService(delay: Duration.zero),
|
||||
photoService: Photos(bytes),
|
||||
),
|
||||
);
|
||||
await t.pumpAndSettle();
|
||||
final router = GoRouter.of(
|
||||
t.element(find.byKey(const ValueKey('kyc-start'))),
|
||||
);
|
||||
await tap(t, find.text('Keep basic limits'));
|
||||
expect(router.routeInformationProvider.value.uri.path, '/accounts');
|
||||
expect(find.byType(AlertDialog), findsNothing);
|
||||
});
|
||||
testWidgets('correctable rejection can be resubmitted', (t) async {
|
||||
await open(t);
|
||||
await submit(t);
|
||||
|
||||
Reference in new issue
Block a user