diff --git a/app/containers/ActionSheet/ActionSheet.tsx b/app/containers/ActionSheet/ActionSheet.tsx
index 673e515a1..97d233940 100644
--- a/app/containers/ActionSheet/ActionSheet.tsx
+++ b/app/containers/ActionSheet/ActionSheet.tsx
@@ -18,6 +18,7 @@ import { Handle } from './Handle';
import { IActionSheetItem, Item } from './Item';
import { TActionSheetOptions, TActionSheetOptionsItem } from './Provider';
import styles, { ITEM_HEIGHT } from './styles';
+import { testProps } from '../../lib/methods/testProps';
const getItemLayout = (data: TActionSheetOptionsItem[] | null | undefined, index: number) => ({
length: ITEM_HEIGHT,
@@ -152,7 +153,7 @@ const ActionSheet = React.memo(
<>
- testID='action-sheet'
+ {...testProps('action-sheet')}
ref={bottomSheetRef}
componentType='FlatList'
snapPoints={snaps}
diff --git a/app/containers/ActionSheet/Handle.tsx b/app/containers/ActionSheet/Handle.tsx
index 650d44ef5..4c308bf1c 100644
--- a/app/containers/ActionSheet/Handle.tsx
+++ b/app/containers/ActionSheet/Handle.tsx
@@ -4,11 +4,12 @@ import { View } from 'react-native';
import styles from './styles';
import { themes } from '../../lib/constants';
import { useTheme } from '../../theme';
+import { testProps } from '../../lib/methods/testProps';
export const Handle = React.memo(() => {
const { theme } = useTheme();
return (
-
+
);
diff --git a/app/containers/ActionSheet/Item.tsx b/app/containers/ActionSheet/Item.tsx
index 1a1627006..8f6c8a4a9 100644
--- a/app/containers/ActionSheet/Item.tsx
+++ b/app/containers/ActionSheet/Item.tsx
@@ -3,6 +3,7 @@ import { Text, View } from 'react-native';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
+import { testProps } from '../../lib/methods/testProps';
import { useTheme } from '../../theme';
import { Button } from './Button';
import styles from './styles';
@@ -31,7 +32,7 @@ export const Item = React.memo(({ item, hide }: IActionSheetItem) => {
onPress={onPress}
style={[styles.item, { backgroundColor: themes[theme].focusedBackground }]}
theme={theme}
- testID={item.testID}>
+ {...testProps(item.testID || '')}>
+
{image}
{children}
diff --git a/app/containers/Button/index.tsx b/app/containers/Button/index.tsx
index dd29a0da6..bb09dbde3 100644
--- a/app/containers/Button/index.tsx
+++ b/app/containers/Button/index.tsx
@@ -3,6 +3,7 @@ import { ButtonProps, StyleSheet, Text } from 'react-native';
import Touchable from 'react-native-platform-touchable';
import { themes } from '../../lib/constants';
+import { testProps } from '../../lib/methods/testProps';
import sharedStyles from '../../views/Styles';
import ActivityIndicator from '../ActivityIndicator';
@@ -49,8 +50,21 @@ export default class Button extends React.PureComponent, a
};
render() {
- const { title, type, onPress, disabled, backgroundColor, color, loading, style, theme, fontSize, styleText, ...otherProps } =
- this.props;
+ const {
+ title,
+ type,
+ onPress,
+ disabled,
+ backgroundColor,
+ color,
+ loading,
+ style,
+ theme,
+ fontSize,
+ styleText,
+ testID,
+ ...otherProps
+ } = this.props;
const isPrimary = type === 'primary';
let textColor = isPrimary ? themes[theme!].buttonText : themes[theme!].bodyText;
@@ -70,8 +84,8 @@ export default class Button extends React.PureComponent, a
disabled && styles.disabled,
style
]}
- accessibilityLabel={title}
- {...otherProps}>
+ {...otherProps}
+ {...testProps((testID || title) as string)}>
{loading ? (
) : (
diff --git a/app/containers/DirectoryItem/index.tsx b/app/containers/DirectoryItem/index.tsx
index 14d4c361d..1fd160f50 100644
--- a/app/containers/DirectoryItem/index.tsx
+++ b/app/containers/DirectoryItem/index.tsx
@@ -7,6 +7,7 @@ import RoomTypeIcon from '../RoomTypeIcon';
import styles, { ROW_HEIGHT } from './styles';
import { themes } from '../../lib/constants';
import { useTheme } from '../../theme';
+import { testProps } from '../../lib/methods/testProps';
export { ROW_HEIGHT };
@@ -49,7 +50,7 @@ const DirectoryItem = ({
}: IDirectoryItem): React.ReactElement => {
const { theme } = useTheme();
return (
-
+
diff --git a/app/containers/EmojiPicker/EmojiCategory.tsx b/app/containers/EmojiPicker/EmojiCategory.tsx
index 391c9fc70..ca90a36da 100644
--- a/app/containers/EmojiPicker/EmojiCategory.tsx
+++ b/app/containers/EmojiPicker/EmojiCategory.tsx
@@ -6,6 +6,7 @@ import styles from './styles';
import CustomEmoji from './CustomEmoji';
import scrollPersistTaps from '../../utils/scrollPersistTaps';
import { IEmoji, IEmojiCategory } from '../../definitions/IEmoji';
+import { testProps } from '../../lib/methods/testProps';
const EMOJI_SIZE = 50;
@@ -34,7 +35,7 @@ class EmojiCategory extends React.Component> {
activeOpacity={0.7}
key={emoji && emoji.isCustom ? emoji.content : emoji}
onPress={() => onEmojiSelected!(emoji)}
- testID={`reaction-picker-${emoji && emoji.isCustom ? emoji.content : emoji}`}>
+ {...testProps(`reaction-picker-${emoji && emoji.isCustom ? emoji.content : emoji}`)}>
{renderEmoji(emoji, EMOJI_SIZE, baseUrl!)}
);
diff --git a/app/containers/EmojiPicker/TabBar.tsx b/app/containers/EmojiPicker/TabBar.tsx
index 240c56ecd..43dbecf5d 100644
--- a/app/containers/EmojiPicker/TabBar.tsx
+++ b/app/containers/EmojiPicker/TabBar.tsx
@@ -3,6 +3,7 @@ import { Text, TouchableOpacity, View } from 'react-native';
import styles from './styles';
import { themes } from '../../lib/constants';
+import { testProps } from '../../lib/methods/testProps';
interface ITabBarProps {
goToPage: Function;
@@ -35,7 +36,7 @@ export default class TabBar extends React.Component> {
key={tab}
onPress={() => goToPage!(i)}
style={styles.tab}
- testID={`reaction-picker-${tab}`}>
+ {...testProps(`reaction-picker-${tab}`)}>
{tab}
{activeTab === i ? (
diff --git a/app/containers/FormContainer.tsx b/app/containers/FormContainer.tsx
index 3cdf0de7f..ab494e8a2 100644
--- a/app/containers/FormContainer.tsx
+++ b/app/containers/FormContainer.tsx
@@ -10,6 +10,7 @@ import StatusBar from './StatusBar';
import AppVersion from './AppVersion';
import { isTablet } from '../utils/deviceInfo';
import SafeAreaView from './SafeAreaView';
+import { testProps } from '../lib/methods/testProps';
interface IFormContainer extends ScrollViewProps {
testID: string;
@@ -40,7 +41,7 @@ const FormContainer = ({ children, testID, ...props }: IFormContainer) => {
contentContainerStyle={[sharedStyles.containerScrollView, styles.scrollView]}
{...scrollPersistTaps}
{...props}>
-
+
{children}
diff --git a/app/containers/HeaderButton/Common.tsx b/app/containers/HeaderButton/Common.tsx
index 50206f836..e54b5c291 100644
--- a/app/containers/HeaderButton/Common.tsx
+++ b/app/containers/HeaderButton/Common.tsx
@@ -4,6 +4,7 @@ import { isIOS } from '../../utils/deviceInfo';
import I18n from '../../i18n';
import Container from './HeaderButtonContainer';
import Item from './HeaderButtonItem';
+import { testProps } from '../../lib/methods/testProps';
interface IHeaderButtonCommon {
navigation?: any; // TODO: Evaluate proper type
@@ -15,7 +16,7 @@ interface IHeaderButtonCommon {
export const Drawer = React.memo(
({ navigation, testID, onPress = () => navigation?.toggleDrawer(), ...props }: IHeaderButtonCommon) => (
-
+
)
);
@@ -23,7 +24,7 @@ export const Drawer = React.memo(
export const CloseModal = React.memo(
({ navigation, testID, onPress = () => navigation?.pop(), ...props }: IHeaderButtonCommon) => (
-
+
)
);
@@ -31,9 +32,9 @@ export const CloseModal = React.memo(
export const CancelModal = React.memo(({ onPress, testID }: Partial) => (
{isIOS ? (
-
+
) : (
-
+
)}
));
@@ -41,24 +42,24 @@ export const CancelModal = React.memo(({ onPress, testID }: Partial) => (
-
+
));
export const Download = React.memo(({ onPress, testID, ...props }: IHeaderButtonCommon) => (
-
+
));
export const Preferences = React.memo(({ onPress, testID, ...props }: IHeaderButtonCommon) => (
-
+
));
export const Legal = React.memo(
({ navigation, testID, onPress = () => navigation?.navigate('LegalView') }: IHeaderButtonCommon) => (
-
+
)
);
diff --git a/app/containers/HeaderButton/HeaderButtonItem.tsx b/app/containers/HeaderButton/HeaderButtonItem.tsx
index 20ea46082..8c1d68e91 100644
--- a/app/containers/HeaderButton/HeaderButtonItem.tsx
+++ b/app/containers/HeaderButton/HeaderButtonItem.tsx
@@ -6,6 +6,7 @@ import { CustomIcon } from '../../lib/Icons';
import { useTheme } from '../../theme';
import { themes } from '../../lib/constants';
import sharedStyles from '../../views/Styles';
+import { testProps } from '../../lib/methods/testProps';
interface IHeaderButtonItem {
title?: string;
@@ -42,7 +43,7 @@ const styles = StyleSheet.create({
const Item = ({ title, iconName, onPress, testID, badge }: IHeaderButtonItem): React.ReactElement => {
const { theme } = useTheme();
return (
-
+
<>
{iconName ? (
diff --git a/app/containers/List/ListContainer.tsx b/app/containers/List/ListContainer.tsx
index 349c71bee..8228aab23 100644
--- a/app/containers/List/ListContainer.tsx
+++ b/app/containers/List/ListContainer.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import { ScrollView, StyleSheet } from 'react-native';
+import { testProps } from '../../lib/methods/testProps';
import { withTheme } from '../../theme';
import scrollPersistTaps from '../../utils/scrollPersistTaps';
@@ -19,7 +20,8 @@ const ListContainer = React.memo(({ children, ...props }: IListContainer) => (
contentContainerStyle={styles.container}
scrollIndicatorInsets={{ right: 1 }} // https://github.com/facebook/react-native/issues/26610#issuecomment-539843444
{...scrollPersistTaps}
- {...props}>
+ {...props}
+ {...testProps(props.testID || '')}>
{children}
));
diff --git a/app/containers/List/ListIcon.tsx b/app/containers/List/ListIcon.tsx
index 79e24ea66..5c2dfbda8 100644
--- a/app/containers/List/ListIcon.tsx
+++ b/app/containers/List/ListIcon.tsx
@@ -3,6 +3,7 @@ import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
+import { testProps } from '../../lib/methods/testProps';
import { useTheme } from '../../theme';
import { ICON_SIZE } from './constants';
@@ -25,7 +26,7 @@ const ListIcon = React.memo(({ name, color, style, testID }: IListIcon) => {
return (
-
+
);
});
diff --git a/app/containers/List/ListItem.tsx b/app/containers/List/ListItem.tsx
index 0fef43c2a..8d8955415 100644
--- a/app/containers/List/ListItem.tsx
+++ b/app/containers/List/ListItem.tsx
@@ -10,6 +10,7 @@ import { Icon } from '.';
import { BASE_HEIGHT, ICON_SIZE, PADDING_HORIZONTAL } from './constants';
import { useDimensions } from '../../dimensions';
import { CustomIcon } from '../../lib/Icons';
+import { testProps } from '../../lib/methods/testProps';
const styles = StyleSheet.create({
container: {
@@ -86,7 +87,9 @@ const Content = React.memo(
const { fontScale } = useDimensions();
return (
-
+
{left ? {left()} : null}
diff --git a/app/containers/Loading.tsx b/app/containers/Loading.tsx
index 93ad43be2..aa0094900 100644
--- a/app/containers/Loading.tsx
+++ b/app/containers/Loading.tsx
@@ -3,6 +3,7 @@ import { Animated, Modal, StyleSheet, View } from 'react-native';
import { withTheme } from '../theme';
import { themes } from '../lib/constants';
+import { testProps } from '../lib/methods/testProps';
const styles = StyleSheet.create({
container: {
@@ -108,7 +109,7 @@ class Loading extends React.PureComponent {
return (
{}}>
-
+
{
const emoji = (emojiModel.id ? emojiModel.content : item) as string;
return (
);
diff --git a/app/containers/MessageBox/Mentions/MentionItem.tsx b/app/containers/MessageBox/Mentions/MentionItem.tsx
index 500ca8681..e887b9a41 100644
--- a/app/containers/MessageBox/Mentions/MentionItem.tsx
+++ b/app/containers/MessageBox/Mentions/MentionItem.tsx
@@ -10,6 +10,7 @@ import MessageboxContext from '../Context';
import styles from '../styles';
import FixedMentionItem from './FixedMentionItem';
import MentionEmoji from './MentionEmoji';
+import { testProps } from '../../../lib/methods/testProps';
interface IMessageBoxMentionItem {
item: {
@@ -95,7 +96,7 @@ const MentionItem = ({ item, trackingType }: IMessageBoxMentionItem) => {
}
]}
onPress={() => onPressMention(item)}
- testID={testID}>
+ {...testProps(testID)}>
);
diff --git a/app/containers/MessageBox/Mentions/index.tsx b/app/containers/MessageBox/Mentions/index.tsx
index 80bee8979..a84f9e469 100644
--- a/app/containers/MessageBox/Mentions/index.tsx
+++ b/app/containers/MessageBox/Mentions/index.tsx
@@ -7,6 +7,7 @@ import styles from '../styles';
import MentionItem from './MentionItem';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
+import { testProps } from '../../../lib/methods/testProps';
interface IMessageBoxMentions {
mentions: any[];
@@ -21,7 +22,7 @@ const Mentions = React.memo(
}
const { theme } = useTheme();
return (
-
+
(
diff --git a/app/containers/MessageBox/RecordAudio.tsx b/app/containers/MessageBox/RecordAudio.tsx
index ac717ffb2..50fb9591c 100644
--- a/app/containers/MessageBox/RecordAudio.tsx
+++ b/app/containers/MessageBox/RecordAudio.tsx
@@ -10,6 +10,7 @@ import I18n from '../../i18n';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
import { events, logEvent } from '../../utils/log';
+import { testProps } from '../../lib/methods/testProps';
interface IMessageBoxRecordAudioProps {
theme: string;
@@ -197,9 +198,8 @@ export default class RecordAudio extends React.PureComponent
diff --git a/app/containers/MessageBox/buttons/BaseButton.tsx b/app/containers/MessageBox/buttons/BaseButton.tsx
index 6c9a36ae7..13361daa3 100644
--- a/app/containers/MessageBox/buttons/BaseButton.tsx
+++ b/app/containers/MessageBox/buttons/BaseButton.tsx
@@ -2,10 +2,10 @@ import { BorderlessButton } from 'react-native-gesture-handler';
import React from 'react';
import styles from '../styles';
-import i18n from '../../../i18n';
import { CustomIcon } from '../../../lib/Icons';
import { useTheme } from '../../../theme';
import { themes } from '../../../lib/constants';
+import { testProps } from '../../../lib/methods/testProps';
interface IBaseButton {
onPress(): void;
@@ -22,8 +22,8 @@ const BaseButton = ({ accessibilityLabel, icon, color, ...props }: Partial
+ accessibilityTraits='button'
+ {...testProps(props.testID)}>
);
diff --git a/app/containers/MessageBox/index.tsx b/app/containers/MessageBox/index.tsx
index 463fc11d9..929141123 100644
--- a/app/containers/MessageBox/index.tsx
+++ b/app/containers/MessageBox/index.tsx
@@ -52,6 +52,7 @@ import { IMessage } from '../../definitions/IMessage';
import { forceJpgExtension } from './forceJpgExtension';
import { IBaseScreen, IPreviewItem, IUser, TSubscriptionModel, TThreadModel } from '../../definitions';
import { MasterDetailInsideStackParamList } from '../../stacks/MasterDetailStack/types';
+import { testProps } from '../../lib/methods/testProps';
if (isAndroid) {
require('./EmojiKeyboard');
@@ -1002,7 +1003,7 @@ class MessageBox extends Component {
+ {...testProps('messagebox-send-to-channel')}>
{I18n.t('Messagebox_Send_to_channel')}
@@ -1123,7 +1124,7 @@ class MessageBox extends Component {
{ backgroundColor: themes[theme].messageboxBackground },
!recording && editing && { backgroundColor: themes[theme].chatComponentBackground }
]}
- testID='messagebox'>
+ {...testProps('messagebox')}>
{textInputAndButtons}
{recordAudio}
diff --git a/app/containers/SearchHeader.tsx b/app/containers/SearchHeader.tsx
index 589ef1d2b..42fa8fc8e 100644
--- a/app/containers/SearchHeader.tsx
+++ b/app/containers/SearchHeader.tsx
@@ -8,6 +8,7 @@ import { themes } from '../lib/constants';
import TextInput from '../presentation/TextInput';
import { isIOS, isTablet } from '../utils/deviceInfo';
import { useOrientation } from '../dimensions';
+import { testProps } from '../lib/methods/testProps';
const styles = StyleSheet.create({
container: {
@@ -40,7 +41,7 @@ const SearchHeader = ({ onSearchChangeText, testID }: ISearchHeaderProps): JSX.E
placeholder={I18n.t('Search')}
onChangeText={onSearchChangeText}
theme={theme}
- testID={testID}
+ {...testProps(testID || '')}
/>
);
diff --git a/app/containers/TextInput.tsx b/app/containers/TextInput.tsx
index 553206a08..b3d48acac 100644
--- a/app/containers/TextInput.tsx
+++ b/app/containers/TextInput.tsx
@@ -7,6 +7,7 @@ import TextInput from '../presentation/TextInput';
import { themes } from '../lib/constants';
import { CustomIcon } from '../lib/Icons';
import ActivityIndicator from './ActivityIndicator';
+import { testProps } from '../lib/methods/testProps';
const styles = StyleSheet.create({
error: {
@@ -84,7 +85,7 @@ export default class RCTextInput extends React.PureComponent
@@ -107,7 +108,7 @@ export default class RCTextInput extends React.PureComponent
@@ -170,7 +171,7 @@ export default class RCTextInput extends React.PureComponent
+ {...testProps(testID)}>
{m}
);
diff --git a/app/containers/message/Broadcast.tsx b/app/containers/message/Broadcast.tsx
index 6a0efdaf8..c2e08bf94 100644
--- a/app/containers/message/Broadcast.tsx
+++ b/app/containers/message/Broadcast.tsx
@@ -10,6 +10,7 @@ import { themes } from '../../lib/constants';
import MessageContext from './Context';
import { IMessageBroadcast } from './interfaces';
import { useTheme } from '../../theme';
+import { testProps } from '../../lib/methods/testProps';
const Broadcast = React.memo(({ author, broadcast }: IMessageBroadcast) => {
const { user, replyBroadcast } = useContext(MessageContext);
@@ -24,7 +25,7 @@ const Broadcast = React.memo(({ author, broadcast }: IMessageBroadcast) => {
background={Touchable.Ripple(themes[theme].bannerBackground)}
style={[styles.button, { backgroundColor: themes[theme].tintColor }]}
hitSlop={BUTTON_HIT_SLOP}
- testID='message-broadcast-reply'>
+ {...testProps('message-broadcast-reply')}>
<>
{I18n.t('Reply')}
diff --git a/app/containers/message/Components/CollapsibleQuote/index.tsx b/app/containers/message/Components/CollapsibleQuote/index.tsx
index 2def3340c..4344684c9 100644
--- a/app/containers/message/Components/CollapsibleQuote/index.tsx
+++ b/app/containers/message/Components/CollapsibleQuote/index.tsx
@@ -13,6 +13,7 @@ import Markdown from '../../../markdown';
import MessageContext from '../../Context';
import Touchable from '../../Touchable';
import { BUTTON_HIT_SLOP } from '../../utils';
+import { testProps } from '../../../../lib/methods/testProps';
const styles = StyleSheet.create({
button: {
@@ -90,7 +91,9 @@ const Fields = React.memo(
<>
{attachment.fields.map(field => (
-
+
{field.title}
{
@@ -53,7 +54,7 @@ const Reaction = React.memo(({ reaction, getCustomEmoji, theme }: IMessageReacti
onPress={() => onReactionPress(reaction.emoji)}
onLongPress={onReactionLongPress}
key={reaction.emoji}
- testID={`message-reaction-${reaction.emoji}`}
+ {...testProps(`message-reaction-${reaction.emoji}`)}
style={[
styles.reactionButton,
{ backgroundColor: reacted ? themes[theme].bannerBackground : themes[theme].backgroundColor }
diff --git a/app/containers/message/RepliedThread.tsx b/app/containers/message/RepliedThread.tsx
index b681264dc..61ce86ea0 100644
--- a/app/containers/message/RepliedThread.tsx
+++ b/app/containers/message/RepliedThread.tsx
@@ -8,6 +8,7 @@ import I18n from '../../i18n';
import { MarkdownPreview } from '../markdown';
import { IMessageRepliedThread } from './interfaces';
import { useTheme } from '../../theme';
+import { testProps } from '../../lib/methods/testProps';
const RepliedThread = memo(({ tmid, tmsg, isHeader, fetchThreadName, id, isEncrypted }: IMessageRepliedThread) => {
const { theme } = useTheme();
@@ -33,7 +34,7 @@ const RepliedThread = memo(({ tmid, tmsg, isHeader, fetchThreadName, id, isEncry
}
return (
-
+
diff --git a/app/containers/message/Thread.tsx b/app/containers/message/Thread.tsx
index 00d9e5ab5..d2bcdbfa5 100644
--- a/app/containers/message/Thread.tsx
+++ b/app/containers/message/Thread.tsx
@@ -8,6 +8,7 @@ import ThreadDetails from '../ThreadDetails';
import I18n from '../../i18n';
import { IMessageThread } from './interfaces';
import { useTheme } from '../../theme';
+import { testProps } from '../../lib/methods/testProps';
const Thread = React.memo(
({ msg, tcount, tlm, isThreadRoom, id }: IMessageThread) => {
@@ -20,7 +21,9 @@ const Thread = React.memo(
const { threadBadgeColor, toggleFollowThread, user, replies } = useContext(MessageContext);
return (
-
+
{I18n.t('Reply')}
({
+ testID,
+ accessibilityLabel: testID
+});
diff --git a/app/lib/methods/withTest.ts b/app/lib/methods/withTest.ts
deleted file mode 100644
index 3f6cdccee..000000000
--- a/app/lib/methods/withTest.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export const withTest = (testID: string): { testID: string; accessibilityLabel: string } => ({
- testID,
- accessibilityLabel: testID
-});
diff --git a/app/presentation/TextInput.tsx b/app/presentation/TextInput.tsx
index 27996244d..63565b0a6 100644
--- a/app/presentation/TextInput.tsx
+++ b/app/presentation/TextInput.tsx
@@ -3,6 +3,7 @@ import { I18nManager, StyleProp, StyleSheet, TextInput, TextStyle } from 'react-
import { IRCTextInputProps } from '../containers/TextInput';
import { themes } from '../lib/constants';
+import { testProps } from '../lib/methods/testProps';
const styles = StyleSheet.create({
input: {
@@ -22,6 +23,7 @@ const ThemedTextInput = React.forwardRef(({ style,
placeholderTextColor={themes[theme].auxiliaryText}
keyboardAppearance={theme === 'light' ? 'light' : 'dark'}
{...props}
+ {...testProps(props.testID)}
/>
));
diff --git a/app/views/NewServerView/ServerInput/index.tsx b/app/views/NewServerView/ServerInput/index.tsx
index c296f0141..7d28f3693 100644
--- a/app/views/NewServerView/ServerInput/index.tsx
+++ b/app/views/NewServerView/ServerInput/index.tsx
@@ -7,7 +7,7 @@ import { themes } from '../../../lib/constants';
import I18n from '../../../i18n';
import { TServerHistoryModel } from '../../../definitions/IServerHistory';
import Item from './Item';
-import { withTest } from '../../../lib/methods/withTest';
+import { testProps } from '../../../lib/methods/testProps';
const styles = StyleSheet.create({
container: {
@@ -64,7 +64,7 @@ const ServerInput = ({
theme={theme}
onFocus={() => setFocused(true)}
onBlur={() => setFocused(false)}
- {...withTest('new-server-view-input')}
+ {...testProps('new-server-view-input')}
/>
{focused && serversHistory?.length ? (