Skip to content

Commit

Permalink
chore: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stackchain committed Sep 23, 2022
1 parent 3e128e4 commit e95328b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/Settings/EasyConfirmation/EnableEasyConfirmationScreen.tsx
Expand Up @@ -19,7 +19,7 @@ export const EnableEasyConfirmationScreen = () => {
const intl = useIntl()
const strings = useStrings()
const navigation = useNavigation()
const [rootPassword, setMasterPassword] = React.useState('')
const [rootPassword, setRootPassword] = React.useState('')
const walletMeta = useSelectedWalletMeta()
const setSelectedWalletMeta = useSetSelectedWalletMeta()
const wallet = useSelectedWallet()
Expand Down Expand Up @@ -72,8 +72,8 @@ export const EnableEasyConfirmationScreen = () => {
enablesReturnKeyAutomatically
returnKeyType="done"
secureTextEntry
label={strings.enableMasterPassword}
onChangeText={setMasterPassword}
label={strings.enableRootPassword}
onChangeText={setRootPassword}
value={rootPassword}
autoComplete={false}
/>
Expand All @@ -98,7 +98,7 @@ const useStrings = () => {
return {
enableHeading: intl.formatMessage(messages.enableHeading),
enableWarning: intl.formatMessage(messages.enableWarning),
enableMasterPassword: intl.formatMessage(messages.enableMasterPassword),
enableRootPassword: intl.formatMessage(messages.enableRootPassword),
enableButton: intl.formatMessage(messages.enableButton),
}
}
Expand All @@ -119,7 +119,7 @@ const messages = defineMessages({
'!!!Please remember your master password, as you may need it ' +
'in case your biometrics data are removed from the device.',
},
enableMasterPassword: {
enableRootPassword: {
id: 'components.settings.enableeasyconfirmationscreen.enableMasterPassword',
defaultMessage: '!!!Master password',
},
Expand Down
6 changes: 3 additions & 3 deletions src/auth/authOS.test.ts
Expand Up @@ -3,7 +3,7 @@ import Keychain from 'react-native-keychain'

import {isOSAuthSupported} from './authOS'

let mockedBioType = 'ios'
let mockedBioType = Keychain.BIOMETRY_TYPE.FINGERPRINT
let mockedCanImply = true
jest.mock('react-native-keychain', () => {
return {
Expand All @@ -27,8 +27,8 @@ describe('isOSAuthSupported()', () => {
it.each`
expected | bioType
${true} | ${Keychain.BIOMETRY_TYPE.FINGERPRINT}
${false} | ${Keychain.BIOMETRY_TYPE.IRIS}
${false} | ${Keychain.BIOMETRY_TYPE.FACE}
${true} | ${Keychain.BIOMETRY_TYPE.IRIS}
${true} | ${Keychain.BIOMETRY_TYPE.FACE}
`('should return $expected when type is $bioType', async ({expected, bioType}) => {
Platform.select = jest.fn((objs) => objs['android'])
mockedBioType = bioType
Expand Down

0 comments on commit e95328b

Please sign in to comment.