diff --git a/packages/legacy/core/App/components/misc/CredentialCard10.tsx b/packages/legacy/core/App/components/misc/CredentialCard10.tsx index 5e32117c2..d1bbfd7f8 100644 --- a/packages/legacy/core/App/components/misc/CredentialCard10.tsx +++ b/packages/legacy/core/App/components/misc/CredentialCard10.tsx @@ -3,8 +3,7 @@ import { LegacyBrandingOverlay } from '@hyperledger/aries-oca' import { CredentialOverlay } from '@hyperledger/aries-oca/build/legacy' import React, { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Image, ImageBackground, StyleSheet, Text, View, ViewStyle, useWindowDimensions } from 'react-native' -import { TouchableOpacity } from 'react-native-gesture-handler' +import { Image, ImageBackground, StyleSheet, Text, View, ViewStyle, useWindowDimensions, TouchableOpacity } from 'react-native' import { TOKENS, useServices } from '../../container-api' import { useTheme } from '../../contexts/theme' diff --git a/packages/legacy/core/App/components/misc/CredentialCard11.tsx b/packages/legacy/core/App/components/misc/CredentialCard11.tsx index 2e45d86e9..a91346712 100644 --- a/packages/legacy/core/App/components/misc/CredentialCard11.tsx +++ b/packages/legacy/core/App/components/misc/CredentialCard11.tsx @@ -15,8 +15,8 @@ import { View, ViewStyle, useWindowDimensions, + TouchableOpacity } from 'react-native' -import { TouchableOpacity } from 'react-native-gesture-handler' import Icon from 'react-native-vector-icons/MaterialIcons' import { TOKENS, useServices } from '../../container-api' diff --git a/packages/legacy/core/App/components/misc/CredentialCard11ActionFooter.tsx b/packages/legacy/core/App/components/misc/CredentialCard11ActionFooter.tsx index a0998afd5..dd84d344c 100644 --- a/packages/legacy/core/App/components/misc/CredentialCard11ActionFooter.tsx +++ b/packages/legacy/core/App/components/misc/CredentialCard11ActionFooter.tsx @@ -1,6 +1,5 @@ import React from 'react' -import { StyleSheet, Text, View } from 'react-native' -import { TouchableOpacity } from 'react-native-gesture-handler' +import { StyleSheet, Text, View, TouchableOpacity } from 'react-native' import Icon from 'react-native-vector-icons/MaterialIcons' import { useTheme } from '../../contexts/theme' diff --git a/packages/legacy/core/App/modules/openid/components/CredentialRowCard.tsx b/packages/legacy/core/App/modules/openid/components/CredentialRowCard.tsx index edf8fe1f0..b9263a55c 100644 --- a/packages/legacy/core/App/modules/openid/components/CredentialRowCard.tsx +++ b/packages/legacy/core/App/modules/openid/components/CredentialRowCard.tsx @@ -1,5 +1,4 @@ -import { Image, StyleSheet, Text, useWindowDimensions, View } from 'react-native' -import { TouchableOpacity } from 'react-native-gesture-handler' +import { Image, StyleSheet, Text, useWindowDimensions, View, TouchableOpacity } from 'react-native' import { useTheme } from '../../../contexts/theme' interface CredentialRowCardProps { diff --git a/packages/legacy/core/App/modules/openid/components/OpenIDCredentialCard.tsx b/packages/legacy/core/App/modules/openid/components/OpenIDCredentialCard.tsx index 5a9e392b3..3a88f506f 100644 --- a/packages/legacy/core/App/modules/openid/components/OpenIDCredentialCard.tsx +++ b/packages/legacy/core/App/modules/openid/components/OpenIDCredentialCard.tsx @@ -1,5 +1,4 @@ import React, { useMemo } from 'react' -import { TouchableOpacity } from 'react-native-gesture-handler' import { CredentialDisplay, DisplayImage } from '../types' import { useTranslation } from 'react-i18next' import { GenericFn } from '../../../types/fn' @@ -12,6 +11,7 @@ import { useWindowDimensions, View, ViewStyle, + TouchableOpacity } from 'react-native' import { testIdWithKey } from '../../../utils/testable' import { credentialTextColor, toImageSource } from '../../../utils/credential' diff --git a/packages/legacy/core/App/screens/AutoLock.tsx b/packages/legacy/core/App/screens/AutoLock.tsx index 970f7fee1..b1b22682d 100644 --- a/packages/legacy/core/App/screens/AutoLock.tsx +++ b/packages/legacy/core/App/screens/AutoLock.tsx @@ -1,4 +1,4 @@ -import { Pressable, StyleSheet, Text, View } from 'react-native' +import { Pressable, StyleSheet, Text, View, FlatList } from 'react-native' import BouncyCheckbox from 'react-native-bouncy-checkbox' import { SafeAreaView } from 'react-native-safe-area-context' import Icon from 'react-native-vector-icons/MaterialIcons' @@ -7,18 +7,21 @@ import { testIdWithKey } from '../utils/testable' import { useStore } from '../contexts/store' import { DispatchAction } from '../contexts/reducers/store' import React from 'react' -import { FlatList } from 'react-native-gesture-handler' + import { useTranslation } from 'react-i18next' import { useTheme } from '../contexts/theme' type AutoLockListItem = { title: string - selected: boolean value: (typeof AutoLockTime)[keyof typeof AutoLockTime] testID: string onPress: (val: (typeof AutoLockTime)[keyof typeof AutoLockTime]) => void } +type LockoutRowProps = AutoLockListItem & { + selected: boolean +} + const AutoLock: React.FC = () => { const { t } = useTranslation() const [store, dispatch] = useStore() @@ -56,7 +59,7 @@ const AutoLock: React.FC = () => { }) } - const LockoutRow: React.FC = ({ title, value, selected, testID, onPress }) => ( + const LockoutRow: React.FC = ({ title, value, selected, testID, onPress }) => ( {title} { { title: t('AutoLockTimes.FiveMinutes'), value: AutoLockTime.FiveMinutes, - testId: `auto-lock-time-${AutoLockTime.FiveMinutes}`, + testID: `auto-lock-time-${AutoLockTime.FiveMinutes}`, onPress: handleTimeoutChange, }, { title: t('AutoLockTimes.ThreeMinutes'), value: AutoLockTime.ThreeMinutes, - testId: `auto-lock-time-${AutoLockTime.ThreeMinutes}`, + testID: `auto-lock-time-${AutoLockTime.ThreeMinutes}`, onPress: handleTimeoutChange, }, { title: t('AutoLockTimes.OneMinute'), value: AutoLockTime.OneMinute, - testId: `auto-lock-time-${AutoLockTime.OneMinute}`, + testID: `auto-lock-time-${AutoLockTime.OneMinute}`, onPress: handleTimeoutChange, }, { title: t('AutoLockTimes.Never'), value: AutoLockTime.Never, - testId: `auto-lock-time-${AutoLockTime.Never}`, + testID: `auto-lock-time-${AutoLockTime.Never}`, onPress: handleTimeoutChange, }, ]} diff --git a/packages/legacy/core/__tests__/components/__snapshots__/CredentialCard11ActionFooter.test.tsx.snap b/packages/legacy/core/__tests__/components/__snapshots__/CredentialCard11ActionFooter.test.tsx.snap index 867f6559a..a5142dac8 100644 --- a/packages/legacy/core/__tests__/components/__snapshots__/CredentialCard11ActionFooter.test.tsx.snap +++ b/packages/legacy/core/__tests__/components/__snapshots__/CredentialCard11ActionFooter.test.tsx.snap @@ -13,71 +13,87 @@ exports[`CredentialCard11ActionFooter Component Matches snapshot 1`] = ` } /> - - - + - sample - - -  - - - + ], + Object { + "fontFamily": "Material Icons", + "fontStyle": "normal", + "fontWeight": "normal", + }, + Object {}, + ] + } + > +  + + `; diff --git a/packages/legacy/core/__tests__/screens/__snapshots__/Connection.test.tsx.snap b/packages/legacy/core/__tests__/screens/__snapshots__/Connection.test.tsx.snap index efff3aa1a..3da8bc2f3 100644 --- a/packages/legacy/core/__tests__/screens/__snapshots__/Connection.test.tsx.snap +++ b/packages/legacy/core/__tests__/screens/__snapshots__/Connection.test.tsx.snap @@ -842,264 +842,280 @@ exports[`Connection Screen Valid goal code aries.vc.issue extracted, show to off ] } > - - - - + + + - + + + + - S - - - - - - - b4b1b9cd-a445-4bb3-9645-a2377471965a - - - - - Student Card - - + b4b1b9cd-a445-4bb3-9645-a2377471965a + - } - data={Array []} - getItem={[Function]} - getItemCount={[Function]} - initialNumToRender={0} - keyExtractor={[Function]} - onContentSizeChange={[Function]} - onLayout={[Function]} - onMomentumScrollBegin={[Function]} - onMomentumScrollEnd={[Function]} - onScroll={[Function]} - onScrollBeginDrag={[Function]} - onScrollEndDrag={[Function]} - removeClippedSubviews={false} - renderItem={[Function]} - scrollEnabled={false} - scrollEventThrottle={50} - stickyHeaderIndices={Array []} - viewabilityConfigCallbackPairs={Array []} > - + + Student Card + + } + data={Array []} + getItem={[Function]} + getItemCount={[Function]} + initialNumToRender={0} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEnabled={false} + scrollEventThrottle={50} + stickyHeaderIndices={Array []} + viewabilityConfigCallbackPairs={Array []} > + + + - + diff --git a/packages/legacy/core/__tests__/screens/__snapshots__/CredentialOffer.test.tsx.snap b/packages/legacy/core/__tests__/screens/__snapshots__/CredentialOffer.test.tsx.snap index a8b0a4f6c..89089cc03 100644 --- a/packages/legacy/core/__tests__/screens/__snapshots__/CredentialOffer.test.tsx.snap +++ b/packages/legacy/core/__tests__/screens/__snapshots__/CredentialOffer.test.tsx.snap @@ -318,264 +318,280 @@ exports[`CredentialOffer Screen accepting a credential 1`] = ` ] } > - - - - + + + - + + + + - C - - - - - - - faber.agent - - - - - Credential - - + faber.agent + - } - data={Array []} - getItem={[Function]} - getItemCount={[Function]} - initialNumToRender={0} - keyExtractor={[Function]} - onContentSizeChange={[Function]} - onLayout={[Function]} - onMomentumScrollBegin={[Function]} - onMomentumScrollEnd={[Function]} - onScroll={[Function]} - onScrollBeginDrag={[Function]} - onScrollEndDrag={[Function]} - removeClippedSubviews={false} - renderItem={[Function]} - scrollEnabled={false} - scrollEventThrottle={50} - stickyHeaderIndices={Array []} - viewabilityConfigCallbackPairs={Array []} > - + + Credential + + } + data={Array []} + getItem={[Function]} + getItemCount={[Function]} + initialNumToRender={0} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEnabled={false} + scrollEventThrottle={50} + stickyHeaderIndices={Array []} + viewabilityConfigCallbackPairs={Array []} > + + + - + @@ -1704,264 +1720,280 @@ exports[`CredentialOffer Screen declining a credential 1`] = ` ] } > - - - - + + + - + + + + - C - - - - - - - faber.agent - - - - - Credential - - + faber.agent + - } - data={Array []} - getItem={[Function]} - getItemCount={[Function]} - initialNumToRender={0} - keyExtractor={[Function]} - onContentSizeChange={[Function]} - onLayout={[Function]} - onMomentumScrollBegin={[Function]} - onMomentumScrollEnd={[Function]} - onScroll={[Function]} - onScrollBeginDrag={[Function]} - onScrollEndDrag={[Function]} - removeClippedSubviews={false} - renderItem={[Function]} - scrollEnabled={false} - scrollEventThrottle={50} - stickyHeaderIndices={Array []} - viewabilityConfigCallbackPairs={Array []} > - + + Credential + + } + data={Array []} + getItem={[Function]} + getItemCount={[Function]} + initialNumToRender={0} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEnabled={false} + scrollEventThrottle={50} + stickyHeaderIndices={Array []} + viewabilityConfigCallbackPairs={Array []} > + + + - + @@ -3315,264 +3347,280 @@ exports[`CredentialOffer Screen renders correctly 1`] = ` ] } > - - - - + + + - + + + + - C - - - - - - - faber.agent - - - - - Credential - - + faber.agent + - } - data={Array []} - getItem={[Function]} - getItemCount={[Function]} - initialNumToRender={0} - keyExtractor={[Function]} - onContentSizeChange={[Function]} - onLayout={[Function]} - onMomentumScrollBegin={[Function]} - onMomentumScrollEnd={[Function]} - onScroll={[Function]} - onScrollBeginDrag={[Function]} - onScrollEndDrag={[Function]} - removeClippedSubviews={false} - renderItem={[Function]} - scrollEnabled={false} - scrollEventThrottle={50} - stickyHeaderIndices={Array []} - viewabilityConfigCallbackPairs={Array []} > - + + Credential + + } + data={Array []} + getItem={[Function]} + getItemCount={[Function]} + initialNumToRender={0} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEnabled={false} + scrollEventThrottle={50} + stickyHeaderIndices={Array []} + viewabilityConfigCallbackPairs={Array []} > + + + - + diff --git a/packages/legacy/core/__tests__/screens/__snapshots__/W3cProofRequest.test.tsx.snap b/packages/legacy/core/__tests__/screens/__snapshots__/W3cProofRequest.test.tsx.snap index 6e844b305..38afb08e5 100644 --- a/packages/legacy/core/__tests__/screens/__snapshots__/W3cProofRequest.test.tsx.snap +++ b/packages/legacy/core/__tests__/screens/__snapshots__/W3cProofRequest.test.tsx.snap @@ -295,343 +295,359 @@ exports[`displays a proof request screen ProofRequest Screen, W3C displays a pro ] } > - - + - + - - C - - - + + - - - - Credential - - - + } + testID="com.ariesbifold:id/CredentialCardPrimaryBody" + > + -  - - - ProofRequest.NotAvailableInYourWallet + Credential - } - data={ + + + +  + + + ProofRequest.NotAvailableInYourWallet + + + } + data={ + Array [ + Object { + "credentialId": "Credential", + "encoding": undefined, + "format": undefined, + "label": undefined, + "mimeType": undefined, + "name": "age", + "nonRevoked": undefined, + "pType": "<=", + "pValue": 18, + "parameterizable": undefined, + "restrictions": undefined, + "revoked": false, + "satisfied": false, + "type": undefined, + }, + ] + } + getItem={[Function]} + getItemCount={[Function]} + initialNumToRender={1} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEnabled={false} + scrollEventThrottle={50} + stickyHeaderIndices={Array []} + viewabilityConfigCallbackPairs={Array []} + > + - +  + + - -  - - - Age - - + Age + - + + + - - + } + /> - + @@ -830,416 +846,432 @@ exports[`displays a proof request screen ProofRequest Screen, W3C displays a pro ] } > - - + - + - + + + + - L - + + Latest + + + } + data={ + Array [ + Attribute { + "credentialId": "8eba4449-8a85-4954-b11c-e0590f39cbdb", + "encoding": undefined, + "format": undefined, + "hasError": undefined, + "label": undefined, + "mimeType": undefined, + "name": "email", + "nonRevoked": undefined, + "restrictions": Array [ + Object { + "cred_def_id": "did:indy:bcovrin:test:TfuPA6whW681GfU6fj1e3k/anoncreds/v0/CLAIM_DEF/462230/latest", + "schema_id": "did:indy:bcovrin:test:TfuPA6whW681GfU6fj1e3k/anoncreds/v0/SCHEMA/Identity Schemaaf92af92-524d-41b6-bee8-00fb45e8eb6c/1.0.0", + }, + ], + "revealed": undefined, + "revoked": false, + "type": undefined, + "value": "test@email.com", + }, + Attribute { + "credentialId": "8eba4449-8a85-4954-b11c-e0590f39cbdb", + "encoding": undefined, + "format": undefined, + "hasError": undefined, + "label": undefined, + "mimeType": undefined, + "name": "time", + "nonRevoked": undefined, + "restrictions": Array [ + Object { + "cred_def_id": "did:indy:bcovrin:test:TfuPA6whW681GfU6fj1e3k/anoncreds/v0/CLAIM_DEF/462230/latest", + "schema_id": "did:indy:bcovrin:test:TfuPA6whW681GfU6fj1e3k/anoncreds/v0/SCHEMA/Identity Schemaaf92af92-524d-41b6-bee8-00fb45e8eb6c/1.0.0", + }, + ], + "revealed": undefined, + "revoked": false, + "type": undefined, + "value": "2022-02-11 20:00:18.180718", + }, + ] + } + getItem={[Function]} + getItemCount={[Function]} + initialNumToRender={2} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEnabled={false} + scrollEventThrottle={50} + stickyHeaderIndices={Array []} + viewabilityConfigCallbackPairs={Array []} > - + - - Latest - + + Email + + + + + test@email.com + + - } - data={ - Array [ - Attribute { - "credentialId": "8eba4449-8a85-4954-b11c-e0590f39cbdb", - "encoding": undefined, - "format": undefined, - "hasError": undefined, - "label": undefined, - "mimeType": undefined, - "name": "email", - "nonRevoked": undefined, - "restrictions": Array [ - Object { - "cred_def_id": "did:indy:bcovrin:test:TfuPA6whW681GfU6fj1e3k/anoncreds/v0/CLAIM_DEF/462230/latest", - "schema_id": "did:indy:bcovrin:test:TfuPA6whW681GfU6fj1e3k/anoncreds/v0/SCHEMA/Identity Schemaaf92af92-524d-41b6-bee8-00fb45e8eb6c/1.0.0", - }, - ], - "revealed": undefined, - "revoked": false, - "type": undefined, - "value": "test@email.com", - }, - Attribute { - "credentialId": "8eba4449-8a85-4954-b11c-e0590f39cbdb", - "encoding": undefined, - "format": undefined, - "hasError": undefined, - "label": undefined, - "mimeType": undefined, - "name": "time", - "nonRevoked": undefined, - "restrictions": Array [ - Object { - "cred_def_id": "did:indy:bcovrin:test:TfuPA6whW681GfU6fj1e3k/anoncreds/v0/CLAIM_DEF/462230/latest", - "schema_id": "did:indy:bcovrin:test:TfuPA6whW681GfU6fj1e3k/anoncreds/v0/SCHEMA/Identity Schemaaf92af92-524d-41b6-bee8-00fb45e8eb6c/1.0.0", - }, - ], - "revealed": undefined, - "revoked": false, - "type": undefined, - "value": "2022-02-11 20:00:18.180718", - }, - ] - } - getItem={[Function]} - getItemCount={[Function]} - initialNumToRender={2} - keyExtractor={[Function]} - onContentSizeChange={[Function]} + onFocusCapture={[Function]} onLayout={[Function]} - onMomentumScrollBegin={[Function]} - onMomentumScrollEnd={[Function]} - onScroll={[Function]} - onScrollBeginDrag={[Function]} - onScrollEndDrag={[Function]} - removeClippedSubviews={false} - renderItem={[Function]} - scrollEnabled={false} - scrollEventThrottle={50} - stickyHeaderIndices={Array []} - viewabilityConfigCallbackPairs={Array []} + style={null} > - - - Email - - - - - test@email.com - - + Time + - - - - - Time - - - - - 2022-02-11 20:00:18.180718 - - + 2022-02-11 20:00:18.180718 + - + + + - - + } + /> - +