Adjust event defaults and nav width
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user