-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0df6e81
commit ad0c68c
Showing
26 changed files
with
251 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...test/features/payment/free-opportunities/implemented/opportunity-free-idempotency-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const { omit } = require('lodash'); | ||
const { FeatureHelper } = require('../../../../helpers/feature-helper'); | ||
const { FlowStageRecipes, FlowStageUtils } = require('../../../../helpers/flow-stages'); | ||
|
||
FeatureHelper.describeFeature(module, { | ||
testCategory: 'payment', | ||
testFeature: 'free-opportunities', | ||
testFeatureImplemented: true, | ||
testIdentifier: 'opportunity-free-idempotency', | ||
testName: 'Successful booking of free opportunity with idempotency', | ||
testDescription: 'Testing idempotency of the B call for free opportunities', | ||
testOpportunityCriteria: 'TestOpportunityBookableFree', | ||
// This must also be TestOpportunityBookableFree as the entire Order must be free. | ||
controlOpportunityCriteria: 'TestOpportunityBookableFree', | ||
}, (configuration, orderItemCriteriaList, featureIsImplemented, logger) => { | ||
const { | ||
fetchOpportunities, | ||
bookRecipe, | ||
defaultFlowStageParams, | ||
bookRecipeArgs, | ||
} = FlowStageRecipes.initialiseSimpleC1C2BookFlow(orderItemCriteriaList, logger); | ||
const idempotentRepeatB = FlowStageRecipes.idempotentRepeatBAfterBook( | ||
orderItemCriteriaList, | ||
bookRecipe, | ||
defaultFlowStageParams, | ||
omit(bookRecipeArgs, ['prerequisite']), | ||
); | ||
FlowStageUtils.describeRunAndCheckIsSuccessfulAndValid(fetchOpportunities); | ||
FlowStageUtils.describeRunAndCheckIsSuccessfulAndValid(bookRecipe); | ||
describe('idempotent repeat B', () => { | ||
FlowStageUtils.describeRunAndCheckIsSuccessfulAndValid(idempotentRepeatB); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.