Test Cases: Event Cloning
Module: Events & Registrations - Cloning
Backend Endpoint: POST /api/events/:id/clone
Frontend Page: Admin Events Management
Priority: P2
Phase: 2
Prerequisites
- User is authenticated as Admin or Event Manager.
- Source event exists with complete details (title, description, dates, location, capacity, visibility).
- For ticket type tests: Source event has one or more ticket types configured.
Test Cases
TC-CLONE-01: Clone Event (All Fields Copied)
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to Admin Events list. Select a PUBLISHED event. | Event details visible. |
| 2 | Click "Clone" action (or Actions -> Clone Event). | Clone confirmation dialog or immediate clone request. |
| 3 | Verify API Request. | POST /api/events/:id/clone called. |
| 4 | Check Response. | 200 OK. New event object returned with new UUID. |
| 5 | Verify Cloned Fields. | title, description, location, capacity, visibility, priceCents, bannerUrl match source event. |
| 6 | Navigate to Cloned Event. | All copied fields display correctly in edit form. |
TC-CLONE-02: Clone Event with Ticket Types
| Step | Action | Expected Result |
|---|---|---|
| 1 | Create/Select source event with multiple ticket types (e.g., "General Admission", "VIP", "Early Bird"). | Ticket types visible in event configuration. |
| 2 | Clone the event. | Clone completes successfully. |
| 3 | Open cloned event ticket configuration. | All ticket types from source event are present. |
| 4 | Verify Ticket Type Details. | Each ticket type has correct name, priceCents, capacity, description copied. |
| 5 | Verify Independence. | Editing ticket type in cloned event does NOT affect source event ticket types. |
TC-CLONE-03: Cloned Event Status (Should Be DRAFT)
| Step | Action | Expected Result |
|---|---|---|
| 1 | Select a PUBLISHED event. | Event status is PUBLISHED. |
| 2 | Clone the event. | Clone completes successfully. |
| 3 | Check Cloned Event Status. | Status is DRAFT (regardless of source event status). |
| 4 | Clone a CANCELLED event. | Clone completes successfully. |
| 5 | Check Cloned Event Status. | Status is DRAFT. |
| 6 | Verify Reasoning. | Cloned events require review before publishing (dates, capacity, etc.). |
TC-CLONE-04: Cloned Event Dates (Should Require Update)
| Step | Action | Expected Result |
|---|---|---|
| 1 | Select source event with past dates (startAt, endAt in the past). | - |
| 2 | Clone the event. | Clone completes successfully. |
| 3 | Check Cloned Event Dates. | Dates are copied and shifted +7 days forward from the source (per the clone logic). Review/adjust before publishing. |
| 4 | Attempt to Publish Cloned Event. | Validation error if dates are in the past or invalid. |
| 5 | Update Dates. | Set future dates for startAt and endAt. |
| 6 | Publish. | Event publishes successfully after date correction. |
TC-CLONE-05: Cloned Event Registration Deadline
| Step | Action | Expected Result |
|---|---|---|
| 1 | Select source event with registrationDeadline set. | - |
| 2 | Clone the event. | Clone completes successfully. |
| 3 | Check Cloned Registration Deadline. | Deadline is either cleared or copied (requires update if past). |
| 4 | Attempt Publish with Past Deadline. | Validation prevents publishing with expired registration deadline. |
TC-CLONE-06: Clone Permissions - Admin Role
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as ADMIN user. | Dashboard accessible. |
| 2 | Navigate to any event. | Clone action visible. |
| 3 | Clone event. | POST /api/events/:id/clone succeeds. 200 OK. |
| 4 | Verify Ownership. | Cloned event createdBy set to cloning admin's ID. |
TC-CLONE-07: Clone Permissions - Event Manager Role
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as EVENT_MANAGER user. | Dashboard accessible. |
| 2 | Navigate to event managed by this user. | Clone action visible. |
| 3 | Clone event. | POST /api/events/:id/clone succeeds. 200 OK. |
| 4 | Verify Ownership. | Cloned event createdBy set to cloning Event Manager's ID. |
TC-CLONE-08: Clone Permissions - Unauthorized Role
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as MEMBER (non-admin, non-event-manager). | Member dashboard accessible. |
| 2 | Attempt to access clone endpoint directly. | POST /api/events/:id/clone. |
| 3 | Verify Response. | 403 Forbidden or 401 Unauthorized. |
| 4 | Verify UI. | Clone action not visible in UI for unauthorized users. |
TC-CLONE-09: Cloned Event Slug Uniqueness
| Step | Action | Expected Result |
|---|---|---|
| 1 | Create event with slug annual-gala-2025. | Event created with unique slug. |
| 2 | Clone the event. | Clone completes successfully. |
| 3 | Check Cloned Event Slug. | Slug is unique, e.g., annual-gala-2025-copy or annual-gala-2025-1. |
| 4 | Clone again. | Second clone has different unique slug (e.g., annual-gala-2025-copy-2 or annual-gala-2025-2). |
| 5 | Verify Slug Editability. | Admin can manually edit cloned event slug to custom value. |
| 6 | Verify Slug Collision Prevention. | Attempting to save with existing slug shows validation error. |
TC-CLONE-10: Clone Event Title Modification
| Step | Action | Expected Result |
|---|---|---|
| 1 | Clone event titled "Summer Conference 2025". | Clone completes. |
| 2 | Check Cloned Title. | Title is modified to indicate clone, e.g., "Summer Conference 2025 (Copy)" or "Copy of Summer Conference 2025". |
| 3 | Edit Title. | Admin can modify title to desired value. |
TC-CLONE-11: Cloned Event - Registrations Not Copied
| Step | Action | Expected Result |
|---|---|---|
| 1 | Select source event with 50 registrations. | Registration count visible. |
| 2 | Clone the event. | Clone completes successfully. |
| 3 | Check Cloned Event Registrations. | Registration count is 0. No registrations copied. |
| 4 | Verify Capacity. | Full capacity available for new registrations. |
TC-CLONE-12: Cloned Event - Attendee Data Isolation
| Step | Action | Expected Result |
|---|---|---|
| 1 | Source event has check-in records. | - |
| 2 | Clone the event. | Clone completes successfully. |
| 3 | Verify Cloned Event. | No check-in records, no registrations — clean slate. (There is no waitlist feature in MemberVu.) |
TC-CLONE-13: Clone Non-Existent Event
| Step | Action | Expected Result |
|---|---|---|
| 1 | Attempt POST /api/events/:id/clone with invalid UUID. | - |
| 2 | Verify Response. | 404 Not Found. Error message: "Event not found". |
TC-CLONE-14: Clone Deleted Event
| Step | Action | Expected Result |
|---|---|---|
| 1 | Attempt to clone a soft-deleted event. | - |
| 2 | Verify Response. | 404 Not Found or 400 Bad Request. Cannot clone deleted events. |
TC-CLONE-15: Bulk Clone (If Supported)
| Step | Action | Expected Result |
|---|---|---|
| 1 | Select multiple events in Admin list. | Multiple events selected. |
| 2 | Attempt bulk clone action. | Either: (a) Feature not supported, action disabled, OR (b) Each event cloned individually. |
| 3 | Verify Results. | Each cloned event has unique slug, DRAFT status, cleared registrations. |
Edge Cases
TC-CLONE-EC-01: Clone Event with Maximum Field Lengths
| Step | Action | Expected Result |
|---|---|---|
| 1 | Source event has max-length title (e.g., 255 chars). | - |
| 2 | Clone the event. | Clone succeeds. |
| 3 | Verify Title Handling. | Title may be truncated if "(Copy)" suffix would exceed limit, OR clone proceeds with full title. |
TC-CLONE-EC-02: Clone Event with Special Characters in Slug
| Step | Action | Expected Result |
|---|---|---|
| 1 | Source event slug contains edge case characters (if allowed). | - |
| 2 | Clone the event. | Clone succeeds. |
| 3 | Verify Slug Generation. | New slug is valid URL-safe string. |
TC-CLONE-EC-03: Concurrent Clone Requests
| Step | Action | Expected Result |
|---|---|---|
| 1 | Two admins simultaneously click Clone on same event. | - |
| 2 | Verify Results. | Two separate cloned events created, each with unique slug. No conflicts. |
Notes
- Cloned events should always start in DRAFT status to prevent accidental publication with outdated dates.
- Slug uniqueness must be enforced at database level to prevent duplicates.
- Consider adding "(Copy)" or timestamp suffix to cloned event titles for easy identification.
- Registration data, check-in records, and payment history should NEVER be copied to cloned events.