Skip to content

Commit

Permalink
feat: changed order of mobile verifier buttons (#1032)
Browse files Browse the repository at this point in the history
Signed-off-by: wadeking98 <[email protected]>
  • Loading branch information
wadeking98 authored Nov 23, 2023
1 parent 14da5e1 commit 23cd8a4
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
1 change: 1 addition & 0 deletions packages/legacy/core/App/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ const translation = {
"Parameterizable": "Parameterizable",
"RefreshQR": "Refresh QR Code",
"GenerateNewQR": "Request another proof",
"BackToList": "Back to list",
"ShareLink": "Share link",
"ScanQR": "Show this QR code to the other person",
"ScanQRComment": "After the QR code is scanned, a proof request will be sent.",
Expand Down
1 change: 1 addition & 0 deletions packages/legacy/core/App/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ const translation = {
"Parameterizable": "Paramétrable",
"RefreshQR": "Refresh QR Code (FR)",
"GenerateNewQR": "Request another proof (FR)",
"BackToList": "Back to list (FR)",
"ShareLink": "Lien de partage",
"ScanQR": "Show this QR code to the other person (FR)",
"ScanQRComment": "After the QR code is scanned, a proof request will be sent. (FR)",
Expand Down
1 change: 1 addition & 0 deletions packages/legacy/core/App/localization/pt-br/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ const translation = {
"Parameterizable": "Parametrizável",
"RefreshQR": "Atualizar QR Code",
"GenerateNewQR": "Requisitar outra prova",
"BackToList": "Back to list (PB)",
"ShareLink": "Compartilhar link",
"ScanQR": "Mostrar este QR code para a outra pessoa",
"ScanQRComment": "Depois do QR code ser scaneado, a requisição de prova será enviada.",
Expand Down
18 changes: 9 additions & 9 deletions packages/legacy/core/App/screens/ProofDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const VerifiedProof: React.FC<VerifiedProofProps> = ({
}
}, [navigation])

const onDone = useCallback(() => {
const onBack = useCallback(() => {
navigation.navigate(Screens.ProofRequests, {})
}, [navigation])

Expand Down Expand Up @@ -178,19 +178,19 @@ const VerifiedProof: React.FC<VerifiedProofProps> = ({
<View style={styles.footerButton}>
<View style={{ marginBottom: 15 }}>
<Button
title={t('Global.Done')}
accessibilityLabel={t('Global.Done')}
testID={testIdWithKey('Done')}
title={t('Verifier.GenerateNewQR')}
accessibilityLabel={t('Verifier.GenerateNewQR')}
testID={testIdWithKey('GenerateNewQR')}
buttonType={ButtonType.Primary}
onPress={onDone}
onPress={onGenerateNew}
/>
</View>
<Button
title={t('Verifier.GenerateNewQR')}
accessibilityLabel={t('Verifier.GenerateNewQR')}
testID={testIdWithKey('GenerateNewQR')}
title={t('Verifier.BackToList')}
accessibilityLabel={t('Verifier.BackToList')}
testID={testIdWithKey('BackToList')}
buttonType={ButtonType.Secondary}
onPress={onGenerateNew}
onPress={onBack}
/>
</View>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ describe('ProofDetails Component', () => {
const navigation = useNavigation()
const { findByTestId } = renderView({ recordId: testVerifiedProofRequest.id, isHistory: false })

const doneButton = await findByTestId(testIdWithKey('Done'))
const doneButton = await findByTestId(testIdWithKey('BackToList'))
fireEvent(doneButton, 'press')

expect(doneButton).not.toBeNull()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ exports[`ProofDetails Component with a verified proof record renders correctly w
}
>
<View
accessibilityLabel="Global.Done"
accessibilityLabel="Verifier.GenerateNewQR"
accessibilityRole="button"
accessibilityState={
Object {
Expand Down Expand Up @@ -455,7 +455,7 @@ exports[`ProofDetails Component with a verified proof record renders correctly w
"padding": 16,
}
}
testID="com.ariesbifold:id/Done"
testID="com.ariesbifold:id/GenerateNewQR"
>
<View
style={
Expand All @@ -481,13 +481,13 @@ exports[`ProofDetails Component with a verified proof record renders correctly w
]
}
>
Global.Done
Verifier.GenerateNewQR
</Text>
</View>
</View>
</View>
<View
accessibilityLabel="Verifier.GenerateNewQR"
accessibilityLabel="Verifier.BackToList"
accessibilityRole="button"
accessibilityState={
Object {
Expand Down Expand Up @@ -525,7 +525,7 @@ exports[`ProofDetails Component with a verified proof record renders correctly w
"padding": 16,
}
}
testID="com.ariesbifold:id/GenerateNewQR"
testID="com.ariesbifold:id/BackToList"
>
<View
style={
Expand All @@ -551,7 +551,7 @@ exports[`ProofDetails Component with a verified proof record renders correctly w
]
}
>
Verifier.GenerateNewQR
Verifier.BackToList
</Text>
</View>
</View>
Expand Down

0 comments on commit 23cd8a4

Please sign in to comment.