diff --git a/packages/core/upload/admin/src/pages/App/MediaLibrary.js b/packages/core/upload/admin/src/pages/App/MediaLibrary.js index 7080fa4173..b37dbc2c27 100644 --- a/packages/core/upload/admin/src/pages/App/MediaLibrary.js +++ b/packages/core/upload/admin/src/pages/App/MediaLibrary.js @@ -161,7 +161,7 @@ export const MediaLibrary = () => { - {canUpdate && ( + {canUpdate && (assetCount > 0 || folderCount > 0) && ( { }); describe('select all', () => { + it('is not visible if there are not folders and assets', () => { + useAssets.mockReturnValueOnce({ + isLoading: false, + error: null, + data: {}, + }); + useFolders.mockReturnValueOnce({ + data: [], + isLoading: false, + error: null, + }); + renderML(); + + expect( + screen.queryByText('There are no elements with the applied filters') + ).not.toBeInTheDocument(); + }); + it('shows the select all button when the user is allowed to update', () => { renderML();