Files
5960453fe0 feat(mobile): implement forced app update via Remote Config (#7299)
* feat(mobile): implement forced app update via Firebase Remote Config

Add version gating on cold start using Firebase Remote Config with
per-platform keys (min_required_version_ios/android, recommended_version_ios/android).
Force update shows a blocking full-screen, soft update shows a dismissable bottom sheet.
Fail-open design ensures the app never locks users out on fetch failure.

* fix(mobile): codescene

* fix(mobile): address PR review comments

- Fix misleading comment in soft-update E2E test to match assertion
- Add caret prefix to @react-native-firebase/remote-config for consistency

* fix(mobile): package.json deps

* fix(mobile): guard navigation effects until app update check completes

Prevent useInitialNavigationScreen from calling router.replace() while
the Stack navigator is unmounted (isLoading=true). Also remove unused
setE2eRemoteConfigScenario dead code and fix inaccurate E2E comment.

fix(mobile): switch to const

fix(mobile): pin firebase packages to exact 23.3.1

Yarn hardened mode (enabled on public PRs) re-resolves ^23.3.1 to
23.8.6 causing lockfile mismatch with --immutable. Pinning to exact
versions ensures consistent resolution across local and CI.

fix(mobile): remove unreachable E2E mock scenarios

Simplify remoteConfigService.e2e.ts by removing the Scenario type and
unused force_update/soft_update entries that became dead code after
setE2eRemoteConfigScenario was removed.

fix(mobile): dependencies

fix(mobile): address PR review - dead code and soft update check

- Decouple soft update check from min version validation so an invalid
  min_required_version doesn't silently suppress the soft update prompt
- Remove unused AppUpdateEvent type export
- Remove unused isInitialized getter from both remoteConfigService files

fix(mobile): broken navigation

for some unknown reason the isLoading block was preventing the “get started” button on the onboarding screen from working. I know it is wild, but no idea what is going so reverting this change for now.

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-03-03 17:49:19 +01:00

64 lines
1.5 KiB
YAML

appId: ${APP_ID}
tags:
- app-update
- smoke
---
# Soft Update Prompt E2E Test
# Verifies that when a soft update is recommended, a dismissable
# bottom sheet appears with the correct UI elements.
- runFlow:
file: ../../utils/setup/app-start.yml
# Set up an onboarded account so the app loads normally first
- tapOn:
id: 'e2eOnboardedAccount'
# Wait for the home screen to confirm app loaded normally
- assertVisible:
id: 'home-tab'
# Trigger soft update scenario via hidden test control
- tapOn:
id: 'e2eSoftUpdate'
# ============================================
# Verify Soft Update Prompt
# ============================================
# The bottom sheet should now be visible
- assertVisible:
id: 'soft-update-prompt'
# Verify the heading text
- assertVisible: 'Update available'
# Verify the description text
- assertVisible: '.*Update for the latest features and improvements.*'
# Verify the update button is present
- assertVisible:
id: 'soft-update-button'
# The home tab is not visible while the bottom sheet is displayed
- assertNotVisible:
id: 'home-tab'
# ============================================
# Dismiss the Soft Update Prompt
# ============================================
# Swipe down to dismiss the bottom sheet
- swipe:
id: 'soft-update-prompt'
direction: DOWN
duration: 500
# Verify the bottom sheet is gone
- assertNotVisible:
id: 'soft-update-prompt'
# Verify app is still usable
- assertVisible:
id: 'home-tab'