@@ -10,19 +10,19 @@ import Onyx from 'react-native-onyx';
1010import { createAdminRoom , createAnnounceRoom } from '../utils/collections/reports' ;
1111import waitForBatchedUpdates from '../utils/waitForBatchedUpdates' ;
1212
13- // Capture props passed to UserAvatar (only rendered for non-Concierge agents).
13+ // Capture props passed to AccountAvatar (only rendered for non-Concierge agents).
1414let mockCapturedAvatarProps : Record < string , unknown > = { } ;
1515
16- jest . mock ( '@components/Avatar/connected/UserAvatar ' , ( ) => {
16+ jest . mock ( '@components/Avatar/connected/AccountAvatar ' , ( ) => {
1717 // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
1818 const { View} = require ( 'react-native' ) ;
1919 return ( props : Record < string , unknown > ) => {
2020 mockCapturedAvatarProps = props ;
21- return < View testID = "MockedUserAvatar " /> ;
21+ return < View testID = "MockedAccountAvatar " /> ;
2222 } ;
2323} ) ;
2424
25- // Concierge renders a branded Lottie animation instead of UserAvatar ; stub it so the test
25+ // Concierge renders a branded Lottie animation instead of AccountAvatar ; stub it so the test
2626// doesn't pull in Lottie and so we can assert it rendered.
2727jest . mock ( '@pages/home/report/ConciergeAnimatedAvatar' , ( ) => {
2828 // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -110,18 +110,18 @@ afterEach(() => {
110110
111111describe ( 'ConciergeThinkingMessage avatar prop integration' , ( ) => {
112112 describe ( 'Concierge bubble' , ( ) => {
113- test ( 'should render the animated avatar (not UserAvatar ) in admin room' , ( ) => {
113+ test ( 'should render the animated avatar (not AccountAvatar ) in admin room' , ( ) => {
114114 render ( < ConciergeThinkingMessage reportID = { mockAdminRoom . reportID } /> ) ;
115115
116116 expect ( screen . getByTestId ( 'MockedConciergeAnimatedAvatar' ) ) . toBeTruthy ( ) ;
117- expect ( screen . queryByTestId ( 'MockedUserAvatar ' ) ) . toBeNull ( ) ;
117+ expect ( screen . queryByTestId ( 'MockedAccountAvatar ' ) ) . toBeNull ( ) ;
118118 } ) ;
119119
120- test ( 'should render the animated avatar (not UserAvatar ) in announce room' , ( ) => {
120+ test ( 'should render the animated avatar (not AccountAvatar ) in announce room' , ( ) => {
121121 render ( < ConciergeThinkingMessage reportID = { mockAnnounceRoom . reportID } /> ) ;
122122
123123 expect ( screen . getByTestId ( 'MockedConciergeAnimatedAvatar' ) ) . toBeTruthy ( ) ;
124- expect ( screen . queryByTestId ( 'MockedUserAvatar ' ) ) . toBeNull ( ) ;
124+ expect ( screen . queryByTestId ( 'MockedAccountAvatar ' ) ) . toBeNull ( ) ;
125125 } ) ;
126126 } ) ;
127127
@@ -130,14 +130,14 @@ describe('ConciergeThinkingMessage avatar prop integration', () => {
130130 mockCandidateAgentIDs = [ customAgentAccountID ] ;
131131 } ) ;
132132
133- test ( 'should render UserAvatar (not the Concierge animation)' , ( ) => {
133+ test ( 'should render AccountAvatar (not the Concierge animation)' , ( ) => {
134134 render ( < ConciergeThinkingMessage reportID = { mockAdminRoom . reportID } /> ) ;
135135
136- expect ( screen . getByTestId ( 'MockedUserAvatar ' ) ) . toBeTruthy ( ) ;
136+ expect ( screen . getByTestId ( 'MockedAccountAvatar ' ) ) . toBeTruthy ( ) ;
137137 expect ( screen . queryByTestId ( 'MockedConciergeAnimatedAvatar' ) ) . toBeNull ( ) ;
138138 } ) ;
139139
140- test ( 'should pass accountID=agentAccountID to UserAvatar ' , ( ) => {
140+ test ( 'should pass accountID=agentAccountID to AccountAvatar ' , ( ) => {
141141 render ( < ConciergeThinkingMessage reportID = { mockAdminRoom . reportID } /> ) ;
142142
143143 expect ( mockCapturedAvatarProps . accountID ) . toBe ( customAgentAccountID ) ;
0 commit comments