Skip to content

Commit

Permalink
chore: remove react-native-config (#1555)
Browse files Browse the repository at this point in the history
* remove react-native-config

* fix failing e2e ios tests

* fix 4242 selection
  • Loading branch information
charliecruzan-stripe authored Nov 6, 2023
1 parent dec876a commit 7ba5ecd
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 36 deletions.
9 changes: 6 additions & 3 deletions e2e-tests/customersheet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ appId: ${APP_ID}
text: "MM / YY"
optional: true
- inputText: "0125123"
- tapOn:
text: "Done"
optional: true
- tapOn: "Save"
- tapOn: "Confirm"
- assertVisible:
text: "····4242"
- tapOn: "····4242"
text: .*4242
- tapOn: .*4242
- tapOn: "Close"
- assertVisible:
text: "Canceled"
- tapOn: "OK"
- tapOn:
id: "customer_adapter_switch"
- tapOn: "····4242"
- tapOn: .*4242
- extendedWaitUntil:
visible: "TEST MODE"
timeout: 150000
6 changes: 3 additions & 3 deletions e2e-tests/ios-only/financial-connections-session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ appId: ${APP_ID}
- tapOn: "Enter account details manually instead"
- tapOn: "123456789"
- inputText: "110000000"
- hideKeyboard
- tapOn: "Enter bank account details"
- tapOn:
text: "000123456789"
index: 0
- inputText: "000123456789"
- hideKeyboard
- tapOn: "Enter bank account details"
- tapOn:
text: "000123456789"
index: 1
- inputText: "000123456789"
- hideKeyboard
- tapOn: "Please enter a checking account."
- tapOn: "Continue"
- assertVisible:
text: "Success"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ appId: ${APP_ID}
- tapOn: "Manually verify instead"
- tapOn: "123456789"
- inputText: "110000000"
- hideKeyboard
- tapOn: "Your bank information will be verified with micro-deposits to your account."
- tapOn:
text: "000123456789"
index: 0
- inputText: "000123456789"
- hideKeyboard
- tapOn: "Your bank information will be verified with micro-deposits to your account."
- tapOn:
text: "000123456789"
index: 1
- inputText: "000123456789"
- hideKeyboard
- tapOn: "Please enter a checking account."
- tapOn: "Continue"
- tapOn: "Done"
- assertVisible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ appId: ${APP_ID}
- tapOn: "Manually verify instead"
- tapOn: "123456789"
- inputText: "110000000"
- hideKeyboard
- tapOn: "Your bank information will be verified with micro-deposits to your account."
- tapOn:
text: "000123456789"
index: 0
- inputText: "000123456789"
- hideKeyboard
- tapOn: "Your bank information will be verified with micro-deposits to your account."
- tapOn:
text: "000123456789"
index: 1
- inputText: "000123456789"
- hideKeyboard
- tapOn: "Please enter a checking account."
- tapOn: "Continue"
- tapOn: "Done"
- assertVisible:
Expand Down
1 change: 0 additions & 1 deletion example/.env.ci

This file was deleted.

1 change: 0 additions & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
Expand Down
14 changes: 3 additions & 11 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,6 @@ PODS:
- React-jsinspector (0.69.9)
- React-logger (0.69.9):
- glog
- react-native-config (1.4.11):
- react-native-config/App (= 1.4.11)
- react-native-config/App (1.4.11):
- React-Core
- react-native-safe-area-context (4.4.1):
- RCT-Folly
- RCTRequired
Expand Down Expand Up @@ -374,15 +370,15 @@ PODS:
- StripePayments (= 23.18.0)
- StripePaymentsUI (= 23.18.0)
- StripeUICore (= 23.18.0)
- stripe-react-native (0.34.0):
- stripe-react-native (0.35.0):
- React-Core
- Stripe (~> 23.18.0)
- StripeApplePay (~> 23.18.0)
- StripeFinancialConnections (~> 23.18.0)
- StripePayments (~> 23.18.0)
- StripePaymentSheet (~> 23.18.0)
- StripePaymentsUI (~> 23.18.0)
- stripe-react-native/Tests (0.34.0):
- stripe-react-native/Tests (0.35.0):
- React-Core
- Stripe (~> 23.18.0)
- StripeApplePay (~> 23.18.0)
Expand Down Expand Up @@ -460,7 +456,6 @@ DEPENDENCIES:
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- react-native-config (from `../node_modules/react-native-config`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
Expand Down Expand Up @@ -546,8 +541,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsinspector"
React-logger:
:path: "../node_modules/react-native/ReactCommon/logger"
react-native-config:
:path: "../node_modules/react-native-config"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
React-perflogger:
Expand Down Expand Up @@ -618,7 +611,6 @@ SPEC CHECKSUMS:
React-jsiexecutor: 3b506d7fc50275bf44f8fd5624f23eaedd78bf78
React-jsinspector: 5b92a5a30e02e1a21802f293cc71e05d887c7378
React-logger: 96d904c5bc87c2660d48e6a36fb2edf65f9cfb11
react-native-config: bcafda5b4c51491ee1b0e1d0c4e3905bc7b56c1b
react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a
React-perflogger: f6f4b3c63629ead2e8a5a22eaedd06368c31617a
React-RCTActionSheet: 5e95058e99c53313d778d96b7f37697ce3a9418e
Expand All @@ -637,7 +629,7 @@ SPEC CHECKSUMS:
RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
Stripe: 4092bc51f41ca1758166aef921aa0dd2f0fbc639
stripe-react-native: 8607258ea7b0e77534840f5c898ccb70cd8900be
stripe-react-native: 2e2dad1734c1c2b71564b66bae4395bfd8419af4
StripeApplePay: aedbcb53f5324d527a52a5888bd0eeee25b3ca36
StripeCore: f86db23fb3f984808e6f5d3876397b953bf58a52
StripeFinancialConnections: 0aaddb3593a7cc76b5f01eab185f16ef60798b15
Expand Down
1 change: 0 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@react-navigation/native-stack": "^6.6.1",
"react": "18.0.0",
"react-native": "0.69.9",
"react-native-config": "^1.4.5",
"react-native-safe-area-context": "^4.2.4",
"react-native-screens": "^3.13.1"
},
Expand Down
7 changes: 4 additions & 3 deletions example/src/Config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Platform } from 'react-native';
import ENV from 'react-native-config';

