Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save roylee0704/daf742123513dfff038a6dfc3061e06c to your computer and use it in GitHub Desktop.
Save roylee0704/daf742123513dfff038a6dfc3061e06c to your computer and use it in GitHub Desktop.
Duplicated Booking Marker (Integration Test
Duplicated Merchant Bookings
#triggers
on new booking creation
for any duplicated bookings that occurs within an hour since new booking cr
eation
✓ marks previous booking as duplicated
✓ marks booking of `task_type` = `GoMessenger`
✓ marks booking that is of same `comment`
✓ marks booking that is of same `poi_id`
✓ marks booking that `overall_status` is 3
✓ do not mark booking that is of different `task_type`
✓ do not mark booking that is of different `comment`
✓ do not mark booking that is of different `poi_id`
✓ do not mark booking that is already marked
for any existing duplicated bookings that occurs more than an hour ago
✓ should not mark any of them
on task expiration
for any duplicated bookings that occurs within new booking time frame
- marks booking that is of `GoMessenger`
- marks booking that is of same `comment`
- marks booking that is of same `poi_id`
- marks booking that `overall_status` is 3
- do not mark booking that is of different `task_type`
- do not mark booking that is of different `comment`
- do not mark booking that is of different `poi_id`
- do not mark booking that is already marked
for any existing duplicated bookings that occurs out of new booking time frame
- should not mark any of them
on new booking completion
for any duplicated bookings that ends within new booking time-frame
✓ marks previous booking as duplicated
✓ marks booking of `task_type` = `GoMessenger`
✓ marks booking that is of same `comment`
✓ marks booking that is of same `poi_id`
✓ marks booking that `overall_status` is 3
✓ do not mark booking that is of different `task_type`
✓ do not mark booking that is of different `comment`
✓ do not mark booking that is of different `poi_id`
✓ do not mark booking that is already marked
for any duplicated bookings that creates and ends within new booking time frame
✓ marks previous booking as duplicated
✓ marks booking of `task_type` = `GoMessenger`
✓ marks booking that is of same `comment`
✓ marks booking that is of same `poi_id`
✓ marks booking that `overall_status` is 3
✓ do not mark booking that is of different `task_type`
✓ do not mark booking that is of different `comment`
✓ do not mark booking that is of different `poi_id`
✓ do not mark booking that is already marked
for any existing duplicated bookings that occurs within new booking time frame, but ends after it
✓ should not mark any as duplicated
on new booking failure
due to customer cancellation
for any duplicated bookings that occurs within new booking time frame
✓ marks previous booking as duplicated
✓ marks booking of `task_type` = `GoMessenger`
✓ marks booking that is of same `comment`
✓ marks booking that is of same `poi_id`
✓ marks booking that `overall_status` is 3
✓ do not mark booking that is of different `task_type`
✓ do not mark booking that is of different `comment`
✓ do not mark booking that is of different `poi_id`
✓ do not mark booking that is already marked
for any existing duplicated bookings that occurs out of new booking time frame
✓ should not mark any of them
due to biker cancellation
for any duplicated bookings that occurs within new booking time frame
✓ marks previous booking as duplicated
✓ marks booking of `task_type` = `GoMessenger`
✓ marks booking that is of same `comment`
✓ marks booking that is of same `poi_id`
✓ marks booking that `overall_status` is 3
✓ do not mark booking that is of different `task_type`
✓ do not mark booking that is of different `comment`
✓ do not mark booking that is of different `poi_id`
✓ do not mark booking that is already marked
for any existing duplicated bookings that occurs out of new booking time frame
✓ should not mark any of them
due to operator revocation
for any duplicated bookings that occurs within new booking time frame
✓ marks previous booking as duplicated
✓ marks booking of `task_type` = `GoMessenger`
✓ marks booking that is of same `comment`
✓ marks booking that is of same `poi_id`
✓ marks booking that `overall_status` is 3
✓ do not mark booking that is of different `task_type`
✓ do not mark booking that is of different `comment`
✓ do not mark booking that is of different `poi_id`
✓ do not mark booking that is already marked
for any existing duplicated bookings that occurs out of new booking time frame
✓ should not mark any of them
59 passing (1m)
9 pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment