@aws-amplify/ui-react-native 1.2.22 → 1.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/lib/Authenticator/Authenticator.js +72 -0
- package/lib/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +43 -0
- package/lib/Authenticator/Defaults/ConfirmResetPassword/index.js +8 -0
- package/lib/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +42 -0
- package/lib/Authenticator/Defaults/ConfirmSignIn/index.js +8 -0
- package/lib/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +43 -0
- package/lib/Authenticator/Defaults/ConfirmSignUp/index.js +8 -0
- package/lib/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +42 -0
- package/lib/Authenticator/Defaults/ConfirmVerifyUser/index.js +8 -0
- package/lib/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +45 -0
- package/lib/Authenticator/Defaults/ForceNewPassword/index.js +8 -0
- package/lib/Authenticator/Defaults/ResetPassword/ResetPassword.js +42 -0
- package/lib/Authenticator/Defaults/ResetPassword/index.js +8 -0
- package/lib/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +52 -0
- package/lib/Authenticator/Defaults/SetupTOTP/index.js +8 -0
- package/lib/Authenticator/Defaults/SetupTOTP/styles.js +8 -0
- package/lib/Authenticator/Defaults/SignIn/SignIn.js +50 -0
- package/lib/Authenticator/Defaults/SignIn/index.js +8 -0
- package/lib/Authenticator/Defaults/SignUp/SignUp.js +48 -0
- package/lib/Authenticator/Defaults/SignUp/index.js +8 -0
- package/lib/Authenticator/Defaults/VerifyUser/VerifyUser.js +33 -0
- package/lib/Authenticator/Defaults/VerifyUser/index.js +8 -0
- package/lib/Authenticator/Defaults/index.js +23 -0
- package/lib/Authenticator/Defaults/types.js +2 -0
- package/lib/Authenticator/common/DefaultContainer/DefaultContainer.js +37 -0
- package/lib/Authenticator/common/DefaultContainer/InnerContainer.js +15 -0
- package/lib/Authenticator/common/DefaultContainer/index.js +10 -0
- package/lib/Authenticator/common/DefaultContainer/styles.js +31 -0
- package/lib/Authenticator/common/DefaultContainer/types.js +2 -0
- package/lib/Authenticator/common/DefaultContent/DefaultContent.js +33 -0
- package/lib/Authenticator/common/DefaultContent/index.js +8 -0
- package/lib/Authenticator/common/DefaultContent/styles.js +54 -0
- package/lib/Authenticator/common/DefaultContent/types.js +2 -0
- package/lib/Authenticator/common/DefaultFooter/DefaultFooter.js +9 -0
- package/lib/Authenticator/common/DefaultFooter/index.js +8 -0
- package/lib/Authenticator/common/DefaultFooter/types.js +2 -0
- package/lib/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.js +28 -0
- package/lib/Authenticator/common/DefaultFormFields/DefaultTextFormFields.js +21 -0
- package/lib/Authenticator/common/DefaultFormFields/Field.js +37 -0
- package/lib/Authenticator/common/DefaultFormFields/FieldErrors.js +17 -0
- package/lib/Authenticator/common/DefaultFormFields/index.js +10 -0
- package/lib/Authenticator/common/DefaultFormFields/types.js +2 -0
- package/lib/Authenticator/common/DefaultHeader/DefaultHeader.js +11 -0
- package/lib/Authenticator/common/DefaultHeader/index.js +8 -0
- package/lib/Authenticator/common/DefaultHeader/types.js +2 -0
- package/lib/Authenticator/common/FederatedProviderButton/FederatedProviderButton.js +18 -0
- package/lib/Authenticator/common/FederatedProviderButton/index.js +8 -0
- package/lib/Authenticator/common/FederatedProviderButton/styles.js +21 -0
- package/lib/Authenticator/common/FederatedProviderButton/types.js +2 -0
- package/lib/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.js +26 -0
- package/lib/Authenticator/common/FederatedProviderButtons/index.js +8 -0
- package/lib/Authenticator/common/FederatedProviderButtons/styles.js +8 -0
- package/lib/Authenticator/common/FederatedProviderButtons/types.js +2 -0
- package/lib/Authenticator/common/index.js +10 -0
- package/lib/Authenticator/hooks/index.js +5 -0
- package/lib/Authenticator/hooks/types.js +2 -0
- package/lib/Authenticator/hooks/useFieldValues/constants.js +11 -0
- package/lib/Authenticator/hooks/useFieldValues/index.js +10 -0
- package/lib/Authenticator/hooks/useFieldValues/types.js +2 -0
- package/lib/Authenticator/hooks/useFieldValues/useFieldValues.js +101 -0
- package/lib/Authenticator/hooks/useFieldValues/utils.js +139 -0
- package/lib/Authenticator/index.js +13 -0
- package/lib/Authenticator/types.js +2 -0
- package/lib/Authenticator/withAuthenticator.js +15 -0
- package/lib/InAppMessaging/components/BannerMessage/BannerMessage.js +20 -0
- package/lib/InAppMessaging/components/BannerMessage/index.js +8 -0
- package/lib/InAppMessaging/components/BannerMessage/styles.js +81 -0
- package/lib/InAppMessaging/components/BannerMessage/types.js +2 -0
- package/lib/InAppMessaging/components/CarouselMessage/CarouselMessage.js +25 -0
- package/lib/InAppMessaging/components/CarouselMessage/CarouselMessageItem.js +22 -0
- package/lib/InAppMessaging/components/CarouselMessage/index.js +8 -0
- package/lib/InAppMessaging/components/CarouselMessage/styles.js +103 -0
- package/lib/InAppMessaging/components/CarouselMessage/types.js +2 -0
- package/lib/InAppMessaging/components/FullScreenMessage/FullScreenMessage.js +22 -0
- package/lib/InAppMessaging/components/FullScreenMessage/index.js +8 -0
- package/lib/InAppMessaging/components/FullScreenMessage/styles.js +91 -0
- package/lib/InAppMessaging/components/FullScreenMessage/types.js +2 -0
- package/lib/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.js +32 -0
- package/lib/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.js +26 -0
- package/lib/InAppMessaging/components/InAppMessageDisplay/index.js +8 -0
- package/lib/InAppMessaging/components/InAppMessageDisplay/types.js +2 -0
- package/lib/InAppMessaging/components/MessageLayout/MessageLayout.js +38 -0
- package/lib/InAppMessaging/components/MessageLayout/index.js +8 -0
- package/lib/InAppMessaging/components/MessageLayout/types.js +2 -0
- package/lib/InAppMessaging/components/MessageWrapper/MessageWrapper.js +24 -0
- package/lib/InAppMessaging/components/MessageWrapper/index.js +8 -0
- package/lib/InAppMessaging/components/MessageWrapper/styles.js +8 -0
- package/lib/InAppMessaging/components/MessageWrapper/types.js +2 -0
- package/lib/InAppMessaging/components/ModalMessage/ModalMessage.js +22 -0
- package/lib/InAppMessaging/components/ModalMessage/index.js +8 -0
- package/lib/InAppMessaging/components/ModalMessage/styles.js +104 -0
- package/lib/InAppMessaging/components/ModalMessage/types.js +2 -0
- package/lib/InAppMessaging/components/index.js +7 -0
- package/lib/InAppMessaging/components/withInAppMessaging/index.js +8 -0
- package/lib/InAppMessaging/components/withInAppMessaging/withInAppMessaging.js +15 -0
- package/lib/InAppMessaging/constants.js +48 -0
- package/lib/InAppMessaging/hooks/index.js +7 -0
- package/lib/InAppMessaging/hooks/useMessageImage/constants.js +21 -0
- package/lib/InAppMessaging/hooks/useMessageImage/index.js +8 -0
- package/lib/InAppMessaging/hooks/useMessageImage/types.js +9 -0
- package/lib/InAppMessaging/hooks/useMessageImage/useMessageImage.js +53 -0
- package/lib/InAppMessaging/hooks/useMessageImage/utils.js +61 -0
- package/lib/InAppMessaging/hooks/useMessageProps/index.js +8 -0
- package/lib/InAppMessaging/hooks/useMessageProps/types.js +2 -0
- package/lib/InAppMessaging/hooks/useMessageProps/useMessageProps.js +52 -0
- package/lib/InAppMessaging/hooks/useMessageProps/utils.js +201 -0
- package/lib/InAppMessaging/index.js +9 -0
- package/lib/assets/icons/amazonLogo.png +0 -0
- package/lib/assets/icons/amazonLogo@2x.png +0 -0
- package/lib/assets/icons/amazonLogo@3x.png +0 -0
- package/lib/assets/icons/appleLogo.png +0 -0
- package/lib/assets/icons/appleLogo@2x.png +0 -0
- package/lib/assets/icons/appleLogo@3x.png +0 -0
- package/lib/assets/icons/checkboxFilled.png +0 -0
- package/lib/assets/icons/checkboxFilled@2x.png +0 -0
- package/lib/assets/icons/checkboxFilled@3x.png +0 -0
- package/lib/assets/icons/checkboxOutline.png +0 -0
- package/lib/assets/icons/checkboxOutline@2x.png +0 -0
- package/lib/assets/icons/checkboxOutline@3x.png +0 -0
- package/lib/assets/icons/close.png +0 -0
- package/lib/assets/icons/close@2x.png +0 -0
- package/lib/assets/icons/close@3x.png +0 -0
- package/lib/assets/icons/copy.png +0 -0
- package/lib/assets/icons/copy@2x.png +0 -0
- package/lib/assets/icons/copy@3x.png +0 -0
- package/lib/assets/icons/error.png +0 -0
- package/lib/assets/icons/error@2x.png +0 -0
- package/lib/assets/icons/error@3x.png +0 -0
- package/lib/assets/icons/facebookLogo.png +0 -0
- package/lib/assets/icons/facebookLogo@2x.png +0 -0
- package/lib/assets/icons/facebookLogo@3x.png +0 -0
- package/lib/assets/icons/googleLogo.png +0 -0
- package/lib/assets/icons/googleLogo@2x.png +0 -0
- package/lib/assets/icons/googleLogo@3x.png +0 -0
- package/lib/assets/icons/index.js +16 -0
- package/lib/assets/icons/index.ts +17 -0
- package/lib/assets/icons/visibilityOff.png +0 -0
- package/lib/assets/icons/visibilityOff@2x.png +0 -0
- package/lib/assets/icons/visibilityOff@3x.png +0 -0
- package/lib/assets/icons/visibilityOn.png +0 -0
- package/lib/assets/icons/visibilityOn@2x.png +0 -0
- package/lib/assets/icons/visibilityOn@3x.png +0 -0
- package/lib/assets/index.js +8 -0
- package/lib/hooks/index.js +9 -0
- package/lib/hooks/useDeprecationWarning/index.js +8 -0
- package/lib/hooks/useDeprecationWarning/useDeprecationWarning.js +13 -0
- package/lib/hooks/useDeviceOrientation/index.js +8 -0
- package/lib/hooks/useDeviceOrientation/useDeviceOrientation.js +37 -0
- package/lib/hooks/usePressableContainerStyles/index.js +5 -0
- package/lib/hooks/usePressableContainerStyles/usePressableContainerStyles.js +19 -0
- package/lib/index.js +14 -0
- package/lib/primitives/Button/Button.js +31 -0
- package/lib/primitives/Button/index.js +8 -0
- package/lib/primitives/Button/styles.js +55 -0
- package/lib/primitives/Button/types.js +2 -0
- package/lib/primitives/Carousel/Carousel.js +63 -0
- package/lib/primitives/Carousel/CarouselPageIndicator.js +14 -0
- package/lib/primitives/Carousel/constants.js +21 -0
- package/lib/primitives/Carousel/index.js +10 -0
- package/lib/primitives/Carousel/styles.js +14 -0
- package/lib/primitives/Carousel/types.js +2 -0
- package/lib/primitives/Checkbox/Checkbox.js +28 -0
- package/lib/primitives/Checkbox/index.js +8 -0
- package/lib/primitives/Checkbox/styles.js +28 -0
- package/lib/primitives/Checkbox/types.js +2 -0
- package/lib/primitives/Divider/Divider.js +22 -0
- package/lib/primitives/Divider/index.js +8 -0
- package/lib/primitives/Divider/styles.js +28 -0
- package/lib/primitives/Divider/types.js +2 -0
- package/lib/primitives/ErrorMessage/ErrorMessage.js +22 -0
- package/lib/primitives/ErrorMessage/index.js +8 -0
- package/lib/primitives/ErrorMessage/styles.js +30 -0
- package/lib/primitives/ErrorMessage/types.js +2 -0
- package/lib/primitives/Heading/Heading.js +15 -0
- package/lib/primitives/Heading/index.js +8 -0
- package/lib/primitives/Heading/styles.js +51 -0
- package/lib/primitives/Heading/types.js +2 -0
- package/lib/primitives/Icon/Icon.js +21 -0
- package/lib/primitives/Icon/constants.js +10 -0
- package/lib/primitives/Icon/index.js +10 -0
- package/lib/primitives/Icon/styles.js +34 -0
- package/lib/primitives/Icon/types.js +2 -0
- package/lib/primitives/IconButton/IconButton.js +26 -0
- package/lib/primitives/IconButton/index.js +8 -0
- package/lib/primitives/IconButton/styles.js +21 -0
- package/lib/primitives/IconButton/types.js +2 -0
- package/lib/primitives/Label/Label.js +16 -0
- package/lib/primitives/Label/index.js +8 -0
- package/lib/primitives/Label/styles.js +45 -0
- package/lib/primitives/Label/types.js +2 -0
- package/lib/primitives/Label/utils.js +25 -0
- package/lib/primitives/PasswordField/PasswordField.js +24 -0
- package/lib/primitives/PasswordField/index.js +8 -0
- package/lib/primitives/PasswordField/styles.js +17 -0
- package/lib/primitives/PasswordField/types.js +2 -0
- package/lib/primitives/PhoneNumberField/PhoneNumberField.js +13 -0
- package/lib/primitives/PhoneNumberField/index.js +8 -0
- package/lib/primitives/PhoneNumberField/styles.js +22 -0
- package/lib/primitives/PhoneNumberField/types.js +2 -0
- package/lib/primitives/Radio/Radio.js +46 -0
- package/lib/primitives/Radio/getRadioDimensions.js +43 -0
- package/lib/primitives/Radio/index.js +8 -0
- package/lib/primitives/Radio/styles.js +68 -0
- package/lib/primitives/Radio/types.js +2 -0
- package/lib/primitives/RadioGroup/RadioGroup.js +55 -0
- package/lib/primitives/RadioGroup/index.js +8 -0
- package/lib/primitives/RadioGroup/styles.js +20 -0
- package/lib/primitives/RadioGroup/types.js +2 -0
- package/lib/primitives/Tabs/Tab.js +27 -0
- package/lib/primitives/Tabs/Tabs.js +29 -0
- package/lib/primitives/Tabs/index.js +10 -0
- package/lib/primitives/Tabs/styles.js +58 -0
- package/lib/primitives/Tabs/types.js +2 -0
- package/lib/primitives/TextField/TextField.js +31 -0
- package/lib/primitives/TextField/index.js +8 -0
- package/lib/primitives/TextField/styles.js +46 -0
- package/lib/primitives/TextField/types.js +2 -0
- package/lib/primitives/index.js +18 -0
- package/lib/theme/ThemeContext.js +9 -0
- package/lib/theme/ThemeProvider.js +12 -0
- package/lib/theme/createTheme.js +113 -0
- package/lib/theme/defaultTheme.js +11 -0
- package/lib/theme/index.js +12 -0
- package/lib/theme/types.js +2 -0
- package/lib/theme/useTheme.js +11 -0
- package/lib/utils/font.js +8 -0
- package/lib/utils/index.js +10 -0
- package/lib/utils/platform.js +21 -0
- package/lib/version.js +4 -0
- package/package.json +19 -10
- package/src/version.ts +1 -1
- package/.eslintrc.js +0 -12
- package/.lintstagedrc.js +0 -6
- package/.turbo/turbo-build.log +0 -3
- package/CHANGELOG.md +0 -332
- package/babel.config.js +0 -3
- package/dist/assets/index.ts +0 -1
- package/jest.config.js +0 -22
- package/jest.setup.js +0 -3
- package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx +0 -89
- package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap +0 -1090
- package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx +0 -78
- package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap +0 -512
- package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/ConfirmSignUp.spec.tsx +0 -64
- package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap +0 -528
- package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/ConfirmVerifyUser.spec.tsx +0 -71
- package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/__snapshots__/ConfirmVerifyUser.spec.tsx.snap +0 -492
- package/src/Authenticator/Defaults/ForceNewPassword/__tests__/ForceNewPassword.spec.tsx +0 -79
- package/src/Authenticator/Defaults/ForceNewPassword/__tests__/__snapshots__/ForceNewPassword.spec.tsx.snap +0 -896
- package/src/Authenticator/Defaults/ResetPassword/__tests__/ResetPassword.spec.tsx +0 -78
- package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap +0 -512
- package/src/Authenticator/Defaults/SetupTOTP/__tests__/SetupTOTP.spec.tsx +0 -85
- package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap +0 -602
- package/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx +0 -67
- package/src/Authenticator/Defaults/SignIn/__tests__/__snapshots__/SignIn.spec.tsx.snap +0 -1281
- package/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx +0 -102
- package/src/Authenticator/Defaults/SignUp/__tests__/__snapshots__/SignUp.spec.tsx.snap +0 -3122
- package/src/Authenticator/Defaults/VerifyUser/__tests__/VerifyUser.spec.tsx +0 -107
- package/src/Authenticator/Defaults/VerifyUser/__tests__/__snapshots__/VerifyUser.spec.tsx.snap +0 -692
- package/src/Authenticator/__tests__/Authenticator.spec.tsx +0 -131
- package/src/Authenticator/__tests__/__snapshots__/Authenticator.spec.tsx.snap +0 -90
- package/src/Authenticator/__tests__/__snapshots__/withAuthenticator.spec.tsx.snap +0 -68
- package/src/Authenticator/__tests__/withAuthenticator.spec.tsx +0 -73
- package/src/Authenticator/common/DefaultContainer/__tests__/DefaultContainer.spec.tsx +0 -19
- package/src/Authenticator/common/DefaultContainer/__tests__/__snapshots__/DefaultContainer.spec.tsx.snap +0 -83
- package/src/Authenticator/common/DefaultFooter/__tests__/DefaultFooter.spec.tsx +0 -26
- package/src/Authenticator/common/DefaultFooter/__tests__/__snapshots__/DefaultFooter.spec.tsx.snap +0 -40
- package/src/Authenticator/common/DefaultFormFields/__tests__/DefaultFormFields.spec.tsx +0 -15
- package/src/Authenticator/common/DefaultFormFields/__tests__/FieldErrors.spec.tsx +0 -29
- package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/DefaultFormFields.spec.tsx.snap +0 -3
- package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/FieldErrors.spec.tsx.snap +0 -32
- package/src/Authenticator/common/DefaultHeader/__tests__/DefaultHeader.spec.tsx +0 -23
- package/src/Authenticator/common/DefaultHeader/__tests__/__snapshots__/DefaultHeader.spec.tsx.snap +0 -24
- package/src/Authenticator/common/FederatedProviderButton/__tests__/FederatedProviderButton.spec.tsx +0 -67
- package/src/Authenticator/common/FederatedProviderButton/__tests__/__snapshots__/FederatedProviderButton.spec.tsx.snap +0 -185
- package/src/Authenticator/common/FederatedProviderButtons/__tests__/FederatedProviderButtons.spec.tsx +0 -55
- package/src/Authenticator/common/FederatedProviderButtons/__tests__/__snapshots__/FederatedProviderButtons.spec.tsx.snap +0 -167
- package/src/Authenticator/hooks/useFieldValues/__tests__/useFieldValues.spec.ts +0 -399
- package/src/Authenticator/hooks/useFieldValues/__tests__/utils.spec.ts +0 -282
- package/src/InAppMessaging/components/BannerMessage/__tests__/BannerMessage.spec.tsx +0 -151
- package/src/InAppMessaging/components/BannerMessage/__tests__/__snapshots__/BannerMessage.spec.tsx.snap +0 -618
- package/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessage.spec.tsx +0 -92
- package/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessageItem.spec.tsx +0 -50
- package/src/InAppMessaging/components/CarouselMessage/__tests__/__snapshots__/CarouselMessage.spec.tsx.snap +0 -124
- package/src/InAppMessaging/components/CarouselMessage/__tests__/__snapshots__/CarouselMessageItem.spec.tsx.snap +0 -248
- package/src/InAppMessaging/components/FullScreenMessage/__tests__/FullScreenMessage.spec.tsx +0 -53
- package/src/InAppMessaging/components/FullScreenMessage/__tests__/__snapshots__/FullScreenMessage.spec.tsx.snap +0 -238
- package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/InAppMessageDisplay.spec.tsx +0 -34
- package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/__snapshots__/InAppMessageDisplay.spec.tsx.snap +0 -9
- package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/handleMessageLinkAction.spec.ts +0 -51
- package/src/InAppMessaging/components/MessageWrapper/__tests__/MessageWrapper.spec.tsx +0 -19
- package/src/InAppMessaging/components/MessageWrapper/__tests__/__snapshots__/MessageWrapper.spec.tsx.snap +0 -35
- package/src/InAppMessaging/components/ModalMessage/__tests__/ModalMessage.spec.tsx +0 -169
- package/src/InAppMessaging/components/ModalMessage/__tests__/__snapshots__/ModalMessage.spec.tsx.snap +0 -727
- package/src/InAppMessaging/components/withInAppMessaging/__tests__/__snapshots__/withInAppMessaging.spec.tsx.snap +0 -3
- package/src/InAppMessaging/components/withInAppMessaging/__tests__/withInAppMessaging.spec.tsx +0 -15
- package/src/InAppMessaging/hooks/useMessageImage/__tests__/useMessageImage.spec.ts +0 -141
- package/src/InAppMessaging/hooks/useMessageImage/__tests__/utils.spec.ts +0 -107
- package/src/InAppMessaging/hooks/useMessageProps/__tests__/__snapshots__/utils.spec.ts.snap +0 -223
- package/src/InAppMessaging/hooks/useMessageProps/__tests__/useMessageProps.spec.ts +0 -162
- package/src/InAppMessaging/hooks/useMessageProps/__tests__/utils.spec.ts +0 -355
- package/src/__mocks__/@react-native-async-storage/async-storage.ts +0 -2
- package/src/__mocks__/@react-native-community/netinfo.ts +0 -3
- package/src/__mocks__/react-native-safe-area-context.ts +0 -9
- package/src/__tests__/__snapshots__/index.spec.ts.snap +0 -26
- package/src/__tests__/index.spec.ts +0 -8
- package/src/hooks/useDeprecationWarning/__tests__/useDeprecationWarning.spec.ts +0 -42
- package/src/hooks/useDeviceOrientation/__tests__/useDeviceOrientation.spec.ts +0 -89
- package/src/hooks/usePressableContainerStyles/__tests__/usePressableContainerStyles.spec.ts +0 -68
- package/src/primitives/Button/__tests__/Button.spec.tsx +0 -92
- package/src/primitives/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -143
- package/src/primitives/Carousel/__tests__/Carousel.spec.tsx +0 -174
- package/src/primitives/Carousel/__tests__/CarouselPageIndicator.spec.tsx +0 -73
- package/src/primitives/Carousel/__tests__/__snapshots__/Carousel.spec.tsx.snap +0 -310
- package/src/primitives/Carousel/__tests__/__snapshots__/CarouselPageIndicator.spec.tsx.snap +0 -191
- package/src/primitives/Checkbox/__tests__/Checkbox.spec.tsx +0 -150
- package/src/primitives/Checkbox/__tests__/__snapshots__/Checkbox.spec.tsx.snap +0 -527
- package/src/primitives/Divider/__tests__/Divider.spec.tsx +0 -50
- package/src/primitives/Divider/__tests__/__snapshots__/Divider.spec.tsx.snap +0 -165
- package/src/primitives/ErrorMessage/__tests__/ErrorMessage.spec.tsx +0 -60
- package/src/primitives/ErrorMessage/__tests__/__snapshots__/ErrorMessage.spec.tsx.snap +0 -123
- package/src/primitives/Heading/__tests__/Heading.spec.tsx +0 -73
- package/src/primitives/Heading/__tests__/__snapshots__/Heading.spec.tsx.snap +0 -171
- package/src/primitives/Icon/__tests__/Icon.spec.tsx +0 -100
- package/src/primitives/Icon/__tests__/__snapshots__/Icon.spec.tsx.snap +0 -139
- package/src/primitives/IconButton/__tests__/IconButton.spec.tsx +0 -71
- package/src/primitives/IconButton/__tests__/__snapshots__/IconButton.spec.tsx.snap +0 -192
- package/src/primitives/Label/__tests__/Label.spec.tsx +0 -75
- package/src/primitives/Label/__tests__/__snapshots__/Label.spec.tsx.snap +0 -91
- package/src/primitives/PasswordField/__tests__/PasswordField.spec.tsx +0 -110
- package/src/primitives/PasswordField/__tests__/__snapshots__/PasswordField.spec.tsx.snap +0 -625
- package/src/primitives/PhoneNumberField/__tests__/PhoneNumberField.spec.tsx +0 -53
- package/src/primitives/PhoneNumberField/__tests__/__snapshots__/PhoneNumberField.spec.tsx.snap +0 -188
- package/src/primitives/Radio/__tests__/Radio.spec.tsx +0 -166
- package/src/primitives/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +0 -678
- package/src/primitives/RadioGroup/__tests__/RadioGroup.spec.tsx +0 -183
- package/src/primitives/RadioGroup/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +0 -1789
- package/src/primitives/Tabs/__tests__/Tab.spec.tsx +0 -75
- package/src/primitives/Tabs/__tests__/Tabs.spec.tsx +0 -81
- package/src/primitives/Tabs/__tests__/__snapshots__/Tab.spec.tsx.snap +0 -278
- package/src/primitives/Tabs/__tests__/__snapshots__/Tabs.spec.tsx.snap +0 -163
- package/src/primitives/TextField/__tests__/TextField.spec.tsx +0 -202
- package/src/primitives/TextField/__tests__/__snapshots__/TextField.spec.tsx.snap +0 -507
- package/src/theme/__tests__/ThemeProvider.spec.tsx +0 -23
- package/src/theme/__tests__/__snapshots__/useTheme.spec.tsx.snap +0 -226
- package/src/theme/__tests__/createTheme.spec.ts +0 -244
- package/src/theme/__tests__/useTheme.spec.tsx +0 -51
- package/tsconfig.dist.json +0 -4
- package/tsconfig.json +0 -9
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
import { render } from '@testing-library/react-native';
|
|
4
|
-
|
|
5
|
-
import * as UIReactCoreModule from '@aws-amplify/ui-react-core';
|
|
6
|
-
import {
|
|
7
|
-
AuthenticatorMachineContext,
|
|
8
|
-
UseAuthenticator,
|
|
9
|
-
} from '@aws-amplify/ui-react-core';
|
|
10
|
-
|
|
11
|
-
import { Authenticator } from '..';
|
|
12
|
-
|
|
13
|
-
jest.mock('aws-amplify');
|
|
14
|
-
jest.mock('@aws-amplify/ui-react-core');
|
|
15
|
-
|
|
16
|
-
const CHILD_TEST_ID = 'child-test-id';
|
|
17
|
-
const CHILD_CONTENT = 'Test Children';
|
|
18
|
-
|
|
19
|
-
const CONTAINER_TEST_ID = 'container-test-id';
|
|
20
|
-
const FOOTER_TEST_ID = 'footer-test-id';
|
|
21
|
-
const HEADER_TEST_ID = 'header-test-id';
|
|
22
|
-
|
|
23
|
-
function TestChildren() {
|
|
24
|
-
return <Text testID={CHILD_TEST_ID}>{CHILD_CONTENT}</Text>;
|
|
25
|
-
}
|
|
26
|
-
const TestComponent = () => {
|
|
27
|
-
return null;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
function Container({ children }: { children?: React.ReactNode }) {
|
|
31
|
-
return <View testID={CONTAINER_TEST_ID}>{children}</View>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function Footer() {
|
|
35
|
-
return <View testID={FOOTER_TEST_ID} />;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function Header() {
|
|
39
|
-
return <View testID={HEADER_TEST_ID} />;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const useAuthenticatorInitMachineSpy = jest.spyOn(
|
|
43
|
-
UIReactCoreModule,
|
|
44
|
-
'useAuthenticatorInitMachine'
|
|
45
|
-
);
|
|
46
|
-
const useAuthenticatorSpy = jest.spyOn(UIReactCoreModule, 'useAuthenticator');
|
|
47
|
-
const useAuthenticatorRouteSpy = jest.spyOn(
|
|
48
|
-
UIReactCoreModule,
|
|
49
|
-
'useAuthenticatorRoute'
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
type MockSelectorParam =
|
|
53
|
-
| ((
|
|
54
|
-
context: AuthenticatorMachineContext
|
|
55
|
-
) => AuthenticatorMachineContext[keyof AuthenticatorMachineContext][])
|
|
56
|
-
| undefined;
|
|
57
|
-
|
|
58
|
-
describe('Authenticator', () => {
|
|
59
|
-
beforeEach(() => {
|
|
60
|
-
jest.clearAllMocks();
|
|
61
|
-
|
|
62
|
-
useAuthenticatorRouteSpy.mockReturnValue({
|
|
63
|
-
Component: TestComponent as any,
|
|
64
|
-
props: {} as any,
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('behaves as expected in the happy path', () => {
|
|
69
|
-
const mockUseAuthenticator = (cb: MockSelectorParam) =>
|
|
70
|
-
cb?.({
|
|
71
|
-
route: 'signIn',
|
|
72
|
-
} as unknown as AuthenticatorMachineContext)[0] as unknown as UseAuthenticator;
|
|
73
|
-
useAuthenticatorSpy.mockImplementation(mockUseAuthenticator);
|
|
74
|
-
|
|
75
|
-
const { toJSON } = render(<Authenticator />);
|
|
76
|
-
|
|
77
|
-
expect(useAuthenticatorInitMachineSpy).toHaveBeenCalledTimes(1);
|
|
78
|
-
expect(useAuthenticatorSpy).toHaveBeenCalledTimes(1);
|
|
79
|
-
expect(useAuthenticatorSpy).toHaveBeenCalledWith(expect.any(Function));
|
|
80
|
-
|
|
81
|
-
expect(toJSON()).toMatchSnapshot();
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
it('handles `authStatus` of authenticated as expected', () => {
|
|
85
|
-
useAuthenticatorSpy.mockImplementation(
|
|
86
|
-
() => ({ authStatus: 'authenticated' } as unknown as UseAuthenticator)
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
const { getByTestId, toJSON } = render(
|
|
90
|
-
<Authenticator>
|
|
91
|
-
<TestChildren />
|
|
92
|
-
</Authenticator>
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
const children = getByTestId(CHILD_TEST_ID);
|
|
96
|
-
|
|
97
|
-
expect(children.type).toBe('Text');
|
|
98
|
-
expect(children.props.children).toBe(CHILD_CONTENT);
|
|
99
|
-
|
|
100
|
-
expect(toJSON()).toMatchSnapshot();
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
it.each(['unauthenticated', 'configuring'])(
|
|
104
|
-
'handles an authStatus of %s as expected',
|
|
105
|
-
(route) => {
|
|
106
|
-
useAuthenticatorSpy.mockImplementation(
|
|
107
|
-
() => ({ route } as unknown as UseAuthenticator)
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
const { container } = render(<Authenticator />);
|
|
111
|
-
|
|
112
|
-
expect(container.instance).toBeNull();
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
|
|
116
|
-
it('renders with custom slot components as expected', () => {
|
|
117
|
-
useAuthenticatorSpy.mockReturnValueOnce({
|
|
118
|
-
route: 'signIn',
|
|
119
|
-
} as unknown as UseAuthenticator);
|
|
120
|
-
|
|
121
|
-
const { getByTestId, toJSON } = render(
|
|
122
|
-
<Authenticator Container={Container} Footer={Footer} Header={Header} />
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
expect(getByTestId(CONTAINER_TEST_ID)).toBeDefined();
|
|
126
|
-
expect(getByTestId(FOOTER_TEST_ID)).toBeDefined();
|
|
127
|
-
expect(getByTestId(HEADER_TEST_ID)).toBeDefined();
|
|
128
|
-
|
|
129
|
-
expect(toJSON()).toMatchSnapshot();
|
|
130
|
-
});
|
|
131
|
-
});
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Authenticator behaves as expected in the happy path 1`] = `
|
|
4
|
-
<SafeAreaProvider>
|
|
5
|
-
<View
|
|
6
|
-
onLayout={[Function]}
|
|
7
|
-
style={
|
|
8
|
-
Array [
|
|
9
|
-
Array [
|
|
10
|
-
Object {
|
|
11
|
-
"alignContent": "center",
|
|
12
|
-
"backgroundColor": "hsl(0, 0%, 100%)",
|
|
13
|
-
"flex": 1,
|
|
14
|
-
"justifyContent": "center",
|
|
15
|
-
},
|
|
16
|
-
undefined,
|
|
17
|
-
],
|
|
18
|
-
Object {
|
|
19
|
-
"paddingBottom": 0,
|
|
20
|
-
},
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
>
|
|
24
|
-
<RCTScrollView
|
|
25
|
-
alwaysBounceVertical={false}
|
|
26
|
-
contentContainerStyle={
|
|
27
|
-
Array [
|
|
28
|
-
Object {
|
|
29
|
-
"alignContent": "center",
|
|
30
|
-
"flexGrow": 1,
|
|
31
|
-
"justifyContent": "center",
|
|
32
|
-
"paddingBottom": 44,
|
|
33
|
-
"paddingLeft": undefined,
|
|
34
|
-
"paddingRight": undefined,
|
|
35
|
-
"paddingTop": 47,
|
|
36
|
-
},
|
|
37
|
-
undefined,
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
keyboardShouldPersistTaps="handled"
|
|
41
|
-
style={
|
|
42
|
-
Array [
|
|
43
|
-
Object {},
|
|
44
|
-
undefined,
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
>
|
|
48
|
-
<View>
|
|
49
|
-
<View
|
|
50
|
-
style={
|
|
51
|
-
Object {
|
|
52
|
-
"marginHorizontal": 16,
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/>
|
|
56
|
-
</View>
|
|
57
|
-
</RCTScrollView>
|
|
58
|
-
</View>
|
|
59
|
-
</SafeAreaProvider>
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
exports[`Authenticator handles \`authStatus\` of authenticated as expected 1`] = `
|
|
63
|
-
<Text
|
|
64
|
-
testID="child-test-id"
|
|
65
|
-
>
|
|
66
|
-
Test Children
|
|
67
|
-
</Text>
|
|
68
|
-
`;
|
|
69
|
-
|
|
70
|
-
exports[`Authenticator renders with custom slot components as expected 1`] = `
|
|
71
|
-
<SafeAreaProvider>
|
|
72
|
-
<View
|
|
73
|
-
testID="container-test-id"
|
|
74
|
-
>
|
|
75
|
-
<View
|
|
76
|
-
testID="header-test-id"
|
|
77
|
-
/>
|
|
78
|
-
<View
|
|
79
|
-
style={
|
|
80
|
-
Object {
|
|
81
|
-
"marginHorizontal": 16,
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/>
|
|
85
|
-
<View
|
|
86
|
-
testID="footer-test-id"
|
|
87
|
-
/>
|
|
88
|
-
</View>
|
|
89
|
-
</SafeAreaProvider>
|
|
90
|
-
`;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`withAuthenticator renders as expected 1`] = `
|
|
4
|
-
<SafeAreaProvider>
|
|
5
|
-
<View
|
|
6
|
-
onLayout={[Function]}
|
|
7
|
-
style={
|
|
8
|
-
Array [
|
|
9
|
-
Array [
|
|
10
|
-
Object {
|
|
11
|
-
"alignContent": "center",
|
|
12
|
-
"backgroundColor": "hsl(0, 0%, 100%)",
|
|
13
|
-
"flex": 1,
|
|
14
|
-
"justifyContent": "center",
|
|
15
|
-
},
|
|
16
|
-
undefined,
|
|
17
|
-
],
|
|
18
|
-
Object {
|
|
19
|
-
"paddingBottom": 0,
|
|
20
|
-
},
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
>
|
|
24
|
-
<RCTScrollView
|
|
25
|
-
alwaysBounceVertical={false}
|
|
26
|
-
contentContainerStyle={
|
|
27
|
-
Array [
|
|
28
|
-
Object {
|
|
29
|
-
"alignContent": "center",
|
|
30
|
-
"flexGrow": 1,
|
|
31
|
-
"justifyContent": "center",
|
|
32
|
-
"paddingBottom": 44,
|
|
33
|
-
"paddingLeft": undefined,
|
|
34
|
-
"paddingRight": undefined,
|
|
35
|
-
"paddingTop": 47,
|
|
36
|
-
},
|
|
37
|
-
undefined,
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
keyboardShouldPersistTaps="handled"
|
|
41
|
-
style={
|
|
42
|
-
Array [
|
|
43
|
-
Object {},
|
|
44
|
-
undefined,
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
>
|
|
48
|
-
<View>
|
|
49
|
-
<View
|
|
50
|
-
style={
|
|
51
|
-
Object {
|
|
52
|
-
"marginHorizontal": 16,
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/>
|
|
56
|
-
</View>
|
|
57
|
-
</RCTScrollView>
|
|
58
|
-
</View>
|
|
59
|
-
</SafeAreaProvider>
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
exports[`withAuthenticator renders children when route is authenticated 1`] = `
|
|
63
|
-
<Text
|
|
64
|
-
testID="child-test-id"
|
|
65
|
-
>
|
|
66
|
-
Test Children
|
|
67
|
-
</Text>
|
|
68
|
-
`;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text } from 'react-native';
|
|
3
|
-
import { render } from '@testing-library/react-native';
|
|
4
|
-
|
|
5
|
-
import * as UIReactCoreModule from '@aws-amplify/ui-react-core';
|
|
6
|
-
import {
|
|
7
|
-
AuthenticatorMachineContext,
|
|
8
|
-
UseAuthenticator,
|
|
9
|
-
} from '@aws-amplify/ui-react-core';
|
|
10
|
-
|
|
11
|
-
import { withAuthenticator } from '..';
|
|
12
|
-
|
|
13
|
-
const CHILD_TEST_ID = 'child-test-id';
|
|
14
|
-
const CHILD_CONTENT = 'Test Children';
|
|
15
|
-
|
|
16
|
-
function TestChildren() {
|
|
17
|
-
return <Text testID={CHILD_TEST_ID}>{CHILD_CONTENT}</Text>;
|
|
18
|
-
}
|
|
19
|
-
const TestComponent = () => {
|
|
20
|
-
return null;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const TestApp = withAuthenticator(TestChildren);
|
|
24
|
-
|
|
25
|
-
const useAuthenticatorSpy = jest.spyOn(UIReactCoreModule, 'useAuthenticator');
|
|
26
|
-
const useAuthenticatorRouteSpy = jest.spyOn(
|
|
27
|
-
UIReactCoreModule,
|
|
28
|
-
'useAuthenticatorRoute'
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
type MockSelectorParam =
|
|
32
|
-
| ((
|
|
33
|
-
context: AuthenticatorMachineContext
|
|
34
|
-
) => AuthenticatorMachineContext[keyof AuthenticatorMachineContext][])
|
|
35
|
-
| undefined;
|
|
36
|
-
|
|
37
|
-
describe('withAuthenticator', () => {
|
|
38
|
-
beforeEach(() => {
|
|
39
|
-
jest.clearAllMocks();
|
|
40
|
-
|
|
41
|
-
useAuthenticatorRouteSpy.mockReturnValue({
|
|
42
|
-
Component: TestComponent as any,
|
|
43
|
-
props: {} as any,
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('renders as expected', () => {
|
|
48
|
-
const mockUseAuthenticator = (cb: MockSelectorParam) =>
|
|
49
|
-
cb?.({
|
|
50
|
-
route: 'signIn',
|
|
51
|
-
} as unknown as AuthenticatorMachineContext)[0] as unknown as UseAuthenticator;
|
|
52
|
-
useAuthenticatorSpy.mockImplementation(mockUseAuthenticator);
|
|
53
|
-
|
|
54
|
-
const { toJSON, queryByTestId } = render(<TestApp />);
|
|
55
|
-
|
|
56
|
-
expect(queryByTestId(CHILD_TEST_ID)).toBeNull();
|
|
57
|
-
expect(toJSON()).toMatchSnapshot();
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it('renders children when route is authenticated', () => {
|
|
61
|
-
useAuthenticatorSpy.mockImplementation(
|
|
62
|
-
() =>
|
|
63
|
-
({
|
|
64
|
-
authStatus: 'authenticated',
|
|
65
|
-
} as unknown as UIReactCoreModule.UseAuthenticator)
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
const { toJSON, getByTestId } = render(<TestApp />);
|
|
69
|
-
|
|
70
|
-
expect(getByTestId(CHILD_TEST_ID)).toBeDefined();
|
|
71
|
-
expect(toJSON()).toMatchSnapshot();
|
|
72
|
-
});
|
|
73
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react-native';
|
|
3
|
-
|
|
4
|
-
import { DefaultContainer } from '..';
|
|
5
|
-
import { Button } from '../../../../primitives/Button';
|
|
6
|
-
|
|
7
|
-
describe('DefaultContainer', () => {
|
|
8
|
-
it('renders as expected with children', () => {
|
|
9
|
-
const testID = 'testButton';
|
|
10
|
-
const { toJSON, getByTestId } = render(
|
|
11
|
-
<DefaultContainer>
|
|
12
|
-
<Button testID={testID} />
|
|
13
|
-
</DefaultContainer>
|
|
14
|
-
);
|
|
15
|
-
expect(toJSON()).toMatchSnapshot();
|
|
16
|
-
|
|
17
|
-
expect(getByTestId(testID)).toBeDefined();
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`DefaultContainer renders as expected with children 1`] = `
|
|
4
|
-
<View
|
|
5
|
-
onLayout={[Function]}
|
|
6
|
-
style={
|
|
7
|
-
Array [
|
|
8
|
-
Array [
|
|
9
|
-
Object {
|
|
10
|
-
"alignContent": "center",
|
|
11
|
-
"backgroundColor": "hsl(0, 0%, 100%)",
|
|
12
|
-
"flex": 1,
|
|
13
|
-
"justifyContent": "center",
|
|
14
|
-
},
|
|
15
|
-
undefined,
|
|
16
|
-
],
|
|
17
|
-
Object {
|
|
18
|
-
"paddingBottom": 0,
|
|
19
|
-
},
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
>
|
|
23
|
-
<RCTScrollView
|
|
24
|
-
alwaysBounceVertical={false}
|
|
25
|
-
contentContainerStyle={
|
|
26
|
-
Array [
|
|
27
|
-
Object {
|
|
28
|
-
"alignContent": "center",
|
|
29
|
-
"flexGrow": 1,
|
|
30
|
-
"justifyContent": "center",
|
|
31
|
-
"paddingBottom": 44,
|
|
32
|
-
"paddingLeft": undefined,
|
|
33
|
-
"paddingRight": undefined,
|
|
34
|
-
"paddingTop": 47,
|
|
35
|
-
},
|
|
36
|
-
undefined,
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
keyboardShouldPersistTaps="handled"
|
|
40
|
-
style={
|
|
41
|
-
Array [
|
|
42
|
-
Object {},
|
|
43
|
-
undefined,
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
>
|
|
47
|
-
<View>
|
|
48
|
-
<View
|
|
49
|
-
accessibilityRole="button"
|
|
50
|
-
accessible={true}
|
|
51
|
-
collapsable={false}
|
|
52
|
-
focusable={true}
|
|
53
|
-
onBlur={[Function]}
|
|
54
|
-
onClick={[Function]}
|
|
55
|
-
onFocus={[Function]}
|
|
56
|
-
onResponderGrant={[Function]}
|
|
57
|
-
onResponderMove={[Function]}
|
|
58
|
-
onResponderRelease={[Function]}
|
|
59
|
-
onResponderTerminate={[Function]}
|
|
60
|
-
onResponderTerminationRequest={[Function]}
|
|
61
|
-
onStartShouldSetResponder={[Function]}
|
|
62
|
-
style={
|
|
63
|
-
Array [
|
|
64
|
-
Object {
|
|
65
|
-
"alignItems": "center",
|
|
66
|
-
"backgroundColor": "transparent",
|
|
67
|
-
"borderColor": "hsl(210, 10%, 58%)",
|
|
68
|
-
"borderRadius": 4,
|
|
69
|
-
"borderWidth": 1,
|
|
70
|
-
"justifyContent": "center",
|
|
71
|
-
"paddingHorizontal": 16,
|
|
72
|
-
"paddingVertical": 12,
|
|
73
|
-
},
|
|
74
|
-
undefined,
|
|
75
|
-
undefined,
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
testID="testButton"
|
|
79
|
-
/>
|
|
80
|
-
</View>
|
|
81
|
-
</RCTScrollView>
|
|
82
|
-
</View>
|
|
83
|
-
`;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react-native';
|
|
3
|
-
|
|
4
|
-
import { DefaultFooter } from '..';
|
|
5
|
-
import { Button } from '../../../../primitives/Button';
|
|
6
|
-
|
|
7
|
-
describe('DefaultFooter', () => {
|
|
8
|
-
it('renders as expected with children', () => {
|
|
9
|
-
const testID = 'testButton';
|
|
10
|
-
const { toJSON, getByTestId } = render(
|
|
11
|
-
<DefaultFooter>
|
|
12
|
-
<Button testID={testID} />
|
|
13
|
-
</DefaultFooter>
|
|
14
|
-
);
|
|
15
|
-
expect(toJSON()).toMatchSnapshot();
|
|
16
|
-
|
|
17
|
-
expect(getByTestId(testID)).toBeDefined();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('renders as expected without children', () => {
|
|
21
|
-
const { toJSON } = render(<DefaultFooter />);
|
|
22
|
-
expect(toJSON()).toMatchSnapshot();
|
|
23
|
-
|
|
24
|
-
expect(toJSON()).toBe(null);
|
|
25
|
-
});
|
|
26
|
-
});
|
package/src/Authenticator/common/DefaultFooter/__tests__/__snapshots__/DefaultFooter.spec.tsx.snap
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`DefaultFooter renders as expected with children 1`] = `
|
|
4
|
-
<View>
|
|
5
|
-
<View
|
|
6
|
-
accessibilityRole="button"
|
|
7
|
-
accessible={true}
|
|
8
|
-
collapsable={false}
|
|
9
|
-
focusable={true}
|
|
10
|
-
onBlur={[Function]}
|
|
11
|
-
onClick={[Function]}
|
|
12
|
-
onFocus={[Function]}
|
|
13
|
-
onResponderGrant={[Function]}
|
|
14
|
-
onResponderMove={[Function]}
|
|
15
|
-
onResponderRelease={[Function]}
|
|
16
|
-
onResponderTerminate={[Function]}
|
|
17
|
-
onResponderTerminationRequest={[Function]}
|
|
18
|
-
onStartShouldSetResponder={[Function]}
|
|
19
|
-
style={
|
|
20
|
-
Array [
|
|
21
|
-
Object {
|
|
22
|
-
"alignItems": "center",
|
|
23
|
-
"backgroundColor": "transparent",
|
|
24
|
-
"borderColor": "hsl(210, 10%, 58%)",
|
|
25
|
-
"borderRadius": 4,
|
|
26
|
-
"borderWidth": 1,
|
|
27
|
-
"justifyContent": "center",
|
|
28
|
-
"paddingHorizontal": 16,
|
|
29
|
-
"paddingVertical": 12,
|
|
30
|
-
},
|
|
31
|
-
undefined,
|
|
32
|
-
undefined,
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
testID="testButton"
|
|
36
|
-
/>
|
|
37
|
-
</View>
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
exports[`DefaultFooter renders as expected without children 1`] = `null`;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react-native';
|
|
3
|
-
|
|
4
|
-
import DefaultFormFields from '../DefaultTextFormFields';
|
|
5
|
-
|
|
6
|
-
describe('DefaultFormFields', () => {
|
|
7
|
-
it('renders as expected', () => {
|
|
8
|
-
const { toJSON } = render(
|
|
9
|
-
<DefaultFormFields fields={[]} isPending={false} />
|
|
10
|
-
);
|
|
11
|
-
expect(toJSON()).toMatchSnapshot();
|
|
12
|
-
|
|
13
|
-
expect(toJSON()).toBeDefined();
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react-native';
|
|
3
|
-
|
|
4
|
-
import { FieldErrors } from '../FieldErrors';
|
|
5
|
-
|
|
6
|
-
describe('FieldErrors', () => {
|
|
7
|
-
it('renders as expected', () => {
|
|
8
|
-
const errors = ['error 1', 'error 2'];
|
|
9
|
-
const { toJSON, findByText } = render(
|
|
10
|
-
<FieldErrors
|
|
11
|
-
errors={errors}
|
|
12
|
-
errorStyle={{ color: 'red' }}
|
|
13
|
-
style={{ backgroundColor: 'black' }}
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
expect(findByText('error 1')).toBeDefined();
|
|
18
|
-
expect(findByText('error 2')).toBeDefined();
|
|
19
|
-
|
|
20
|
-
expect(toJSON()).toMatchSnapshot();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it('renders as expected with no errors', () => {
|
|
24
|
-
const { toJSON } = render(<FieldErrors errors={[]} />);
|
|
25
|
-
expect(toJSON()).toMatchSnapshot();
|
|
26
|
-
|
|
27
|
-
expect(toJSON()).toBe(null);
|
|
28
|
-
});
|
|
29
|
-
});
|
package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/FieldErrors.spec.tsx.snap
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`FieldErrors renders as expected 1`] = `
|
|
4
|
-
<View
|
|
5
|
-
style={
|
|
6
|
-
Object {
|
|
7
|
-
"backgroundColor": "black",
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
>
|
|
11
|
-
<Text
|
|
12
|
-
style={
|
|
13
|
-
Object {
|
|
14
|
-
"color": "red",
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
>
|
|
18
|
-
error 1
|
|
19
|
-
</Text>
|
|
20
|
-
<Text
|
|
21
|
-
style={
|
|
22
|
-
Object {
|
|
23
|
-
"color": "red",
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
>
|
|
27
|
-
error 2
|
|
28
|
-
</Text>
|
|
29
|
-
</View>
|
|
30
|
-
`;
|
|
31
|
-
|
|
32
|
-
exports[`FieldErrors renders as expected with no errors 1`] = `null`;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react-native';
|
|
3
|
-
|
|
4
|
-
import { DefaultHeader } from '..';
|
|
5
|
-
|
|
6
|
-
const heading = 'test';
|
|
7
|
-
|
|
8
|
-
describe('DefaultHeader', () => {
|
|
9
|
-
it('renders as expected with children', () => {
|
|
10
|
-
const { toJSON, getByRole, getByText } = render(
|
|
11
|
-
<DefaultHeader>{heading}</DefaultHeader>
|
|
12
|
-
);
|
|
13
|
-
expect(toJSON()).toMatchSnapshot();
|
|
14
|
-
|
|
15
|
-
expect(getByRole('header')).toBeDefined();
|
|
16
|
-
expect(getByText(heading)).toBeDefined();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('renders as expected without children', () => {
|
|
20
|
-
const { toJSON } = render(<DefaultHeader />);
|
|
21
|
-
expect(toJSON()).toMatchSnapshot();
|
|
22
|
-
});
|
|
23
|
-
});
|
package/src/Authenticator/common/DefaultHeader/__tests__/__snapshots__/DefaultHeader.spec.tsx.snap
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`DefaultHeader renders as expected with children 1`] = `
|
|
4
|
-
<Text
|
|
5
|
-
accessibilityRole="header"
|
|
6
|
-
style={
|
|
7
|
-
Array [
|
|
8
|
-
Object {
|
|
9
|
-
"color": "hsl(210, 50%, 10%)",
|
|
10
|
-
},
|
|
11
|
-
Object {
|
|
12
|
-
"fontSize": 24,
|
|
13
|
-
"fontWeight": "500",
|
|
14
|
-
"lineHeight": 36,
|
|
15
|
-
},
|
|
16
|
-
undefined,
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
>
|
|
20
|
-
test
|
|
21
|
-
</Text>
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
exports[`DefaultHeader renders as expected without children 1`] = `null`;
|