Fix auth translations and admin PWA UI
This commit is contained in:
@@ -60,7 +60,7 @@ vi.mock('@tamagui/select', () => {
|
||||
return { Select };
|
||||
});
|
||||
|
||||
import { MobileSelect } from './FormControls';
|
||||
import { MobileColorInput, MobileDateTimeInput, MobileFileInput, MobileSelect } from './FormControls';
|
||||
|
||||
describe('MobileSelect', () => {
|
||||
it('maps options and forwards selection changes', () => {
|
||||
@@ -83,3 +83,30 @@ describe('MobileSelect', () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('MobileColorInput', () => {
|
||||
it('renders a color input with default sizing', () => {
|
||||
render(<MobileColorInput value="#ff0000" onChange={vi.fn()} />);
|
||||
|
||||
const input = screen.getByDisplayValue('#ff0000');
|
||||
expect(input).toHaveAttribute('type', 'color');
|
||||
});
|
||||
});
|
||||
|
||||
describe('MobileFileInput', () => {
|
||||
it('renders a hidden file input', () => {
|
||||
render(<MobileFileInput data-testid="file-input" />);
|
||||
|
||||
const input = screen.getByTestId('file-input');
|
||||
expect(input).toHaveAttribute('type', 'file');
|
||||
});
|
||||
});
|
||||
|
||||
describe('MobileDateTimeInput', () => {
|
||||
it('renders a datetime-local input', () => {
|
||||
render(<MobileDateTimeInput value="2024-10-20T14:30" onChange={vi.fn()} />);
|
||||
|
||||
const input = screen.getByDisplayValue('2024-10-20T14:30');
|
||||
expect(input).toHaveAttribute('type', 'datetime-local');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user