Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Only run orders-updated-then-deleted if seller-requested-cancellation is implemented #537

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This feature is **required** by the Open Booking API specification, and so must
|------------|------|-------------|---------------|
| [order-delete-idempotent](./implemented/order-delete-idempotent-test.js) | Order successfully deleted, second delete does not change the state of the first delete | Order Delete is idempotent - run C1, C2, and B then Order Delete twice - the Order Delete must return 204 in both cases | [TestOpportunityBookable](https://openactive.io/test-interface#TestOpportunityBookable) x4 |
| [order-quote-delete-idempotent](./implemented/order-quote-delete-idempotent-test.js) | Order quote successfully deleted, second delete does not change the state of the first delete | Order Delete is idempotent - run C1, C2 then Order Delete twice - the Order Delete must return 204 in both cases | [TestOpportunityBookable](https://openactive.io/test-interface#TestOpportunityBookable) x4 |
| [orders-updated-then-deleted](./implemented/orders-updated-then-deleted-test.js) | Order successfully deleted | Run C1, C2 and B, and then check Orders feed for Order, then cancel it, then run Order Deletion, and check Orders feed that Order has been deleted | [TestOpportunityBookable](https://openactive.io/test-interface#TestOpportunityBookable) x4 |
| [orders-updated-then-deleted](./implemented/orders-updated-then-deleted-test.js) | Order successfully deleted | Run C1, C2 and B, and then check Orders feed for Order, then cancel it, then run Order Deletion, and check Orders feed that Order has been deleted. NOTE: This test will only run if seller-requested-cancellation is enabled as this feature is utilised in the test | [TestOpportunityBookable](https://openactive.io/test-interface#TestOpportunityBookable) x4 |
| [unknown-order](./implemented/unknown-order-test.js) | Expect a UnknownOrderError for an Order that does not exist | Runs Order Deletion for a non-existent Order (with a fictional UUID), expecting an UnknownOrderError error to be returned | |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ const {
} = require('../../../../helpers/flow-stages');
const { OrderDeletionFlowStage } = require('../../../../helpers/flow-stages/order-deletion');

const { IMPLEMENTED_FEATURES } = global;

FeatureHelper.describeFeature(module, {
testCategory: 'core',
testFeature: 'order-deletion',
testFeatureImplemented: true,
testIdentifier: 'orders-updated-then-deleted',
testName: 'Order successfully deleted',
testDescription: 'Run C1, C2 and B, and then check Orders feed for Order, then cancel it, then run Order Deletion, and check Orders feed that Order has been deleted',
testDescription: 'Run C1, C2 and B, and then check Orders feed for Order, then cancel it, then run Order Deletion, and check Orders feed that Order has been deleted. NOTE: This test will only run if seller-requested-cancellation is enabled as this feature is utilised in the test',
// The primary opportunity criteria to use for the primary OrderItem under test
testOpportunityCriteria: 'TestOpportunityBookable',
controlOpportunityCriteria: 'TestOpportunityBookable',
runOnlyIf: IMPLEMENTED_FEATURES['seller-requested-cancellation'],
},
(configuration, orderItemCriteriaList, featureIsImplemented, logger) => {
// ## Initiate Flow Stages
Expand Down