Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .spec-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.0
1 change: 1 addition & 0 deletions spec/release-bump.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
minor
205 changes: 205 additions & 0 deletions spec/tmsx-hotel-cases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
version: 1
# Ported from docs/public/doc-template/TMS_API_Integration_Test_Case.xlsx (cases 1-8, English sheet)
# into a machine-readable, parameterizable form.
#
# Field names corrected against spec/tmsx-hotel-spec.yaml during port:
# - PaxRoomRQs → PaxRooms (the actual spec field)
# - RateId → RateCode (the actual spec field on RateInfo)
# - top-level "RoomCount" → moved inside each PaxRoom entry
# - response root "HotelDetailResult.Hotels" → "Hotels"
#
# Dates are resolved at runtime via ${today+Nd} so cases never expire.

cases:
- id: TC-HOTEL-001
name: "1 adult per room, 1 room, 1 day — cancelable"
description: |
Search a hotel, pick a Refundable rate, prebook it, create the order. The captured
AgentRefID feeds TC-HOTEL-004 (cancel).
tags: [happy-path, cancelable]
variables:
check_in: "${today+30d}"
check_out: "${today+31d}"
hotel_code: 766917
adults: 1
children: 0
room_count: 1
flow:
- op: search_hotel
input:
CheckIn: "${check_in}"
CheckOut: "${check_out}"
HotelCodes: ["${hotel_code}"]
PaxRooms:
- Adults: "${adults}"
Children: "${children}"
RoomCount: "${room_count}"
assert:
- { path: "Error.ErrorCode", absent: true }
- { path: "Hotels", non_empty: true }
capture:
- { name: refundable_rate, path: "Hotels[0].RoomTypes[0].RateInfos[?Refundable==true][0]" }
- op: check_room_rate
input:
HotelCodes: ["${hotel_code}"]
CheckIn: "${check_in}"
CheckOut: "${check_out}"
RateCode: "${refundable_rate.RateCode}"
PaxRooms:
- Adults: "${adults}"
Children: "${children}"
RoomCount: "${room_count}"
assert:
- { path: "Error.ErrorCode", absent: true }
# CreateOrder requires ContactInfo, CurrencyCode, AgentRefID — TBD via integration
# questionnaire. The booking step is deliberately not exercised
# until the agent/skill workflow populates these. See follow-ups in .

- id: TC-HOTEL-002
name: "2 adults per room, 2 rooms, 1 day"
tags: [multi-room]
variables:
check_in: "${today+30d}"
check_out: "${today+31d}"
hotel_code: 766917
adults: 2
room_count: 2
flow:
- op: search_hotel
input:
CheckIn: "${check_in}"
CheckOut: "${check_out}"
HotelCodes: ["${hotel_code}"]
PaxRooms:
- Adults: "${adults}"
Children: 0
RoomCount: "${room_count}"
assert:
- { path: "Error.ErrorCode", absent: true }
- { path: "Hotels", non_empty: true }

- id: TC-HOTEL-003
name: "2 adults per room, 1 room, 7 days"
tags: [multi-night]
variables:
check_in: "${today+30d}"
check_out: "${today+37d}"
hotel_code: 766917
adults: 2
room_count: 1
flow:
- op: search_hotel
input:
CheckIn: "${check_in}"
CheckOut: "${check_out}"
HotelCodes: ["${hotel_code}"]
PaxRooms:
- Adults: "${adults}"
Children: 0
RoomCount: "${room_count}"
assert:
- { path: "Error.ErrorCode", absent: true }
- { path: "Hotels", non_empty: true }

- id: TC-HOTEL-004
name: "Cancel the order from TC-HOTEL-001"
tags: [cancel, deferred]
depends_on: [TC-HOTEL-001]
flow:
- op: cancel_order
input:
AgentRefID: "${TC-HOTEL-001.agent_ref_id}"
assert:
- { path: "Error.ErrorCode", absent: true }
- { path: "CancelResult.OrderStatus", equals: "CANCELLED" }

- id: TC-HOTEL-005
name: "1 adult per room, 1 room, 1 day — non-cancelable hotel"
description: |
Search a non-cancelable hotel rate and verify the response carries Refundable=false
or no CancelPolicyInfos.
tags: [non-cancelable]
variables:
check_in: "${today+30d}"
check_out: "${today+31d}"
hotel_code: 794946
adults: 1
room_count: 1
flow:
- op: search_hotel
input:
CheckIn: "${check_in}"
CheckOut: "${check_out}"
HotelCodes: ["${hotel_code}"]
PaxRooms:
- Adults: "${adults}"
Children: 0
RoomCount: "${room_count}"
assert:
- { path: "Error.ErrorCode", absent: true }
- { path: "Hotels", non_empty: true }

- id: TC-HOTEL-006
name: "Cancel the order from TC-HOTEL-005 — expected to fail or charge penalty"
description: |
The order in TC-HOTEL-005 is non-refundable. This case verifies the SDK surfaces
that outcome correctly. Either failure OR cancel-with-fee is acceptable.
tags: [cancel, expected-error, deferred]
depends_on: [TC-HOTEL-005]
flow:
- op: cancel_order
input:
AgentRefID: "${TC-HOTEL-005.agent_ref_id}"
# NOTE: no `Error.ErrorCode absent` assertion — failure is acceptable here.

- id: TC-HOTEL-007
name: "1 adult + 1 child per room, 1 room, 1 day"
tags: [child-age]
variables:
check_in: "${today+30d}"
check_out: "${today+31d}"
hotel_code: 7717374
adults: 1
children: 1
children_ages: [5]
room_count: 1
flow:
- op: search_hotel
input:
CheckIn: "${check_in}"
CheckOut: "${check_out}"
HotelCodes: ["${hotel_code}"]
PaxRooms:
- Adults: "${adults}"
Children: "${children}"
ChildrenAges: "${children_ages}"
RoomCount: "${room_count}"
assert:
- { path: "Error.ErrorCode", absent: true }
- { path: "Hotels", non_empty: true }

- id: TC-HOTEL-008
name: "1 adult + 2 children per room, 1 room, 1 day"
tags: [child-age, multi-child]
variables:
check_in: "${today+30d}"
check_out: "${today+31d}"
hotel_code: 2569549
adults: 1
children: 2
children_ages: [5, 6]
room_count: 1
flow:
- op: search_hotel
input:
CheckIn: "${check_in}"
CheckOut: "${check_out}"
HotelCodes: ["${hotel_code}"]
PaxRooms:
- Adults: "${adults}"
Children: "${children}"
ChildrenAges: "${children_ages}"
RoomCount: "${room_count}"
assert:
- { path: "Error.ErrorCode", absent: true }
- { path: "Hotels", non_empty: true }
Loading