// Address to stripe server running on local machine
export const LOCAL_URL =
const LOCAL_URL =
Platform.OS === 'android' ? 'http://10.0.2.2:4242' : 'http://localhost:4242';
// Address to stripe server running on Glitch
const GLITCH_URL = 'https://rigorous-heartbreaking-cephalopod.glitch.me';

export const API_URL = ENV.API_URL ? ENV.API_URL : LOCAL_URL;
export const API_URL = __DEV__ ? LOCAL_URL : GLITCH_URL;
5 changes: 0 additions & 5 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3935,11 +3935,6 @@ react-native-codegen@^0.69.2:
jscodeshift "^0.13.1"
nullthrows "^1.1.1"

react-native-config@^1.4.5:
version "1.4.11"
resolved "https://registry.yarnpkg.com/react-native-config/-/react-native-config-1.4.11.tgz#f9ea08a8dffbe3fd4f2187d80d2594756526dee8"
integrity sha512-PdBFnfR3pljUNrJu4B2wiJ9TbAiz1J1WcG5KP8AFBqZi8ve5MV/CTCDnANaGrqhOxkBDJV73D/SrMENHe7TKBg==

react-native-gradle-plugin@^0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.7.tgz#96602f909745239deab7b589443f14fce5da2056"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"bootstrap": "yarn example && yarn && yarn pods",
"bootstrap-no-pods": "yarn example && yarn",
"docs": "yarn typedoc ./src/index.tsx --out ./docs/api-reference --tsconfig ./tsconfig.json --readme none --sort source-order",
"run-example-ios": "cd example;ENVFILE=.env.ci react-native run-ios --configuration Release --simulator \"iPhone 13 (15.2)\"",
"run-example-android": "cd example;ENVFILE=.env.ci react-native run-android --variant=release",
"run-example-ios": "cd example;react-native run-ios --configuration Release --simulator \"iPhone 15\"",
"run-example-android": "cd example;react-native run-android --variant=release",
"test:e2e:ios": "bash ./scripts/run-maestro-tests ios",
"test:e2e:android": "bash ./scripts/run-maestro-tests android",
"test:unit:ios": "xcodebuild test -workspace example/ios/StripeSdkExample.xcworkspace -destination 'platform=iOS Simulator,name=iPhone 13' -scheme UnitTests",
Expand Down

0 comments on commit 7ba5ecd

Please sign in to comment.