Skip to content

Commit d89939b

Browse files
authored
Merge pull request #56245 from ishakakkad/55512-add-testId
Added Test Id
2 parents 96af045 + 3a3e48a commit d89939b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/Search/SearchAutocompleteInput.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type {ForwardedRef, ReactNode, RefObject} from 'react';
2-
import React, {forwardRef, useState} from 'react';
2+
import React, {forwardRef, useLayoutEffect, useState} from 'react';
33
import {View} from 'react-native';
44
import type {StyleProp, TextInputProps, ViewStyle} from 'react-native';
55
import {useOnyx} from 'react-native-onyx';
@@ -11,6 +11,7 @@ import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'
1111
import useLocalize from '@hooks/useLocalize';
1212
import useNetwork from '@hooks/useNetwork';
1313
import useThemeStyles from '@hooks/useThemeStyles';
14+
import {parseFSAttributes} from '@libs/Fullstory';
1415
import {parseForLiveMarkdown} from '@libs/SearchAutocompleteUtils';
1516
import handleKeyPress from '@libs/SearchInputOnKeyPress';
1617
import shouldDelayFocus from '@libs/shouldDelayFocus';
@@ -97,12 +98,16 @@ function SearchAutocompleteInput(
9798

9899
const inputWidth = isFullWidth ? styles.w100 : {width: variables.popoverWidth};
99100

101+
// Parse Fullstory attributes on initial render
102+
useLayoutEffect(parseFSAttributes, []);
103+
100104
return (
101105
<View style={[outerWrapperStyle]}>
102106
<View style={[styles.flexRow, styles.alignItemsCenter, wrapperStyle ?? styles.searchRouterTextInputContainer, isFocused && wrapperFocusedStyle]}>
103107
<View
104108
style={styles.flex1}
105-
fsClass="fs-unmask"
109+
fsClass={CONST.FULL_STORY.UNMASK}
110+
testID={CONST.FULL_STORY.UNMASK}
106111
>
107112
<TextInput
108113
testID="search-autocomplete-text-input"

0 commit comments

Comments
 (0)