Skip to content

Commit 1b91241

Browse files
committed
Update test mocks for split reportLoadingState keys
1 parent b6adf06 commit 1b91241

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

tests/navigation/LinkedActionNotFoundGuardTest.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jest.mock('@hooks/useOnyx', () => ({
8585
if (key.startsWith('reportActions_')) {
8686
return [mockLinkedAction, {status: 'loaded'}];
8787
}
88-
if (key.startsWith('reportMetadata_')) {
88+
if (key.startsWith('reportLoadingState_')) {
8989
return [mockIsLoadingInitialReportActions, {status: 'loaded'}];
9090
}
9191
if (key.startsWith('report_')) {

tests/ui/ReportActionsViewTest.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ describe('ReportActionsView', () => {
202202
if (key === ONYXKEYS.RAM_ONLY_ARE_TRANSLATIONS_LOADING) {
203203
return [false, {status: 'loaded'}];
204204
}
205-
if (key.includes('reportMetadata')) {
205+
if (key.includes('reportLoadingState')) {
206206
return [{isLoadingInitialReportActions: false, hasOnceLoadedReportActions: true}, {status: 'loaded'}];
207207
}
208208
if (key.includes('reportActions')) {
@@ -236,7 +236,7 @@ describe('ReportActionsView', () => {
236236
if (key === ONYXKEYS.RAM_ONLY_ARE_TRANSLATIONS_LOADING) {
237237
return [false, {status: 'loaded'}];
238238
}
239-
if (key.includes('reportMetadata')) {
239+
if (key.includes('reportLoadingState')) {
240240
return [{isLoadingInitialReportActions: false, hasOnceLoadedReportActions: true}, {status: 'loaded'}];
241241
}
242242
if (key.includes('reportActions')) {
@@ -273,7 +273,7 @@ describe('ReportActionsView', () => {
273273
if (key === ONYXKEYS.RAM_ONLY_ARE_TRANSLATIONS_LOADING) {
274274
return [false, {status: 'loaded'}];
275275
}
276-
if (key.includes('reportMetadata')) {
276+
if (key.includes('reportLoadingState')) {
277277
return [{isLoadingInitialReportActions: false, hasOnceLoadedReportActions: true}, {status: 'loaded'}];
278278
}
279279
if (key.includes('reportActions')) {
@@ -305,7 +305,7 @@ describe('ReportActionsView', () => {
305305
if (key === ONYXKEYS.RAM_ONLY_ARE_TRANSLATIONS_LOADING) {
306306
return [false, {status: 'loaded'}];
307307
}
308-
if (key.includes('reportMetadata')) {
308+
if (key.includes('reportLoadingState')) {
309309
return [{isLoadingInitialReportActions: false, hasOnceLoadedReportActions: true}, {status: 'loaded'}];
310310
}
311311
if (key.includes('reportActions')) {
@@ -337,7 +337,7 @@ describe('ReportActionsView', () => {
337337
if (key === ONYXKEYS.RAM_ONLY_ARE_TRANSLATIONS_LOADING) {
338338
return [false, {status: 'loaded'}];
339339
}
340-
if (key.includes('reportMetadata')) {
340+
if (key.includes('reportLoadingState')) {
341341
return [{isLoadingInitialReportActions: false, hasOnceLoadedReportActions: true}, {status: 'loaded'}];
342342
}
343343
if (key.includes('reportActions')) {
@@ -403,7 +403,7 @@ describe('ReportActionsView', () => {
403403
if (key === ONYXKEYS.RAM_ONLY_ARE_TRANSLATIONS_LOADING) {
404404
return [false, {status: 'loaded'}];
405405
}
406-
if (key.includes('reportMetadata')) {
406+
if (key.includes('reportLoadingState')) {
407407
return [{isLoadingInitialReportActions: false, hasOnceLoadedReportActions: true}, {status: 'loaded'}];
408408
}
409409
if (key.includes('reportActions')) {

0 commit comments

Comments
 (0)