@@ -138,13 +138,13 @@ describe('ReportListItemHeader', () => {
138138 expect ( screen . queryByTestId ( 'ArrowRightLong Icon' ) ) . not . toBeOnTheScreen ( ) ;
139139 } ) ;
140140
141- it ( 'should only display submitter if submitter and recipient are the same' , async ( ) => {
141+ it ( 'should display submitter and receiver, even if submitter and recipient are the same' , async ( ) => {
142142 const reportItem = createReportListItem ( CONST . REPORT . TYPE . IOU , 'john' , 'john' ) ;
143143 renderReportListItemHeader ( reportItem ) ;
144144 await waitForBatchedUpdates ( ) ;
145145
146- expect ( screen . getByText ( 'John Doe' ) ) . toBeOnTheScreen ( ) ;
147- expect ( screen . queryByTestId ( 'ArrowRightLong Icon' ) ) . not . toBeOnTheScreen ( ) ;
146+ expect ( screen . getAllByText ( 'John Doe' ) ) . toHaveLength ( 2 ) ;
147+ expect ( screen . getByTestId ( 'ArrowRightLong Icon' ) ) . toBeOnTheScreen ( ) ;
148148 } ) ;
149149
150150 it ( 'should not render anything if neither submitter nor recipient is present' , async ( ) => {
@@ -184,13 +184,13 @@ describe('ReportListItemHeader', () => {
184184 expect ( screen . queryByTestId ( 'ArrowRightLong Icon' ) ) . not . toBeOnTheScreen ( ) ;
185185 } ) ;
186186
187- it ( 'should only display submitter if submitter and recipient are the same' , async ( ) => {
187+ it ( 'should display submitter and receiver, even if submitter and recipient are the same' , async ( ) => {
188188 const reportItem = createReportListItem ( CONST . REPORT . TYPE . EXPENSE , 'john' , 'john' ) ;
189189 renderReportListItemHeader ( reportItem ) ;
190190 await waitForBatchedUpdates ( ) ;
191191
192- expect ( screen . getByText ( 'John Doe' ) ) . toBeOnTheScreen ( ) ;
193- expect ( screen . queryByTestId ( 'ArrowRightLong Icon' ) ) . not . toBeOnTheScreen ( ) ;
192+ expect ( screen . getAllByText ( 'John Doe' ) ) . toHaveLength ( 2 ) ;
193+ expect ( screen . getByTestId ( 'ArrowRightLong Icon' ) ) . toBeOnTheScreen ( ) ;
194194 } ) ;
195195
196196 it ( 'should not render anything if no participants are present' , async ( ) => {
0 commit comments