Skip to content

Commit

Permalink
Added ErrorTypography selector for QA (#764)
Browse files Browse the repository at this point in the history
* Added ErrorTypography selector for QA

* added error message when creating a wallet with a bad seed

* added title

---------

Co-authored-by: jormel <[email protected]>
  • Loading branch information
Freshenext and jormelCoin authored Oct 5, 2023
1 parent 8c9cff3 commit 132a451
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/components/token/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ interface Props {
amIReceiver?: boolean
}

enum TestID {
ErrorTypography = 'ErrorTypography',
}

export const TokenBalance = ({
firstValue,
secondValue,
Expand Down Expand Up @@ -133,7 +137,10 @@ export const TokenBalance = ({
</Typography>
)}
{error && (
<Typography type="body2" style={styles.error}>
<Typography
type="body2"
style={styles.error}
accessibilityLabel={TestID.ErrorTypography}>
{error}
</Typography>
)}
Expand Down
5 changes: 4 additions & 1 deletion src/screens/createKeys/import/ImportMasterKeyScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ export const ImportMasterKeyScreen = (
return (
<FormProvider {...form}>
<ScrollView style={styles.parent} keyboardShouldPersistTaps={'always'}>
<Typography style={styles.titleText} type="h3">
<Typography
style={styles.titleText}
type="h3"
accessibilityLabel={StatusActions.ERROR}>
{t(headerTextMap.get(status))}
</Typography>
<View
Expand Down
5 changes: 4 additions & 1 deletion src/screens/pinScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,10 @@ export const PinScreen = ({ navigation, route }: Props) => {
) : (
<>
{hasError && errorTimeout()}
<Typography style={styles.title} type="h2">
<Typography
style={styles.title}
type="h2"
accessibilityLabel={'new_pin'}>
{hasError ? t('pin_screen_wrong_pin') : title}
</Typography>
{hasError ? (
Expand Down

0 comments on commit 132a451

Please sign in to comment.