Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 3.51 KB

File metadata and controls

43 lines (26 loc) · 3.51 KB

< Return to Overview

Named leasing, including leaseExpires (named-leasing)

Leasing at C2, reserving a space in the opportunity after the Customer has provided their contact information

https://www.openactive.io/open-booking-api/EditorsDraft/#leasing

Coverage Status: complete

Test prerequisites - Opportunities

Opportunities that match the following criteria must exist in the booking system (for each configured bookableOpportunityTypesInScope) for the configured primary Seller in order to use useRandomOpportunities: true. Alternatively the following testOpportunityCriteria values must be supported by the test interface of the booking system for useRandomOpportunities: false.

TestOpportunityBookableFiveSpaces x2, TestOpportunityBookableOneSpace x2, TestOpportunityBookable x4

Running tests for only this feature

npm start -- --runInBand test/features/leasing/named-leasing/

'Implemented' tests

Update default.json within packages/openactive-integration-tests/config/ as follows to enable 'Implemented' testing for this feature:

"implementedFeatures": {
  ...
  "named-leasing": true,
  ...
}
Identifier Name Description Prerequisites per Opportunity Type Required Test Interface Actions
lease-opportunity-multiple-capacity-update Multiple named leased spaces are unavailable for purchase by other users For an opportunity with 2 spaces: Check the opportunity has 2 spaces in the feed. Run C1 and C2 to book one item (creating an named lease) - during this run call C2 twice, and check that both times there are still 2 remaining spaces from this UUID's perspective. Check the opportunity has 1 space in the feed. Run C1 and C2 again for a new Order UUID for the same opportunity attempting to book 3 spaces, expecting OrderItems to be returned with 1 having no errors, 1 having an OpportunityCapacityIsReservedByLeaseError, and 1 having an OpportunityHasInsufficientCapacityError. TestOpportunityBookableFiveSpaces x2
lease-opportunity-unit-capacity-update Single named leased space is unavailable for purchase by other users For an opportunity with 1 spaces: Check the opportunity has 1 space in the feed. Run C1 and C2 to book one item (creating an named lease) - during this run call C2 twice, and check that both times there are still 1 remaining space from this UUID's perspective. Check the opportunity has 0 space in the feed. Run C1 and C2 again for a new Order UUID for the same opportunity attempting to book 1 space, expecting OrderItems to be returned having an OpportunityCapacityIsReservedByLeaseError. TestOpportunityBookableOneSpace x2
lease-response Response at C2 includes a "lease" with a "leaseExpires" in the future Named lease returned at C2 reserves the OrderItems for a specified length of time TestOpportunityBookable x4