Fix multi-image selection when mime type is missing
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-10 07:57:56 +01:00
parent 1f9a43806a
commit d9409e961d
2 changed files with 27 additions and 1 deletions

View File

@@ -147,4 +147,20 @@ describe('UploadScreen', () => {
});
expect(addToQueueMock).not.toHaveBeenCalled();
});
it('accepts image files with empty mime type when extension is valid', async () => {
const { container } = render(
<EventDataProvider token="token">
<UploadScreen />
</EventDataProvider>
);
const input = container.querySelector('input[type="file"]') as HTMLInputElement;
const file = new File(['rawdata'], 'from-library.jpg', { type: '' });
fireEvent.change(input, { target: { files: [file] } });
expect(await screen.findByLabelText('Remove photo')).toBeInTheDocument();
expect(screen.getByText('{count} photos selected')).toBeInTheDocument();
});
});