mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
Feat/add logo confirmation screen (#1666)
* feat: initial logoConfirmation screen * fix: center text in buttons * fix: ensure biometric logo is not cropped * fix: add spacing to logo confirm screen, consistent padding for buttons * feat: add popup to logo confirmation screen * fix: handle Sumsub cancellation correctly in Other ID flow * feat: add pathway from logo confirmation -> sumsub -> success * feat: add document type pre-selection for Sumsub SDK * feat: add KycFailureScreen for when user clicks on failure notification * feat: add KycConnectionErrorScreen for sumsub_initiation error * refactor: edit RegistrationFallbackScreen for new design Now only to be used for MRZ/NFC scan errors, instead of kyc connection/registration issues. Also updated to newest design for screen from Figma * refactor: update AadhaarUploadErrorScreen for new design * fix: removed unused countryCode variable and useRoute import * fix: Sorted imports (moved kyc after documents/selection imports) fix CI * chore: lint/prettier * fix: CI error * refactor: Split RegistrationFallbackScreen into MRZ/NFC error versions * feat: add link from RegistrationFallbackNFCScreen -> DocumentNFCTrouble Clicking on the question mark now takes user to this screen that can help them diagnose issue * fix: on clicking question mark, dismiss screen returns to correct screen * chore: yarn prettier * test: fix failing test for CI
This commit is contained in:
@@ -86,8 +86,11 @@ describe('navigation', () => {
|
||||
'IDPicker',
|
||||
'IdDetails',
|
||||
'KYCVerified',
|
||||
'KycConnectionError',
|
||||
'KycFailure',
|
||||
'KycSuccess',
|
||||
'Loading',
|
||||
'LogoConfirmation',
|
||||
'ManageDocuments',
|
||||
'MockDataDeepLink',
|
||||
'Modal',
|
||||
@@ -103,7 +106,8 @@ describe('navigation', () => {
|
||||
'QRCodeViewFinder',
|
||||
'RecoverWithPhrase',
|
||||
'Referral',
|
||||
'RegistrationFallback',
|
||||
'RegistrationFallbackMRZ',
|
||||
'RegistrationFallbackNFC',
|
||||
'SaveRecoveryPhrase',
|
||||
'Settings',
|
||||
'ShowRecoveryPhrase',
|
||||
|
||||
@@ -116,7 +116,7 @@ describe('NotificationTrackingProvider', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should not navigate when status is retry', async () => {
|
||||
it('should navigate to CountryPicker when status is retry', async () => {
|
||||
let notificationHandler:
|
||||
| ((message: FirebaseMessagingTypes.RemoteMessage) => void)
|
||||
| null = null;
|
||||
@@ -151,11 +151,10 @@ describe('NotificationTrackingProvider', () => {
|
||||
expect(analytics.trackEvent).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
// Should not navigate for retry status
|
||||
expect(mockNavigationRef.navigate).not.toHaveBeenCalled();
|
||||
expect(mockNavigationRef.navigate).toHaveBeenCalledWith('CountryPicker');
|
||||
});
|
||||
|
||||
it('should not navigate when status is rejected', async () => {
|
||||
it('should navigate to KycFailure when status is rejected', async () => {
|
||||
let notificationHandler:
|
||||
| ((message: FirebaseMessagingTypes.RemoteMessage) => void)
|
||||
| null = null;
|
||||
@@ -190,8 +189,9 @@ describe('NotificationTrackingProvider', () => {
|
||||
expect(analytics.trackEvent).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
// Should not navigate for rejected status
|
||||
expect(mockNavigationRef.navigate).not.toHaveBeenCalled();
|
||||
expect(mockNavigationRef.navigate).toHaveBeenCalledWith('KycFailure', {
|
||||
canRetry: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle missing notification data gracefully', async () => {
|
||||
@@ -331,7 +331,7 @@ describe('NotificationTrackingProvider', () => {
|
||||
expect(mockNavigationRef.navigate).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not navigate when status is retry on cold start', async () => {
|
||||
it('should navigate to CountryPicker when status is retry on cold start', async () => {
|
||||
mockOnNotificationOpenedApp.mockReturnValue(jest.fn());
|
||||
|
||||
const remoteMessage = {
|
||||
@@ -358,8 +358,7 @@ describe('NotificationTrackingProvider', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// Should not navigate for retry status
|
||||
expect(mockNavigationRef.navigate).not.toHaveBeenCalled();
|
||||
expect(mockNavigationRef.navigate).toHaveBeenCalledWith('CountryPicker');
|
||||
});
|
||||
|
||||
it('should queue navigation when navigationRef is not ready on cold start', async () => {
|
||||
|
||||
Reference in New Issue
Block a user