Wire manage-events/new with host picker and create flow against the new admin create API, including entry points from the events list and user detail.
26 lines
1.3 KiB
TypeScript
26 lines
1.3 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { APP_ROUTES, CONSUMER_ROUTES, SEO_ROUTES } from '@/constants/routes'
|
|
|
|
describe('event route ownership', () => {
|
|
it('keeps admin event workflows under /manage-events', () => {
|
|
expect(APP_ROUTES.MANAGE_EVENTS).toBe('/manage-events')
|
|
expect(APP_ROUTES.MANAGE_EVENT_NEW).toBe('/manage-events/new')
|
|
expect(APP_ROUTES.MANAGE_EVENT_NEW_FOR_HOST('host/id')).toBe('/manage-events/new?organizerId=host%2Fid')
|
|
expect(APP_ROUTES.MANAGE_EVENT_DETAIL('event/id')).toBe('/manage-events/event%2Fid')
|
|
expect(APP_ROUTES.MANAGE_EVENT_EDIT('event/id')).toBe('/manage-events/event%2Fid/edit')
|
|
})
|
|
|
|
it('keeps owner workflows under /my-events', () => {
|
|
expect(CONSUMER_ROUTES.EVENT_NEW).toBe('/my-events/new')
|
|
expect(CONSUMER_ROUTES.EVENT_MANAGE('event/id')).toBe('/my-events/event%2Fid/manage')
|
|
expect(CONSUMER_ROUTES.EVENT_EDIT('event/id')).toBe('/my-events/event%2Fid/manage/edit')
|
|
})
|
|
|
|
it('uses /e exclusively for public event details and checkout return state', () => {
|
|
expect(SEO_ROUTES.EVENT_LANDING('public/event')).toBe('/e/public%2Fevent')
|
|
expect(CONSUMER_ROUTES.EVENT_DETAIL('public/event')).toBe('/e/public%2Fevent')
|
|
expect(CONSUMER_ROUTES.EVENT_PAYMENT('public/event', 'booking/id')).toBe('/e/public%2Fevent?payment=checkout&bookingId=booking%2Fid')
|
|
})
|
|
})
|