Skip to content

Commit

Permalink
test: add testId to inline error message for automated test purpose (#…
Browse files Browse the repository at this point in the history
…1346)

Signed-off-by: fc-santos <[email protected]>
  • Loading branch information
fc-santos authored Dec 5, 2024
1 parent 9e81308 commit 5faac1d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { View, StyleSheet, Text } from 'react-native'
import { useTheme } from '../../contexts/theme'
import { SvgProps } from 'react-native-svg'
import { InlineErrorConfig } from '../../types/error'
import { testIdWithKey } from '../../utils/testable'

export enum InlineErrorType {
error,
Expand Down Expand Up @@ -42,7 +43,9 @@ const InlineErrorText: React.FC<InlineMessageProps> = ({ message, inlineType, co
) : (
<InputInlineMessage.InlineErrorIcon {...props} />
)}
<Text style={[InputInlineMessage.inlineErrorText]}>{message}</Text>
<Text style={[InputInlineMessage.inlineErrorText]} testID={testIdWithKey('InlineErrorText')}>
{message}
</Text>
</View>
)
}
Expand Down

0 comments on commit 5faac1d

Please sign in to comment.