- Replaced `LIST_PUBLIC_CATEGORIES` with `LIST_ADMIN_CATEGORIES_FLAT` in `ArticleFormModal.tsx`. - Removed the "Add Event" button from the dashboard page. - Simplified the `EventsPage` by removing the button and adjusting the layout. - Cleaned up the `AdminEventEditPage` by removing unnecessary props. - Deleted unused layout and page files related to event creation. - Updated `AdminAuthContent` to use `useAdminCitiesQuery` instead of `useDiscoveryCitiesQuery`. - Refactored `EventGuestListAccessPanel` to remove the `accessMode` prop and adjust API calls accordingly. - Removed several unused components and tests related to event creation, enhancing project maintainability.
14 lines
499 B
TypeScript
14 lines
499 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { EventWizardFaqFormValidation } from '@/validation/eventWizard'
|
|
|
|
describe('EventWizardFaqFormValidation', () => {
|
|
it('requires question and answer', () => {
|
|
expect(EventWizardFaqFormValidation.safeParse({ question: '', answer: 'پاسخ' }).success).toBe(false)
|
|
expect(EventWizardFaqFormValidation.parse({ question: 'سوال؟', answer: 'پاسخ' })).toEqual({
|
|
question: 'سوال؟',
|
|
answer: 'پاسخ',
|
|
})
|
|
})
|
|
})
|