Skip to content

Commit

Permalink
US-NO-REF Added QA Selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Freshenext committed Oct 11, 2023
1 parent c5b6f8e commit 3ed8e0d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/components/input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import { Typography } from '../typography'

export { CustomInput } from './CustomInput'

enum TestID {
InputLabel = 'InputLabel',
}

export interface InputProps extends TextInputProps {
inputName: string
label?: string
Expand Down Expand Up @@ -110,7 +114,10 @@ export const Input = ({
focused || value || isReadOnly ? styles.contentPadding : null,
]}>
{label && (focused || !!value || isReadOnly) ? (
<Typography style={[styles.label, labelStyle]} type={'body3'}>
<Typography
style={[styles.label, labelStyle]}
type={'body3'}
accessibilityLabel={TestID.InputLabel}>
{label}
</Typography>
) : null}
Expand Down
11 changes: 9 additions & 2 deletions src/screens/contacts/components/ContactCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { AppTouchable, Avatar, Typography } from 'components/index'
import { castStyle } from 'shared/utils'
import { noop, sharedColors } from 'shared/constants'

enum TestID {
ContactCard = 'ContactCard',
ContactCardTypography = 'ContactCardTypography',
}

interface Props {
name: string
onPress?: () => void
Expand All @@ -15,15 +20,17 @@ export const ContactCard = ({ name, style, onPress }: Props) => {
<AppTouchable
width={100}
style={[styles.contactCard, style]}
onPress={onPress || noop}>
onPress={onPress || noop}
accessibilityLabel={TestID.ContactCard}>
<>
<Avatar size={46} name={name} />
<Typography
style={styles.contactName}
type="h4"
numberOfLines={1}
adjustsFontSizeToFit
minimumFontScale={0.85}>
minimumFontScale={0.85}
accessibilityLabel={TestID.ContactCardTypography}>
{name}
</Typography>
</>
Expand Down

0 comments on commit 3ed8e0d

Please sign in to comment.