openactive / OpenActive.Server.NET

.NET server library, including an OpenActive Reference Implementation
MIT License
0 stars 7 forks source link

When amending an OrderQuote from Opportunities X to Opportunities Y, the capacity on X do NOT get restored #168

Open lukehesluke opened 3 years ago

lukehesluke commented 3 years ago

Example test run:

amending-order-quote_amend-c1-and-c2_OpenBookingSimpleFlow_ScheduledSession.md

Since Opportunities X are no longer in an active OrderQuote, the lease should be released.

Assumption: Leases should release capacity immediately to OrderItems that no longer form part of the OrderQuote. And they should take capacity immediately from new OrderItems added to the OrderQuote

Acceptance Criteria

When working on this, be sure to use a coverage/* branch (more info about coverage branches) and start a branch in Test Suite with the same name.

In this branch on Test Suite, search for all instances of https://github.com/openactive/OpenActive.Server.NET/issues/168 in the code. Here's an example of one:

https://github.com/openactive/openactive-test-suite/blob/e92f7ab1f89ac4a7b9a818e6bd0763eb58876d43/packages/openactive-integration-tests/test/features/core/amending-order-quote/common.js#L52-L53

Update it so that the comment and the doSkip line (which includes RUN_TESTS_WHICH_FAIL_REFIMPL) are removed for each instance. The effect of this will be turning on the post-OrderQuote-amendment capacity checks in Test Suite.

The acceptance criteria is that this branch of Test Suite passes against the OpenActive.Server.Net branch


This was revealed while working on this Test Suite issue: openactive/openactive-test-suite#460