diff --git a/src/components/LHNOptionsList/LHNOptionsList.js b/src/components/LHNOptionsList/LHNOptionsList.js index 344fc0dcc0b4..0679267bfdf9 100644 --- a/src/components/LHNOptionsList/LHNOptionsList.js +++ b/src/components/LHNOptionsList/LHNOptionsList.js @@ -12,9 +12,8 @@ import compose from '@libs/compose'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import reportActionPropTypes from '@pages/home/report/reportActionPropTypes'; import reportPropTypes from '@pages/reportPropTypes'; -import useThemeStyles from '@styles/useThemeStyles'; import stylePropTypes from '@styles/stylePropTypes'; -import styles from '@styles/styles'; +import useThemeStyles from '@styles/useThemeStyles'; import variables from '@styles/variables'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -99,7 +98,7 @@ function LHNOptionsList({ draftComments, currentReportID, }) { - const themeStyles = useThemeStyles(); + const styles = useThemeStyles(); /** * Function which renders a row in the list * @@ -142,7 +141,7 @@ function LHNOptionsList({ ); return ( - + { expect(lhnOptionsList).toBeDefined(); fireEvent.scroll(lhnOptionsList, eventData); - - const button1 = await screen.findByTestId('1'); - const button2 = await screen.findByTestId('2'); + // find elements that are currently visible in the viewport + const button1 = await screen.findByTestId('7'); + const button2 = await screen.findByTestId('8'); fireEvent.press(button1); fireEvent.press(button2); };