Summary|
Tags|
Feature:
availability/rooms-availability.feature|
Consult room availability for a stay
Scenario: [1:15]
Return a seeded single room when no active block exists
ms: 483
>>
Background:
4
* def validators = read('classpath:common/validators.js')
32
5
* def workflows = read('classpath:common/workflows.js')
36
6
* def data = read('availability-data.json')
29
7
* def System = Java.type('java.lang.System')
2
8
* def runSalt = System.currentTimeMillis() % 365
4
9
* def baselineRange = workflows.futureRange(120, 2, runSalt)
9
10
* def ddtSearchRange = workflows.futureRange(130, 2, runSalt)
2
11
* def nonOverlapHoldRange = workflows.futureRange(140, 2, runSalt)
2
12
* def fullBlockRange = workflows.futureRange(150, 1, runSalt)
2
16
* def result = call read('classpath:common/api-helpers.feature@listAvailableRooms') baselineRange
317
>>
common.api-helpers
294
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
18
13:45:59.068 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
2
4
* def token = authToken
1
13:45:59.053 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
1
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
16
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
3
13
And param checkin = payload.checkin
1
14
And param checkout = payload.checkout
1
15
When method get
252
13:45:59.278 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2026-11-12&checkout=2026-11-14
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:45:59.334 response time in milliseconds: 53
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
2
17
* match result.status == 200
11
18
* match each result.response contains { id: '#string', room_number: '#string', hotel_id: '#string', type: '#string', price_per_night: '#string', capacity: '#number', amenities: '#[]', created_at: '#string', updated_at: '#string' }
10
19
* def availableSingles = result.response.filter(function(room){ return room.type == data.knownAvailableRoom.type && room.capacity == data.knownAvailableRoom.capacity })
26
20
* assert availableSingles.length > 0
1
Scenario: [2:23]
Keep a room visible when its hold does not overlap the search range
ms: 324
>>
Background:
4
* def validators = read('classpath:common/validators.js')
2
5
* def workflows = read('classpath:common/workflows.js')
2
6
* def data = read('availability-data.json')
1
7
* def System = Java.type('java.lang.System')
0
8
* def runSalt = System.currentTimeMillis() % 365
0
9
* def baselineRange = workflows.futureRange(120, 2, runSalt)
1
10
* def ddtSearchRange = workflows.futureRange(130, 2, runSalt)
1
11
* def nonOverlapHoldRange = workflows.futureRange(140, 2, runSalt)
1
12
* def fullBlockRange = workflows.futureRange(150, 1, runSalt)
1
24
* def sharedAvailability = workflows.sharedAvailability(baselineRange, nonOverlapHoldRange, 'No hay habitaciones que esten disponibles en ambos rangos para validar HU2-02')
116
>>
common.api-helpers
32
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
10
13:45:59.469 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:45:59.461 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
19
13:45:59.473 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2027-01-08&checkout=2027-01-10
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:45:59.486 response time in milliseconds: 11
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
>>
common.api-helpers
36
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
12
13:45:59.523 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:45:59.514 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
22
13:45:59.527 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2027-01-28&checkout=2027-01-30
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:45:59.546 response time in milliseconds: 15
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
25
* def candidate = sharedAvailability.room
1
26
* def hold = call read('classpath:common/api-helpers.feature@createHold') { roomId: '#(candidate.id)', checkin: '#(nonOverlapHoldRange.checkin)', checkout: '#(nonOverlapHoldRange.checkout)' }
132
>>
common.api-helpers
109
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
24
13:45:59.604 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:45:59.582 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
1
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
1
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
1
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
1
25
When method post
80
13:45:59.658 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/d27b6e80-5854-4b7d-afea-cb8d9a0f6403/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-01-28","checkout":"2027-01-30"}
13:45:59.687 response time in milliseconds: 28
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-rKOIyIF+SOS8p1t6YK9b332w9po"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","checkin":"2027-01-28T00:00:00.000Z","checkout":"2027-01-30T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:55:59.675Z","payment_id":null,"reservation_id":null,"id":"674236cd-653c-4936-8130-15b01abdd363","created_at":"2026-04-13T13:45:59.669Z","updated_at":"2026-04-13T13:45:59.669Z"}
26
* def status = responseStatus
0
27
* match hold.status == 201
2
28
* def after = workflows.availability(baselineRange)
61
>>
common.api-helpers
35
4
* url baseUrl
1
5
* def authContext = callonce read('classpath:auth/login.feature')
14
13:45:59.731 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:45:59.719 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
19
13:45:59.737 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2027-01-08&checkout=2027-01-10
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:45:59.750 response time in milliseconds: 11
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
29
* assert validators.containsRoom(after.response, candidate.room_number, candidate.hotel_id)
3
Scenario: [3.1:43]
Remove a room from availability when an active hold overlaps the requested dates
ms: 209
>>
Background:
4
* def validators = read('classpath:common/validators.js')
1
5
* def workflows = read('classpath:common/workflows.js')
2
6
* def data = read('availability-data.json')
0
7
* def System = Java.type('java.lang.System')
0
8
* def runSalt = System.currentTimeMillis() % 365
0
9
* def baselineRange = workflows.futureRange(120, 2, runSalt)
1
10
* def ddtSearchRange = workflows.futureRange(130, 2, runSalt)
1
11
* def nonOverlapHoldRange = workflows.futureRange(140, 2, runSalt)
1
12
* def fullBlockRange = workflows.futureRange(150, 1, runSalt)
1
33
* def holdRange = overlapKind == 'exact' ? ddtSearchRange : workflows.rangeFromOffsets(131, 134, runSalt)
1
34
* def sharedAvailability = workflows.sharedAvailability(ddtSearchRange, holdRange, 'No hay habitaciones compatibles entre el rango buscado y el rango del hold para TC-HU2-03')
122
>>
common.api-helpers
48
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
14
13:45:59.802 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:45:59.790 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
4
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
30
13:45:59.812 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2026-12-22&checkout=2026-12-24
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:45:59.833 response time in milliseconds: 16
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
>>
common.api-helpers
36
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
8
13:45:59.863 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:45:59.857 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
26
13:45:59.871 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2026-12-22&checkout=2026-12-24
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:45:59.890 response time in milliseconds: 17
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
35
* def candidate = sharedAvailability.room
0
36
* def hold = call read('classpath:common/api-helpers.feature@createHold') { roomId: '#(candidate.id)', checkin: '#(holdRange.checkin)', checkout: '#(holdRange.checkout)' }
43
>>
common.api-helpers
25
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
7
13:45:59.924 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:45:59.918 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
1
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
1
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
1
25
When method post
13
13:45:59.930 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/d27b6e80-5854-4b7d-afea-cb8d9a0f6403/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2026-12-22","checkout":"2026-12-24"}
13:45:59.941 response time in milliseconds: 10
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-mED1/1c381tV6GLFS/mH1A28Kbo"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","checkin":"2026-12-22T00:00:00.000Z","checkout":"2026-12-24T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:55:59.937Z","payment_id":null,"reservation_id":null,"id":"8cd00055-df64-4d86-a5bd-3e62481a7c6a","created_at":"2026-04-13T13:45:59.934Z","updated_at":"2026-04-13T13:45:59.934Z"}
26
* def status = responseStatus
0
37
* match hold.status == 201
1
38
* def after = workflows.availability(ddtSearchRange)
33
>>
common.api-helpers
23
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
9
13:45:59.962 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:45:59.956 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
12
13:45:59.966 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2026-12-22&checkout=2026-12-24
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:45:59.975 response time in milliseconds: 8
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 7779
1 < ETag: W/"1e63-xAsjw5CbQhii/k6Z9TnwxrVXtN8"
1 < Date: Mon, 13 Apr 2026 13:45:59 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
39
* assert !validators.containsRoom(after.response, candidate.room_number, candidate.hotel_id)
2
Scenario: [3.2:44]
Remove a room from availability when an active hold overlaps the requested dates
ms: 154
>>
Background:
4
* def validators = read('classpath:common/validators.js')
5
5
* def workflows = read('classpath:common/workflows.js')
1
6
* def data = read('availability-data.json')
2
7
* def System = Java.type('java.lang.System')
0
8
* def runSalt = System.currentTimeMillis() % 365
0
9
* def baselineRange = workflows.futureRange(120, 2, runSalt)
1
10
* def ddtSearchRange = workflows.futureRange(130, 2, runSalt)
1
11
* def nonOverlapHoldRange = workflows.futureRange(140, 2, runSalt)
1
12
* def fullBlockRange = workflows.futureRange(150, 1, runSalt)
1
33
* def holdRange = overlapKind == 'exact' ? ddtSearchRange : workflows.rangeFromOffsets(131, 134, runSalt)
2
34
* def sharedAvailability = workflows.sharedAvailability(ddtSearchRange, holdRange, 'No hay habitaciones compatibles entre el rango buscado y el rango del hold para TC-HU2-05')
67
>>
common.api-helpers
25
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
7
13:46:00.025 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:46:00.019 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
1
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
1
15
When method get
15
13:46:00.031 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2027-08-08&checkout=2027-08-10
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:46:00.042 response time in milliseconds: 10
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
>>
common.api-helpers
17
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
5
13:46:00.057 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.054 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
11
13:46:00.060 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2027-08-09&checkout=2027-08-12
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:46:00.069 response time in milliseconds: 8
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
35
* def candidate = sharedAvailability.room
0
36
* def hold = call read('classpath:common/api-helpers.feature@createHold') { roomId: '#(candidate.id)', checkin: '#(holdRange.checkin)', checkout: '#(holdRange.checkout)' }
37
>>
common.api-helpers
28
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
6
13:46:00.088 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.084 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
20
13:46:00.092 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/d27b6e80-5854-4b7d-afea-cb8d9a0f6403/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-08-09","checkout":"2027-08-12"}
13:46:00.110 response time in milliseconds: 17
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-diHfkLxSkboQ4Q2WCDxi3Zpig8U"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","checkin":"2027-08-09T00:00:00.000Z","checkout":"2027-08-12T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.105Z","payment_id":null,"reservation_id":null,"id":"ab54a181-8b6b-4606-b8a6-723584f95dc8","created_at":"2026-04-13T13:46:00.100Z","updated_at":"2026-04-13T13:46:00.100Z"}
26
* def status = responseStatus
0
37
* match hold.status == 201
3
38
* def after = workflows.availability(ddtSearchRange)
31
>>
common.api-helpers
20
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
5
13:46:00.129 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.125 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
1
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
13
13:46:00.133 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2027-08-08&checkout=2027-08-10
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:46:00.143 response time in milliseconds: 8
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 7779
1 < ETag: W/"1e63-xAsjw5CbQhii/k6Z9TnwxrVXtN8"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
39
* assert !validators.containsRoom(after.response, candidate.room_number, candidate.hotel_id)
2
Scenario: [6:65]
Return an empty list when every currently available room is blocked for the range
ms: 471
>>
Background:
4
* def validators = read('classpath:common/validators.js')
2
5
* def workflows = read('classpath:common/workflows.js')
3
6
* def data = read('availability-data.json')
1
7
* def System = Java.type('java.lang.System')
0
8
* def runSalt = System.currentTimeMillis() % 365
0
9
* def baselineRange = workflows.futureRange(120, 2, runSalt)
1
10
* def ddtSearchRange = workflows.futureRange(130, 2, runSalt)
1
11
* def nonOverlapHoldRange = workflows.futureRange(140, 2, runSalt)
1
12
* def fullBlockRange = workflows.futureRange(150, 1, runSalt)
1
66
* def after = workflows.blockAllAvailableRooms(fullBlockRange)
461
>>
common.api-helpers
18
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
6
13:46:00.178 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.174 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
10
13:46:00.182 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2027-02-05&checkout=2027-02-06
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:46:00.190 response time in milliseconds: 7
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 8465
1 < ETag: W/"2111-iw1OH1B0pJ4JTTZkoYQBu2w352k"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[{"id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","room_number":"101","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"80.00","capacity":1,"amenities":["wifi","ac","tv"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"13764c05-6734-44bb-b340-e4e6c3d26360","room_number":"102","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SINGLE","price_per_night":"85.00","capacity":1,"amenities":["wifi","ac"],"floor":1,"wing":"Este","image_url":"https://images.unsplash.com/photo-1611892440504-42a792e24d32?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","room_number":"101","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SINGLE","price_per_night":"90.00","capacity":1,"amenities":["wifi","ac","sea_view"],"floor":1,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1618773928121-c32242e63f39?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"86452b51-a524-491e-874b-c3a03f073951","room_number":"201","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"150.00","capacity":2,"amenities":["wifi","ac","tv","minibar"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"78e289e4-86a8-4b21-aded-a6a867968c50","room_number":"202","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"155.00","capacity":2,"amenities":["wifi","ac","tv","minibar","balcony"],"floor":2,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1590490360182-c33d955bc37b?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","room_number":"203","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"DOUBLE","price_per_night":"160.00","capacity":3,"amenities":["wifi","ac","tv","jacuzzi"],"floor":2,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1566665797739-1674de7a421a?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","room_number":"201","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"180.00","capacity":2,"amenities":["wifi","ac","tv","sea_view"],"floor":2,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1595576508898-0ad5c879a061?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","room_number":"202","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"DOUBLE","price_per_night":"200.00","capacity":2,"amenities":["wifi","ac","tv","sea_view","balcony"],"floor":2,"wing":"Este","image_url":"https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","room_number":"301","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"350.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view"],"floor":3,"wing":"Norte","image_url":"https://images.unsplash.com/photo-1578683010236-d716f9a3f461?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","room_number":"302","hotel_id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","type":"SUITE","price_per_night":"400.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","ocean_view","living_room"],"floor":3,"wing":"Sur","image_url":"https://images.unsplash.com/photo-1591088398332-8a7791972843?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"0a83ea14-49de-42d9-bee2-592adb53e2aa","name":"Hotel Grand Buenos Aires","city":"Buenos Aires","country":"Argentina","address":"Av. Corrientes 1234, CABA","latitude":"-34.603700","longitude":"-58.381600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"e5a1e909-46d3-4826-91d4-55937088c2b4","room_number":"301","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"450.00","capacity":4,"amenities":["wifi","ac","tv","minibar","jacuzzi","panoramic_view"],"floor":3,"wing":"Oeste","image_url":"https://images.unsplash.com/photo-1582719508461-905c673771fd?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}},{"id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","room_number":"305","hotel_id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","type":"SUITE","price_per_night":"500.00","capacity":5,"amenities":["wifi","ac","tv","minibar","jacuzzi","pool_access","butler"],"floor":3,"wing":"Este","image_url":"https://images.unsplash.com/photo-1568495248636-6432b97bd949?w=400","created_at":"2026-04-13T13:44:53.333Z","updated_at":"2026-04-13T13:44:53.333Z","hotel":{"id":"b36dad63-3fab-4f4b-81a7-608e4bb99523","name":"Hotel Mar del Plata Palace","city":"Mar del Plata","country":"Argentina","address":"Blvd. Marítimo 5678","latitude":"-38.005500","longitude":"-57.542600","created_at":"2026-04-13T13:44:53.330Z","updated_at":"2026-04-13T13:44:53.330Z"}}]
16
* def status = responseStatus
0
>>
common.api-helpers
25
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
6
13:46:00.224 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.219 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
16
13:46:00.228 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/d27b6e80-5854-4b7d-afea-cb8d9a0f6403/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.242 response time in milliseconds: 13
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-nAIpzUEDloUabAZ4GNGZw9ANc1Y"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"d27b6e80-5854-4b7d-afea-cb8d9a0f6403","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.235Z","payment_id":null,"reservation_id":null,"id":"4290db70-9e56-4f0f-a315-f56aa137448b","created_at":"2026-04-13T13:46:00.231Z","updated_at":"2026-04-13T13:46:00.231Z"}
26
* def status = responseStatus
1
>>
common.api-helpers
25
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
9
13:46:00.263 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:46:00.256 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
1
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
13
13:46:00.269 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/13764c05-6734-44bb-b340-e4e6c3d26360/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.278 response time in milliseconds: 9
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-v+cGBAXpU7eYc3U+XVMDHXQoGGI"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"13764c05-6734-44bb-b340-e4e6c3d26360","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.275Z","payment_id":null,"reservation_id":null,"id":"e266a729-3a4c-4c27-8409-ec04bde19bd6","created_at":"2026-04-13T13:46:00.272Z","updated_at":"2026-04-13T13:46:00.272Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
19
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
5
13:46:00.290 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.286 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
12
13:46:00.293 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/6d29609d-b4bf-4fa1-ac1f-294e03b2bae7/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.304 response time in milliseconds: 10
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-SMQKlJ2W1VQpsEiTrZ1pluUtZJU"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"6d29609d-b4bf-4fa1-ac1f-294e03b2bae7","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.300Z","payment_id":null,"reservation_id":null,"id":"a76a73b5-07a6-4817-b4e9-e189719863df","created_at":"2026-04-13T13:46:00.296Z","updated_at":"2026-04-13T13:46:00.296Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
28
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
9
13:46:00.325 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.318 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
18
13:46:00.331 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/86452b51-a524-491e-874b-c3a03f073951/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.344 response time in milliseconds: 13
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-sPm85qZ+p6ou/Kof0ZFqQzqMQeI"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"86452b51-a524-491e-874b-c3a03f073951","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.338Z","payment_id":null,"reservation_id":null,"id":"e44ddf29-69ad-4ac9-9f72-dddb087786e7","created_at":"2026-04-13T13:46:00.333Z","updated_at":"2026-04-13T13:46:00.333Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
29
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
8
13:46:00.365 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.358 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
19
13:46:00.371 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/78e289e4-86a8-4b21-aded-a6a867968c50/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.385 response time in milliseconds: 12
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-joMnllAZ5Z/Vin5oNoUFKDzaons"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"78e289e4-86a8-4b21-aded-a6a867968c50","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.378Z","payment_id":null,"reservation_id":null,"id":"8703ba54-ab70-4410-a58e-ca8491ddd261","created_at":"2026-04-13T13:46:00.375Z","updated_at":"2026-04-13T13:46:00.375Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
22
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
4
13:46:00.396 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.393 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
16
13:46:00.400 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/c5a894af-2f7c-42ed-97ab-915643cfbb3f/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.413 response time in milliseconds: 12
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-MqucJFQAoPS25DmJ9f25fpTBbgo"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"c5a894af-2f7c-42ed-97ab-915643cfbb3f","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.409Z","payment_id":null,"reservation_id":null,"id":"6ec3000f-88a9-479d-8883-a780be49a6bf","created_at":"2026-04-13T13:46:00.403Z","updated_at":"2026-04-13T13:46:00.403Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
17
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
5
13:46:00.428 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.424 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
10
13:46:00.431 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/bb73416d-d7b3-462f-94ad-8ee00bdf2926/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.440 response time in milliseconds: 8
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-hTVIcRCZzwnDhecocZIPZMXxZA4"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"bb73416d-d7b3-462f-94ad-8ee00bdf2926","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.436Z","payment_id":null,"reservation_id":null,"id":"26af152e-b6ae-4ff7-bd25-06bb3e2a24bb","created_at":"2026-04-13T13:46:00.433Z","updated_at":"2026-04-13T13:46:00.433Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
17
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
5
13:46:00.451 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:46:00.447 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
1
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
10
13:46:00.454 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/63aae5a4-a09b-42ca-bac7-3ff65055c884/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.463 response time in milliseconds: 8
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-KFheJajebAGpwDl1MZzQkGBerNY"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"63aae5a4-a09b-42ca-bac7-3ff65055c884","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.460Z","payment_id":null,"reservation_id":null,"id":"81f652e4-c4b5-42d8-8911-b971a4034ccb","created_at":"2026-04-13T13:46:00.456Z","updated_at":"2026-04-13T13:46:00.456Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
19
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
4
13:46:00.475 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.472 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
0
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
1
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
1
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
1
25
When method post
12
13:46:00.480 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/5a084d3f-8efe-4fd6-8b4d-6cbfb823306b/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.490 response time in milliseconds: 9
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-EUZ/BS0x1QzRM/jibMnxAI0SOis"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"5a084d3f-8efe-4fd6-8b4d-6cbfb823306b","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.486Z","payment_id":null,"reservation_id":null,"id":"c0785acc-d0ff-4779-9bc8-2773419c9e4e","created_at":"2026-04-13T13:46:00.482Z","updated_at":"2026-04-13T13:46:00.482Z"}
26
* def status = responseStatus
1
>>
common.api-helpers
26
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
6
13:46:00.509 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.504 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
17
13:46:00.515 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.531 response time in milliseconds: 15
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-PWAWQtDZ8wd6/gQfhWjOFXQEpWI"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"8c6fb30a-1172-46bd-aaac-c7c9dc5ce5d5","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.527Z","payment_id":null,"reservation_id":null,"id":"ce495c79-092b-4484-a3e4-a71a5d1617ef","created_at":"2026-04-13T13:46:00.523Z","updated_at":"2026-04-13T13:46:00.523Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
25
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
9
13:46:00.552 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.544 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
15
13:46:00.556 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/e5a1e909-46d3-4826-91d4-55937088c2b4/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.568 response time in milliseconds: 12
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-fbM9+KXCIo+W1E8Z6LO7v6ON06E"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"e5a1e909-46d3-4826-91d4-55937088c2b4","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.565Z","payment_id":null,"reservation_id":null,"id":"78e1e051-209e-4003-8465-90f5cb4606c9","created_at":"2026-04-13T13:46:00.561Z","updated_at":"2026-04-13T13:46:00.561Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
23
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
7
13:46:00.589 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:46:00.583 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
20
* def payload = __arg
0
21
* def requestHeaders = payload.headers ? karate.merge(baseHeaders, payload.headers) : baseHeaders
0
22
* configure headers = requestHeaders
0
23
Given path 'rooms', payload.roomId, 'hold'
0
24
And request { checkin: '#(payload.checkin)', checkout: '#(payload.checkout)' }
0
25
When method post
14
13:46:00.591 request:
1 > POST http://127.0.0.1:3100/api/v1/rooms/9cc078f6-19be-40a0-9f2f-b2f9b023da80/hold
1 > Accept: application/json
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 48
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
{"checkin":"2027-02-05","checkout":"2027-02-06"}
13:46:00.604 response time in milliseconds: 12
1 < 201
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 348
1 < ETag: W/"15c-2KgBwwvOTTfS5fYg+yVvpheAX30"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"room_id":"9cc078f6-19be-40a0-9f2f-b2f9b023da80","checkin":"2027-02-05T00:00:00.000Z","checkout":"2027-02-06T00:00:00.000Z","status":"PENDING","expires_at":"2026-04-13T13:56:00.601Z","payment_id":null,"reservation_id":null,"id":"fe6b17d8-c9b7-4521-baf5-e2bfd8bfe60a","created_at":"2026-04-13T13:46:00.598Z","updated_at":"2026-04-13T13:46:00.598Z"}
26
* def status = responseStatus
0
>>
common.api-helpers
16
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
4
13:46:00.615 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
0
4
* def token = authToken
0
13:46:00.611 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
0
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
1
13
And param checkin = payload.checkin
1
14
And param checkout = payload.checkout
0
15
When method get
9
13:46:00.620 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2027-02-05&checkout=2027-02-06
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:46:00.626 response time in milliseconds: 5
1 < 200
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 2
1 < ETag: W/"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
[]
16
* def status = responseStatus
0
67
* match after.response == []
0
Scenario: [7:70]
Reject availability searches when checkin is in the past
ms: 48
>>
Background:
4
* def validators = read('classpath:common/validators.js')
5
5
* def workflows = read('classpath:common/workflows.js')
14
6
* def data = read('availability-data.json')
1
7
* def System = Java.type('java.lang.System')
0
8
* def runSalt = System.currentTimeMillis() % 365
1
9
* def baselineRange = workflows.futureRange(120, 2, runSalt)
1
10
* def ddtSearchRange = workflows.futureRange(130, 2, runSalt)
1
11
* def nonOverlapHoldRange = workflows.futureRange(140, 2, runSalt)
1
12
* def fullBlockRange = workflows.futureRange(150, 1, runSalt)
1
71
* def pastRange = { checkin: '2026-04-03', checkout: '2026-04-04' }
0
72
* def result = call read('classpath:common/api-helpers.feature@listAvailableRooms') pastRange
18
>>
common.api-helpers
13
4
* url baseUrl
0
5
* def authContext = callonce read('classpath:auth/login.feature')
6
13:46:00.680 << lock released, cached callonce: read('classpath:auth/login.feature')
>>
auth.login
1
4
* def token = authToken
0
13:46:00.675 >> lock acquired, begin callonce: read('classpath:auth/login.feature')
5
* def headers = token ? { Authorization: 'Bearer ' + token } : {}
0
6
* def baseHeaders = karate.merge(defaultHeaders, authContext.headers)
1
7
* configure headers = baseHeaders
0
11
* def payload = __arg
0
12
Given path 'rooms', 'available'
0
13
And param checkin = payload.checkin
0
14
And param checkout = payload.checkout
0
15
When method get
6
13:46:00.683 request:
1 > GET http://127.0.0.1:3100/api/v1/rooms/available?checkin=2026-04-03&checkout=2026-04-04
1 > Accept: application/json
1 > Content-Type: application/json
1 > Host: 127.0.0.1:3100
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.18)
1 > Accept-Encoding: gzip,deflate
13:46:00.687 response time in milliseconds: 4
1 < 400
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: http://localhost:5173
1 < Vary: Origin
1 < Content-Type: application/json; charset=utf-8
1 < Content-Length: 87
1 < ETag: W/"57-Iw34cHsQNgl6/w0SnrjSmOG04j4"
1 < Date: Mon, 13 Apr 2026 13:46:00 GMT
1 < Connection: keep-alive
1 < Keep-Alive: timeout=5
{"message":["checkin debe ser hoy o posterior"],"error":"Bad Request","statusCode":400}
16
* def status = responseStatus
0
73
* match result.status == 400
1
74
* match result.response.error == 'Bad Request'
1
75
* match result.response.statusCode == 400
0
76
* match result.response.message[0] contains 'checkin debe ser hoy o posterior'
1