Expanding FileBrowser button widths when page is wide enough.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

This commit is contained in:
Roland 2026-07-01 19:52:15 -06:00
parent 7005cd0681
commit 2acdc2e16d
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
4 changed files with 51 additions and 7 deletions

View file

@ -34,6 +34,7 @@ jest.mock('../hooks/customHooks', () => ({
useWROLMode: jest.fn(() => false),
useStatusFlag: jest.fn(() => false),
useUploadFile: () => mockUseUploadFile,
useElementWidth: jest.fn(() => [() => {}, 0]),
}));
// Mock react-dropzone
@ -45,7 +46,7 @@ jest.mock('react-dropzone', () => ({
}));
// Import mocked hooks for manipulation
import {useBrowseFiles, useWROLMode} from '../hooks/customHooks';
import {useBrowseFiles, useElementWidth, useWROLMode} from '../hooks/customHooks';
// Create wrapper with all required contexts
const AllContextsWrapper = ({children}) => {
@ -91,6 +92,8 @@ describe('FileBrowser', () => {
fetchFiles: jest.fn(),
});
useWROLMode.mockReturnValue(false);
// [callbackRef, width]; width 0 keeps footer buttons icon-only in tests.
useElementWidth.mockReturnValue([() => {}, 0]);
});
describe('Directory Selection', () => {