Skip to content

Commit 918fcb8

Browse files
committed
update test
1 parent a6550bf commit 918fcb8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/ui/ReportActionsViewTest.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)