diff --git a/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/__tests__/__snapshots__/locationDetailView.spec.ts.snap b/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/__tests__/__snapshots__/locationDetailView.spec.ts.snap index c936b04ebb..c76475deed 100644 --- a/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/__tests__/__snapshots__/locationDetailView.spec.ts.snap +++ b/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/__tests__/__snapshots__/locationDetailView.spec.ts.snap @@ -30,6 +30,13 @@ exports[`LocationDetailView display text \`getListResultsMessage\` returns the e } `; +exports[`LocationDetailView display text \`getListResultsMessage\` returns the expected values in the search exhausted with no results scenario 1`] = ` +{ + "content": "No results found in the first 10,000 items.", + "type": "info", +} +`; + exports[`LocationDetailView display text \`getListResultsMessage\` returns the expected values in the search failed scenario 1`] = ` { "content": "Network got confused", diff --git a/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/__tests__/scenarios.ts b/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/__tests__/scenarios.ts index 133e1d19bc..0fe65c66c5 100644 --- a/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/__tests__/scenarios.ts +++ b/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/__tests__/scenarios.ts @@ -323,6 +323,14 @@ export const LIST_ITEMS_SCENARIOS: [ hasExhaustedSearch: true, }, ], + [ + 'search exhausted with no results', + { + items: [], + query: 'something to look for', + hasExhaustedSearch: true, + }, + ], [ 'loading', { diff --git a/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/locationDetailView.ts b/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/locationDetailView.ts index 6e47478e20..0034f2420c 100644 --- a/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/locationDetailView.ts +++ b/packages/react-storage/src/components/StorageBrowser/displayText/libraries/en/locationDetailView.ts @@ -26,6 +26,13 @@ export const DEFAULT_LOCATION_DETAIL_VIEW_DISPLAY_TEXT: DefaultLocationDetailVie }; } + if (!items?.length && hasExhaustedSearch) { + return { + type: 'info', + content: `No results found in the first 10,000 items.`, + }; + } + if (!items?.length) { return { type: 'info',