Adjust event defaults and nav width
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-01-06 12:22:12 +01:00
parent cc89cc667a
commit e82a10cb8b
4 changed files with 20 additions and 5 deletions

View File

@@ -81,6 +81,7 @@ vi.mock('../theme', () => ({
}),
}));
import { getEventTypes } from '../../api';
import MobileEventFormPage from '../EventFormPage';
describe('MobileEventFormPage', () => {
@@ -94,4 +95,18 @@ describe('MobileEventFormPage', () => {
expect(backMock).toHaveBeenCalled();
});
it('defaults event type to wedding when available', async () => {
vi.mocked(getEventTypes).mockResolvedValueOnce([
{ id: 11, slug: 'conference', name: 'Conference', name_translations: {}, icon: null, settings: {} },
{ id: 22, slug: 'wedding', name: 'Wedding', name_translations: {}, icon: null, settings: {} },
]);
await act(async () => {
render(<MobileEventFormPage />);
});
const select = screen.getByRole('combobox');
expect(select).toHaveValue('22');
});
});