Skip to content

Commit

Permalink
Merge pull request #7315 from LedgerHQ/support/qaa_136_detox_firebase…
Browse files Browse the repository at this point in the history
…_testing

[QAA-136][Detox] Change firebase environment to testing
  • Loading branch information
ypolishchuk-ledger authored Jul 15, 2024
2 parents 1241c41 + a57cf0c commit 9480200
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 4 deletions.
1 change: 1 addition & 0 deletions apps/ledger-live-mobile/.env.mock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ APP_NAME="LLmock"
MOCK=1
MOCK_COUNTERVALUES=1
DISABLE_YELLOW_BOX=1
GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Testing"
MOCK_SCAN_RECIPIENT=bitcoin:3HX3Q4wgYi8nKakxv7kmdCgLWJFrFgcqEt?amount=0.001
FORCE_DEBUG_VISIBLE=1
ADJUST_APP_TOKEN=cbxft2ch7wn4
Expand Down
6 changes: 6 additions & 0 deletions apps/ledger-live-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ project.ext.envConfigFiles = [
debug: ".env",
release: ".env.android.release",
stagingrelease: ".env.android.staging",
detox: ".env.mock",
]

apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
Expand Down Expand Up @@ -184,6 +185,11 @@ android {
signingConfig signingConfigs.stagingRelease
matchingFallbacks = ['release']
}
detox {
initWith(buildTypes.stagingRelease)
applicationIdSuffix ".detox"
matchingFallbacks = ['stagingRelease', 'release']
}
}
}

Expand Down
39 changes: 39 additions & 0 deletions apps/ledger-live-mobile/android/app/src/detox/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"project_info": {
"project_number": "677185650562",
"project_id": "ledger-live-testing",
"storage_bucket": "ledger-live-testing.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:677185650562:android:dadc730f54ee1f7b1c199b",
"android_client_info": {
"package_name": "com.ledger.live.detox"
}
},
"oauth_client": [
{
"client_id": "677185650562-g7mkiri825e0sg7vutbmedbk5dkil2ab.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBjp1KOOY6_iHsJegtqIqKqLexeQwNydOw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "677185650562-g7mkiri825e0sg7vutbmedbk5dkil2ab.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
7 changes: 3 additions & 4 deletions apps/ledger-live-mobile/detox.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ module.exports = {
"android.release": {
type: "android.apk",
build:
"cd android && ENVFILE=.env.mock ./gradlew app:assembleStagingRelease app:assembleAndroidTest -DtestBuildType=stagingRelease && cd ..",
binaryPath: `android/app/build/outputs/apk/stagingRelease/app-${androidArch}-stagingRelease.apk`,
testBinaryPath:
"android/app/build/outputs/apk/androidTest/stagingRelease/app-stagingRelease-androidTest.apk",
"cd android && ENVFILE=.env.mock ./gradlew app:assembleDetox app:assembleAndroidTest -DtestBuildType=detox && cd ..",
binaryPath: `android/app/build/outputs/apk/detox/app-${androidArch}-detox.apk`,
testBinaryPath: "android/app/build/outputs/apk/androidTest/detox/app-detox-androidTest.apk",
},
},
devices: {
Expand Down
34 changes: 34 additions & 0 deletions apps/ledger-live-mobile/ios/GoogleService-Info-Testing.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>677185650562-aojaanc5siijn2idn898h3vpd4n4cvqc.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.677185650562-aojaanc5siijn2idn898h3vpd4n4cvqc</string>
<key>API_KEY</key>
<string>AIzaSyC9qHOYvQPDXx1d8vWO1r3ke2-G6HqMmhg</string>
<key>GCM_SENDER_ID</key>
<string>677185650562</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>ledgerlivemobile</string>
<key>PROJECT_ID</key>
<string>ledger-live-testing</string>
<key>STORAGE_BUCKET</key>
<string>ledger-live-testing.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:677185650562:ios:adc70105b316c88a1c199b</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
17F58472269C64670070C475 /* RCTBluetoothHelperModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 17F58471269C64670070C475 /* RCTBluetoothHelperModule.m */; };
2372D3D5180104DBED4E22EE /* libPods-ledgerlivemobile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31C4672E151A9F9D4A18DB00 /* libPods-ledgerlivemobile.a */; };
2A2FAB56B85E5D2BFF574A32 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09BC9C5402323A57C5327727 /* ExpoModulesProvider.swift */; };
2EA091AF2C3FBD5900B6181E /* GoogleService-Info-Testing.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2EA091AE2C3FBD5900B6181E /* GoogleService-Info-Testing.plist */; };
3407D5D9215D2AB800C9D40B /* NeededForBLE.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3407D5D8215D2AB800C9D40B /* NeededForBLE.swift */; };
515E9C2C8C0049EC992210D9 /* Inter-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3B6982A2E67F482A8069215B /* Inter-Medium.otf */; };
AD6EE26071FA4673B5C89936 /* FontAwesome5_Pro_Brands.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4BD106EA37CA467F9525D699 /* FontAwesome5_Pro_Brands.ttf */; };
Expand Down Expand Up @@ -54,6 +55,7 @@
2402D074219C2E6600276138 /* ledgerlivemobile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = ledgerlivemobile.entitlements; path = ledgerlivemobile/ledgerlivemobile.entitlements; sourceTree = "<group>"; };
2433F86A66DB455E803650A5 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; };
2B8A443FFF9942B295210CA2 /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; };
2EA091AE2C3FBD5900B6181E /* GoogleService-Info-Testing.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info-Testing.plist"; sourceTree = "<group>"; };
31C4672E151A9F9D4A18DB00 /* libPods-ledgerlivemobile.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ledgerlivemobile.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3263CCC7104E4B86AC2ADDB4 /* MuseoSans-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "MuseoSans-Regular.otf"; path = "../assets/fonts/MuseoSans-Regular.otf"; sourceTree = "<group>"; };
3407D5D7215D2AB800C9D40B /* ledgerlivemobile-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ledgerlivemobile-Bridging-Header.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -251,6 +253,7 @@
BAE7948F27D7C46A00C465F5 /* GoogleService-Info.plist */,
BA451DE627CE516700AAB209 /* GoogleService-Info-Production.plist */,
BA451DE727CE516700AAB209 /* GoogleService-Info-Staging.plist */,
2EA091AE2C3FBD5900B6181E /* GoogleService-Info-Testing.plist */,
13B07FAE1A68108700A75B9A /* ledgerlivemobile */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* ledgerlivemobileTests */,
Expand Down Expand Up @@ -391,6 +394,7 @@
B116B48438CB416C980DD0E7 /* Inter-SemiBold.otf in Resources */,
AD6EE26071FA4673B5C89936 /* FontAwesome5_Pro_Brands.ttf in Resources */,
F99BEAC629E8441C83104922 /* FontAwesome5_Pro_Light.ttf in Resources */,
2EA091AF2C3FBD5900B6181E /* GoogleService-Info-Testing.plist in Resources */,
E85A22C62B17E835005A8E6D /* LaunchScreen.storyboard in Resources */,
AD7A77B84DF3487C812B091B /* FontAwesome5_Pro_Regular.ttf in Resources */,
BA451DE927CE516700AAB209 /* GoogleService-Info-Production.plist in Resources */,
Expand Down

0 comments on commit 9480200

Please sign in to comment.