Merge pull request #1602 from selfxyz/release/staging-2026-01-13

Mobile Release 2.9.11
This commit is contained in:
Justin Hernandez
2026-01-13 17:08:03 -08:00
committed by GitHub
16 changed files with 1219 additions and 158 deletions

View File

@@ -36,6 +36,7 @@ jest.mock('@/navigation', () => ({
navigate: jest.fn(),
isReady: jest.fn(() => true),
reset: jest.fn(),
getCurrentRoute: jest.fn(),
},
}));
@@ -66,6 +67,10 @@ describe('deeplinks', () => {
setDeepLinkUserDetails,
});
mockPlatform.OS = 'ios';
// Setup default getCurrentRoute mock to return Splash (cold launch scenario)
const { navigationRef } = require('@/navigation');
navigationRef.getCurrentRoute.mockReturnValue({ name: 'Splash' });
});
describe('handleUrl', () => {
@@ -156,9 +161,10 @@ describe('deeplinks', () => {
const { navigationRef } = require('@/navigation');
// Should navigate to HomeScreen, which will show confirmation modal
// During cold launch (Splash screen), reset is called with full navigation state
expect(navigationRef.reset).toHaveBeenCalledWith({
index: 0,
routes: [{ name: 'Home' }],
index: 1,
routes: [{ name: 'Home' }, { name: 'Home' }],
});
});
@@ -598,7 +604,7 @@ describe('deeplinks', () => {
mockLinking.getInitialURL.mockResolvedValue(undefined as any);
mockLinking.addEventListener.mockReturnValue({ remove });
const cleanup = setupUniversalLinkListenerInNavigation();
const cleanup = setupUniversalLinkListenerInNavigation({} as SelfClient);
expect(mockLinking.addEventListener).toHaveBeenCalled();
cleanup();
expect(remove).toHaveBeenCalled();