@@ -173,7 +173,7 @@ describe('ReportActionsView', () => {
173173 } ) ;
174174
175175 describe ( 'Skeleton Loading States' , ( ) => {
176- it ( 'should show skeleton when shouldShowSkeletonForAppLoad is true (isLoadingApp is true and not offline )' , ( ) => {
176+ it ( 'should show skeleton when shouldShowSkeletonForAppLoad is true (isLoadingApp is true and isOffline is false )' , ( ) => {
177177 mockUseNetwork . mockReturnValue ( {
178178 isOffline : false ,
179179 } ) ;
@@ -194,14 +194,15 @@ describe('ReportActionsView', () => {
194194 return [ undefined , { status : 'loaded' } ] ;
195195 } ) ;
196196
197+ // Empty report actions to trigger isMissingReportActions condition
197198 renderReportActionsView ( {
198- reportActions : [ ] , // Empty report actions to trigger isMissingReportActions condition
199+ reportActions : [ ] ,
199200 } ) ;
200201
201202 expect ( screen . getByTestId ( 'ReportActionsSkeletonView' ) ) . toBeTruthy ( ) ;
202203 } ) ;
203204
204- it ( 'should not show skeleton when shouldShowSkeletonForAppLoad is false (isLoadingApp is false)' , ( ) => {
205+ it ( 'should not show skeleton when shouldShowSkeletonForAppLoad is false (isLoadingApp is false and isOffline is false )' , ( ) => {
205206 mockUseNetwork . mockReturnValue ( {
206207 isOffline : false ,
207208 } ) ;
@@ -227,7 +228,7 @@ describe('ReportActionsView', () => {
227228 expect ( screen . queryByTestId ( 'ReportActionsSkeletonView' ) ) . toBeNull ( ) ;
228229 } ) ;
229230
230- it ( 'should not show skeleton when shouldShowSkeletonForAppLoad is false (isOffline is true)' , ( ) => {
231+ it ( 'should not show skeleton when shouldShowSkeletonForAppLoad is false (isLoadingApp is true and isOffline is true)' , ( ) => {
231232 mockUseNetwork . mockReturnValue ( {
232233 isOffline : true ,
233234 } ) ;
0 commit comments