fix(media hosting): restore android imgur support

This commit is contained in:
Tommaso Casaburi
2026-05-01 22:52:56 +07:00
parent db61ca09d4
commit 9f388693eb
9 changed files with 57 additions and 28 deletions
@@ -107,18 +107,18 @@ describe('MediaHostingSettings', () => {
expect(mockSetUploadMode).toHaveBeenCalledWith('none');
});
it('disables unsupported providers on Android', async () => {
it('enables Imgur on Android', async () => {
uploadModeRef.value = 'preferred';
preferredProviderRef.value = 'catbox';
mockGetPlatform.mockReturnValue('android');
render();
const imgurRadio = container.querySelector<HTMLInputElement>('input[value="imgur"]');
expect(imgurRadio).not.toBeNull();
expect(imgurRadio?.disabled).toBe(true);
expect(imgurRadio?.disabled).toBe(false);
await act(async () => {
imgurRadio?.click();
});
expect(mockSetPreferredProvider).not.toHaveBeenCalled();
expect(mockSetPreferredProvider).toHaveBeenCalledWith('imgur');
});
it('clicking supported provider in preferred mode calls setPreferredProvider', async () => {