-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
US1762599 - [Android] React Native Demo Components Refactor and Props #87
US1762599 - [Android] React Native Demo Components Refactor and Props #87
Conversation
b6982cd
to
8d5ed6c
Compare
@Test | ||
fun `setRTCFont() should call textSize and typeface on AccessEditText`() { | ||
val fontMap = JavaOnlyMap() | ||
fontMap.putDouble("fontSize", 12.1) | ||
fontMap.putString("fontFamily", "sans-serif") | ||
|
||
val typeface = Typeface.create("sans-serif", Typeface.NORMAL) | ||
|
||
manager.setRTCFont(accessCheckoutEditTextMock, fontMap) | ||
|
||
verify(accessCheckoutEditTextMock).textSize = 12.1F | ||
verify(accessCheckoutEditTextMock).typeface = typeface | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would happen if we were to pass in a random string to fontFamily, a font that does not exist, should we add a test for this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good shout, ill get that added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can see the create method will return the best matching typeface, in this case if the fontFamily we provide does not exist then it will return the default font.
Not sure of a way to test that since we cant access directly the fontFamily
* US1762570: create view manager to native AccessCheckoutEditText component; override onTextChange to support the react native onChangeText event; implement component in react native * US1762550: update card details field to use new component; update RN module to use reference to AccessCheckoutEditText and not the text value * US1762550: move AccessCheckoutEditTextManager to correct file path; update local android sdk files to most up-to-date version of master; update AccessCheckoutReactPackageTest * US1782181: add unit tests for AccessCheckoutEditTextManagerTest; add mockito to build.gradle for unit tests * US1762551: Expose AccessCheckoutUITextField to be able to use native components via the ios Bridge Simplify ReactNativeViewLocator and implement/expose specific POC methods to avoid disruptions with previous implementation Add POC toggle to demo app to be able to switch implementations Expose new POC validation and sessionGeneration methods to avoid diruptions with previous implementations * US1762551: Point client to npe environment * US1762585: Refactor ios Bridge and demo application Avoids having to handle inputs in states Uses native components Only a input field id is needed in order to configure validation and session generation for a field Integrate the latest AccessCheckoutUITextField changes Updates and renames cvcValue to cvcId Updates and renames panValue to panId Updates and renames expiryDateValue to expiryDateId * US1762585: Rebuild lib and clean up files * US1762585: Minor cleanup * US1762585: Rebuild lib files Rename AccessCheckoutEditText to AccessCheckoutInputText as EditText was specific to Android Minor renaming of fields like panUITextField to panACUITextField to improve readability and make it known that we are dealing with AccessCheckoutUITextField in the iOS bridge * US1762585: Rename AccessCheckoutEditText to AccessCheckoutInputText in Android bridge * US1762585: Rename AccessCheckoutInputText to AccessCheckoutTextInput Rebuild lib files * US1762585: Update bitrise-step to use xcode-test v5 and update e2e tests (#82) * US1762585: Update bitrise-step to use xcode-test v5 * US1762585: Use Optionals to mantain compatibility in both Xcode 13 and Xcode 15 * US1762585: Update e2e tests * US1762585: Improve matcher based on platform using type * US1762585: Remove TextInputPO as it is no longer used --------- Co-authored-by: e5661323 <jason.dzelamensah@fisglobal.com>
…color to be parsed correctly from demo-app
066b33d
to
1452e8a
Compare
…#87) * US1762588: Add Support for fonts via styling, minor refactorings * US1762588: Revert pod local version * US1762588: rebuild pod files to point to remote AccessCheckoutSDK * US1782181: change app to display error in a div rather as an alert * US1762599: add support for fontSize, placeholderColor & borderColor * US1762599: update textColor support; add support for font; update unit tests * US1762599: run format task * US1762599: update access-checkout-android 3.0.0 to latest jar * US1762599: add customType to AccessCheckoutTextInputManager to allow color to be parsed correctly from demo-app Co-authored-by: abaeza-wp <153538325+abaeza-wp@users.noreply.github.com> Co-authored-by: Olivier Chalet <olivier.chalet@fisglobal.com>
…#87) * US1762588: Add Support for fonts via styling, minor refactorings * US1762588: Revert pod local version * US1762588: rebuild pod files to point to remote AccessCheckoutSDK * US1782181: change app to display error in a div rather as an alert * US1762599: add support for fontSize, placeholderColor & borderColor * US1762599: update textColor support; add support for font; update unit tests * US1762599: run format task * US1762599: update access-checkout-android 3.0.0 to latest jar * US1762599: add customType to AccessCheckoutTextInputManager to allow color to be parsed correctly from demo-app Co-authored-by: abaeza-wp <153538325+abaeza-wp@users.noreply.github.com> Co-authored-by: Olivier Chalet <olivier.chalet@fisglobal.com>
* Us1762585 - iOS Refactor Native components (#81) * US1762570: create view manager to native AccessCheckoutEditText component; override onTextChange to support the react native onChangeText event; implement component in react native * US1762550: update card details field to use new component; update RN module to use reference to AccessCheckoutEditText and not the text value * US1762550: move AccessCheckoutEditTextManager to correct file path; update local android sdk files to most up-to-date version of master; update AccessCheckoutReactPackageTest * US1782181: add unit tests for AccessCheckoutEditTextManagerTest; add mockito to build.gradle for unit tests * US1762551: Expose AccessCheckoutUITextField to be able to use native components via the ios Bridge Simplify ReactNativeViewLocator and implement/expose specific POC methods to avoid disruptions with previous implementation Add POC toggle to demo app to be able to switch implementations Expose new POC validation and sessionGeneration methods to avoid diruptions with previous implementations * US1762551: Point client to npe environment * US1762585: Refactor ios Bridge and demo application Avoids having to handle inputs in states Uses native components Only a input field id is needed in order to configure validation and session generation for a field Integrate the latest AccessCheckoutUITextField changes Updates and renames cvcValue to cvcId Updates and renames panValue to panId Updates and renames expiryDateValue to expiryDateId * US1762585: Rebuild lib and clean up files * US1762585: Minor cleanup * US1762585: Rebuild lib files Rename AccessCheckoutEditText to AccessCheckoutInputText as EditText was specific to Android Minor renaming of fields like panUITextField to panACUITextField to improve readability and make it known that we are dealing with AccessCheckoutUITextField in the iOS bridge * US1762585: Rename AccessCheckoutEditText to AccessCheckoutInputText in Android bridge * US1762585: Rename AccessCheckoutInputText to AccessCheckoutTextInput Rebuild lib files * US1762585: Update bitrise-step to use xcode-test v5 and update e2e tests (#82) * US1762585: Update bitrise-step to use xcode-test v5 * US1762585: Use Optionals to mantain compatibility in both Xcode 13 and Xcode 15 * US1762585: Update e2e tests * US1762585: Improve matcher based on platform using type * US1762585: Remove TextInputPO as it is no longer used --------- Co-authored-by: e5661323 <jason.dzelamensah@fisglobal.com> * US1782181: change Android bridge GenerateSessionsConfig to use panId, expiryDateId, cvcId instead of panValue, expiryDateValue, cvcValue. Change all instrumented tests to use AccessCheckoutEditText and refactor them for easier maintenance * US1782181: update Android emulator boot timeout to cater for longer boot times * US1782181: patch Boost pod.spec while issue is being fixed - See Boost issue - boostorg/boost#843 - See temporary workaround proposed by Facebook - facebook/react-native#42180 * US1762588 - [iOS] React Native Demo Components Refactor and Props (#86) * Us1762585 - iOS Refactor Native components (#81) * US1762570: create view manager to native AccessCheckoutEditText component; override onTextChange to support the react native onChangeText event; implement component in react native * US1762550: update card details field to use new component; update RN module to use reference to AccessCheckoutEditText and not the text value * US1762550: move AccessCheckoutEditTextManager to correct file path; update local android sdk files to most up-to-date version of master; update AccessCheckoutReactPackageTest * US1782181: add unit tests for AccessCheckoutEditTextManagerTest; add mockito to build.gradle for unit tests * US1762551: Expose AccessCheckoutUITextField to be able to use native components via the ios Bridge Simplify ReactNativeViewLocator and implement/expose specific POC methods to avoid disruptions with previous implementation Add POC toggle to demo app to be able to switch implementations Expose new POC validation and sessionGeneration methods to avoid diruptions with previous implementations * US1762551: Point client to npe environment * US1762585: Refactor ios Bridge and demo application Avoids having to handle inputs in states Uses native components Only a input field id is needed in order to configure validation and session generation for a field Integrate the latest AccessCheckoutUITextField changes Updates and renames cvcValue to cvcId Updates and renames panValue to panId Updates and renames expiryDateValue to expiryDateId * US1762585: Rebuild lib and clean up files * US1762585: Minor cleanup * US1762585: Rebuild lib files Rename AccessCheckoutEditText to AccessCheckoutInputText as EditText was specific to Android Minor renaming of fields like panUITextField to panACUITextField to improve readability and make it known that we are dealing with AccessCheckoutUITextField in the iOS bridge * US1762585: Rename AccessCheckoutEditText to AccessCheckoutInputText in Android bridge * US1762585: Rename AccessCheckoutInputText to AccessCheckoutTextInput Rebuild lib files * US1762585: Update bitrise-step to use xcode-test v5 and update e2e tests (#82) * US1762585: Update bitrise-step to use xcode-test v5 * US1762585: Use Optionals to mantain compatibility in both Xcode 13 and Xcode 15 * US1762585: Update e2e tests * US1762585: Improve matcher based on platform using type * US1762585: Remove TextInputPO as it is no longer used --------- Co-authored-by: e5661323 <jason.dzelamensah@fisglobal.com> * US1762588: Clean and Refactor CVC Expiry and Pan React Native Demo components Define Props and types to ReactNative component and Native component props * US1762588: Use paddingHorizontal in demo components * US1762588: Add Android AccessCheckoutEditText defaults when initialising the component * US1762588: Add Support for fonts via styling, minor refactorings * US1762588: Remove Comment and support for keyboartType in iOS Bridge * US1762588: Revert pod local version * US1762588: rebuild pod files to point to remote AccessCheckoutSDK * US1762588: rebuild pod files to point to remote AccessCheckoutSDK * US1762588: Remove support for fontStyle and fontWeight * US1762588: Add correct colours to text when input is not editable, remove inverted expression * US1762588: Fixx import after rebase * US1762588: Clean imports * US1762588: Remove unnecessary comments * US1762588: Rename fontColor to color, and remap in iOS Bridge Reset defaults provided by AccessCheckoutUITextfield Reset insets using horizontalPadding in AccessCheckoutUITextfield * US1762588: point to correct tag instad of branch * US1762588: Update pod deps * US1762588: change BitRise flow for iOS Bridge and iOS e2e tests to update and install Pods rather than just install --------- Co-authored-by: e5661323 <jason.dzelamensah@fisglobal.com> Co-authored-by: Olivier Chalet <olivier.chalet@fisglobal.com> * US1762599 - [Android] React Native Demo Components Refactor and Props (#87) * US1762588: Add Support for fonts via styling, minor refactorings * US1762588: Revert pod local version * US1762588: rebuild pod files to point to remote AccessCheckoutSDK * US1782181: change app to display error in a div rather as an alert * US1762599: add support for fontSize, placeholderColor & borderColor * US1762599: update textColor support; add support for font; update unit tests * US1762599: run format task * US1762599: update access-checkout-android 3.0.0 to latest jar * US1762599: add customType to AccessCheckoutTextInputManager to allow color to be parsed correctly from demo-app Co-authored-by: abaeza-wp <153538325+abaeza-wp@users.noreply.github.com> Co-authored-by: Olivier Chalet <olivier.chalet@fisglobal.com> * Us1762585 - iOS Refactor Native components (#81) * US1762570: create view manager to native AccessCheckoutEditText component; override onTextChange to support the react native onChangeText event; implement component in react native * US1762550: update card details field to use new component; update RN module to use reference to AccessCheckoutEditText and not the text value * US1762550: move AccessCheckoutEditTextManager to correct file path; update local android sdk files to most up-to-date version of master; update AccessCheckoutReactPackageTest * US1782181: add unit tests for AccessCheckoutEditTextManagerTest; add mockito to build.gradle for unit tests * US1762551: Expose AccessCheckoutUITextField to be able to use native components via the ios Bridge Simplify ReactNativeViewLocator and implement/expose specific POC methods to avoid disruptions with previous implementation Add POC toggle to demo app to be able to switch implementations Expose new POC validation and sessionGeneration methods to avoid diruptions with previous implementations * US1762551: Point client to npe environment * US1762585: Refactor ios Bridge and demo application Avoids having to handle inputs in states Uses native components Only a input field id is needed in order to configure validation and session generation for a field Integrate the latest AccessCheckoutUITextField changes Updates and renames cvcValue to cvcId Updates and renames panValue to panId Updates and renames expiryDateValue to expiryDateId * US1762585: Rebuild lib and clean up files * US1762585: Minor cleanup * US1762585: Rebuild lib files Rename AccessCheckoutEditText to AccessCheckoutInputText as EditText was specific to Android Minor renaming of fields like panUITextField to panACUITextField to improve readability and make it known that we are dealing with AccessCheckoutUITextField in the iOS bridge * US1762585: Rename AccessCheckoutEditText to AccessCheckoutInputText in Android bridge * US1762585: Rename AccessCheckoutInputText to AccessCheckoutTextInput Rebuild lib files * US1762585: Update bitrise-step to use xcode-test v5 and update e2e tests (#82) * US1762585: Update bitrise-step to use xcode-test v5 * US1762585: Use Optionals to mantain compatibility in both Xcode 13 and Xcode 15 * US1762585: Update e2e tests * US1762585: Improve matcher based on platform using type * US1762585: Remove TextInputPO as it is no longer used --------- Co-authored-by: e5661323 <jason.dzelamensah@fisglobal.com> * US1782181: change app to display error in a div rather as an alert * US1762599: add support for fontSize, placeholderColor & borderColor * US1762599: update textColor support; add support for font; update unit tests * US1762599: run format task * US1762588: Use paddingHorizontal in demo components * US1762588: rebuild pod files to point to remote AccessCheckoutSDK * US1762588: Clean imports * US1764971: Create useAccessCheckout Custom hook Refactor application and model to take in CardConfiguration and CvcOnlyCardConfiguration Refactor application to make useCardValidation and useCvcOnlyValidation internal hooks Rebuild libraries with bob Update tests and add @testing-library/react-native renderHook * US1764971: Clean up * US1764971: Re-build lib files * US1764971: Re-build dependency files to fix an error caused when installing dependencies * US1764971: expose useCvcOnlyConfig and useCardConfig to provide better experience when initialising configuration for useAccessCheckout Added ValidationListenerException to ensure an error is raised when attempting to use initialiseValidation when no validationConfig is provided, This provides the developers with a clear readable error message and enhances their debugging experience. * US1764971: Fix prettier * US1764971: rebuild lib files * US1764971: Differentiate between props interface and config classes as it was creating confusion by renaming CardConfig and CvconlyConfig classes and validation classes to be prefixed with Merchant * US1764971: Differentiate between props interface and config classes as it was creating confusion by renaming CardConfig and CvconlyConfig classes and validation classes to be prefixed with Merchant * Us1833001: [Android] Add font support (#96) * US1833001: Add Android support for font customization including font weight and font style * US1833001: Add Android support for font customization including font weight and font style and checks for support of font weight in android api >28 * US1833001: Better comment to explain why the use of font.getInt() was not used * US1764780 - Within the README under the access-checkout-react-native-sdk folder, write a section on SAQ-A compliance and a section on AccessCheckoutTextInput which has a link to the documentation (#99) * F253333: Export AccessCheckoutTextInput and props (#104) * F253333: Export AccessCheckoutTextInput and props * F253333: Add mock for requireNativeComponent --------- Co-authored-by: e5661323 <jason.dzelamensah@fisglobal.com> Co-authored-by: Olivier Chalet <olivier.chalet@fisglobal.com> Co-authored-by: Jason <101661402+jmensahWP@users.noreply.github.com> Co-authored-by: ochalet-wp <59016148+ochalet-wp@users.noreply.github.com>
What
Add support for various properties in
AccessCheckoutEditText
How
Adding support for the properties via
AccessCheckoutTextInputManager
Why
So that merchant can continue to have the ability to style the field