Skip to content

Commit

Permalink
chore(release): v14.0.0-rc (#76)
Browse files Browse the repository at this point in the history
- fix: error response message for ID not found on ALS p2p subid error test
- fix: fixed POST scenario response validation path checks
- fix: added missing `currency2` to noresponsepayeefsp SIM for https://modusbox.atlassian.net/browse/MBP-613
- fix: block transfer GP test to correctly set toFixed on final amount when adding 2 fixed numbers
- fix: updated toFixed mappings to be wrapped by a Numbers as the FSPIOP spec demands that trailing zeros are cut
- chore: improvements to fulfil-reserveed-v1.0 timing stability
  - increased timeout by default from 1000 to 2000 ms
  - increased final get from 15s to 16s as the default timeout handler runs every 15s by default
  • Loading branch information
mdebarros authored Jul 28, 2022
1 parent 98b9da8 commit 5f01837
Show file tree
Hide file tree
Showing 10 changed files with 362 additions and 250 deletions.
4 changes: 2 additions & 2 deletions collections/hub/golden_path/feature_tests/block_transfer.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
"requestVariables.quoteId = '{$function.generic.generateUUID}'",
"requestVariables.transactionId = '{$function.generic.generateUUID}'",
"",
"requestVariables.amount = -Number(environment.payerSettlementAccountBalance).toFixed(2) - Number(environment.payerPositionBeforeTransfer).toFixed(2) + 1000;",
"requestVariables.amount = Number((-Number(environment.payerSettlementAccountBalance).toFixed(2) - Number(environment.payerPositionBeforeTransfer).toFixed(2) + 1000).toFixed(2));",
"",
"if(environment.ENABLE_JWS_SIGNING) {",
" custom.jws.signRequest(environment.TTKFSP_JWS_KEY)",
Expand Down Expand Up @@ -1141,7 +1141,7 @@
"requestVariables.quoteId = '{$function.generic.generateUUID}'",
"requestVariables.transactionId = '{$function.generic.generateUUID}'",
"",
"requestVariables.amount = -Number(environment.payerSettlementAccountBalance).toFixed(2) - Number(environment.payerPositionBeforeTransfer).toFixed(2) - 500;",
"requestVariables.amount = Number((-Number(environment.payerSettlementAccountBalance).toFixed(2) - Number(environment.payerPositionBeforeTransfer).toFixed(2) - 500).toFixed(2));",
"",
"if(environment.ENABLE_JWS_SIGNING) {",
" custom.jws.signRequest(environment.TTKFSP_JWS_KEY)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"exec": [
"expect(environment.put_parties_type_id_subid_error.body.errorInformation.errorCode).to.equal('3200')",
"",
"expect(environment.put_parties_type_id_subid_error.body.errorInformation.errorDescription).to.equal('Generic ID not found')"
"expect(environment.put_parties_type_id_subid_error.body.errorInformation.errorDescription).to.equal('ID not found')"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"meta": {
"info": "Positive Scenarios"
},
"fileInfo": {
"path": "golden_path/feature_tests/post_scenarios/positive.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -411,63 +414,63 @@
"id": 20,
"description": "Quote amount matches",
"exec": [
"expect(response.body.scenario1.result.quoteResponse.transferAmount.amount).to.equal('10')"
"expect(response.body.scenario1.result.quoteResponse.body.transferAmount.amount).to.equal('10')"
]
},
{
"id": 21,
"description": "Currency matches",
"exec": [
"expect(response.body.scenario1.result.quoteResponse.transferAmount.currency).to.equal(environment.SIMPAYER_CURRENCY)"
"expect(response.body.scenario1.result.quoteResponse.body.transferAmount.currency).to.equal(environment.SIMPAYER_CURRENCY)"
]
},
{
"id": 22,
"description": "Quote response expiration is not null",
"exec": [
"expect(response.body.scenario1.result.quoteResponse.expiration).to.not.equal(undefined)"
"expect(response.body.scenario1.result.quoteResponse.body.expiration).to.not.equal(undefined)"
]
},
{
"id": 23,
"description": "Quote response ilp packet is not null",
"exec": [
"expect(response.body.scenario1.result.quoteResponse.ilpPacket).to.not.equal(undefined)"
"expect(response.body.scenario1.result.quoteResponse.body.ilpPacket).to.not.equal(undefined)"
]
},
{
"id": 24,
"description": "Quote response condition is not null",
"exec": [
"expect(response.body.scenario1.result.quoteResponse.condition).to.not.equal(undefined)"
"expect(response.body.scenario1.result.quoteResponse.body.condition).to.not.equal(undefined)"
]
},
{
"id": 25,
"description": "Payee fee amount is zero (0)",
"exec": [
"expect(response.body.scenario2.result.quoteResponse.payeeFspFee.amount).to.equal('0')"
"expect(response.body.scenario2.result.quoteResponse.body.payeeFspFee.amount).to.equal('0')"
]
},
{
"id": 26,
"description": "Payee fee currency matches",
"exec": [
"expect(response.body.scenario1.result.quoteResponse.payeeFspFee.currency).to.equal(environment.SIMPAYEE_CURRENCY)"
"expect(response.body.scenario1.result.quoteResponse.body.payeeFspFee.currency).to.equal(environment.SIMPAYEE_CURRENCY)"
]
},
{
"id": 27,
"description": "Payee commission amount is zero (0)",
"exec": [
"expect(response.body.scenario2.result.quoteResponse.payeeFspCommission.amount).to.equal('0')"
"expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')"
]
},
{
"id": 28,
"description": "Payee FSP commission currency matches",
"exec": [
"expect(response.body.scenario1.result.quoteResponse.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)"
"expect(response.body.scenario1.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)"
]
},
{
Expand Down Expand Up @@ -593,14 +596,14 @@
"id": 46,
"description": "Transfer Amount matches",
"exec": [
"expect(response.body.scenario2.result.quoteResponse.transferAmount.amount).to.equal('10')"
"expect(response.body.scenario2.result.quoteResponse.body.transferAmount.amount).to.equal('10')"
]
},
{
"id": 47,
"description": "Currency matches",
"exec": [
"expect(response.body.scenario2.result.quoteResponse.transferAmount.currency).to.equal(environment.SIMPAYER_CURRENCY)"
"expect(response.body.scenario2.result.quoteResponse.body.transferAmount.currency).to.equal(environment.SIMPAYER_CURRENCY)"
]
},
{
Expand Down Expand Up @@ -628,21 +631,21 @@
"id": 51,
"description": "Payee FSP Fee is zero (0)",
"exec": [
"expect(response.body.scenario2.result.quoteResponse.payeeFspFee.amount).to.equal('0')"
"expect(response.body.scenario2.result.quoteResponse.body.payeeFspFee.amount).to.equal('0')"
]
},
{
"id": 52,
"description": "Payee FSP commission is zero (0)",
"exec": [
"expect(response.body.scenario2.result.quoteResponse.payeeFspCommission.amount).to.equal('0')"
"expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')"
]
},
{
"id": 53,
"description": "Transfer currency matches",
"exec": [
"expect(response.body.scenario2.result.quoteResponse.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)"
"expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)"
]
},
{
Expand All @@ -656,7 +659,7 @@
"id": 55,
"description": "Transfer state is 'COMMITTED'",
"exec": [
"expect(response.body.scenario2.result.fulfil.transferState).to.equal('COMMITTED')"
"expect(response.body.scenario2.result.fulfil.body.transferState).to.equal('COMMITTED')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"meta": {
"info": "Reserve Notification Positive - Testfsp1 Testfsp2"
},
"fileInfo": {
"path": "golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json"
},
"requests": [
{
"id": 2,
Expand Down Expand Up @@ -405,7 +408,7 @@
"description": "Transfer amount matches",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.transferAmount.amount).to.equal('10')",
" expect(response.body.scenario1.result.quoteResponse.body.transferAmount.amount).to.equal('10')",
"}"
]
},
Expand All @@ -414,7 +417,7 @@
"description": "Currency matches",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.transferAmount.currency).to.equal(environment.SIMPAYER_CURRENCY)",
" expect(response.body.scenario1.result.quoteResponse.body.transferAmount.currency).to.equal(environment.SIMPAYER_CURRENCY)",
"}"
]
},
Expand All @@ -423,7 +426,7 @@
"description": "Quote response expiration is not null",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.expiration).to.not.equal(undefined)",
" expect(response.body.scenario1.result.quoteResponse.body.expiration).to.not.equal(undefined)",
"}"
]
},
Expand All @@ -432,7 +435,7 @@
"description": "Quote request ILP packet is not null",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.ilpPacket).to.not.equal(undefined)",
" expect(response.body.scenario1.result.quoteResponse.body.ilpPacket).to.not.equal(undefined)",
"}"
]
},
Expand All @@ -441,7 +444,7 @@
"description": "Quote response condition is not null",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.condition).to.not.equal(undefined)",
" expect(response.body.scenario1.result.quoteResponse.body.condition).to.not.equal(undefined)",
"}"
]
},
Expand All @@ -450,7 +453,7 @@
"description": "Payee Fee amount is 0",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.payeeFspFee.amount).to.equal('0')",
" expect(response.body.scenario1.result.quoteResponse.body.payeeFspFee.amount).to.equal('0')",
"}"
]
},
Expand All @@ -459,7 +462,7 @@
"description": "Payee fee currency matches",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.payeeFspFee.currency).to.equal(environment.SIMPAYEE_CURRENCY)",
" expect(response.body.scenario1.result.quoteResponse.body.payeeFspFee.currency).to.equal(environment.SIMPAYEE_CURRENCY)",
"}"
]
},
Expand All @@ -468,7 +471,7 @@
"description": "Payee FSP commission amount is '0'",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.payeeFspCommission.amount).to.equal('0')",
" expect(response.body.scenario1.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')",
"}"
]
},
Expand All @@ -477,7 +480,7 @@
"description": "Payee FSP commission currency matches",
"exec": [
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario1.result.quoteResponse.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)",
" expect(response.body.scenario1.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)",
"}"
]
},
Expand Down Expand Up @@ -667,7 +670,7 @@
"",
"",
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario2.result.quoteResponse.transferAmount.amount).to.equal('10')",
" expect(response.body.scenario2.result.quoteResponse.body.transferAmount.amount).to.equal('10')",
"}"
]
},
Expand All @@ -678,7 +681,7 @@
"",
"",
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario2.result.quoteResponse.transferAmount.currency).to.equal(environment.SIMPAYER_CURRENCY)",
" expect(response.body.scenario2.result.quoteResponse.body.transferAmount.currency).to.equal(environment.SIMPAYER_CURRENCY)",
"}"
]
},
Expand Down Expand Up @@ -722,7 +725,7 @@
"",
"",
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario2.result.quoteResponse.payeeFspFee.amount).to.equal('0')",
" expect(response.body.scenario2.result.quoteResponse.body.payeeFspFee.amount).to.equal('0')",
"}"
]
},
Expand All @@ -733,7 +736,7 @@
"",
"",
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario2.result.quoteResponse.payeeFspFee.currency).to.equal(environment.SIMPAYEE_CURRENCY)",
" expect(response.body.scenario2.result.quoteResponse.body.payeeFspFee.currency).to.equal(environment.SIMPAYEE_CURRENCY)",
"}"
]
},
Expand All @@ -744,7 +747,7 @@
"",
"",
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario2.result.quoteResponse.payeeFspCommission.amount).to.equal('0')",
" expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')",
"}"
]
},
Expand All @@ -755,7 +758,7 @@
"",
"",
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario2.result.quoteResponse.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)",
" expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)",
"}"
]
},
Expand All @@ -777,7 +780,7 @@
"",
"",
"if (environment.TEST_NOTIFICATIONS) {",
" expect(response.body.scenario2.result.fulfil.transferState).to.equal('COMMITTED')",
" expect(response.body.scenario2.result.fulfil.body.transferState).to.equal('COMMITTED')",
"}"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@
"scripts": {
"preRequest": {
"exec": [
"requestVariables.transferExpiration = new Date(new Date().getTime() + 1000).toISOString()",
"const additionalTimeoutExpiration = Number.parseFloat(environment.ADDITIONAL_TIMEOUT_EXPIRATION_MS) || 2000;",
"",
"requestVariables.transferExpiration = new Date(new Date().getTime() + additionalTimeoutExpiration).toISOString()",
""
]
}
Expand Down Expand Up @@ -533,7 +535,7 @@
}
},
"scriptingEngine": "javascript",
"delay": "15000",
"delay": "16000",
"tests": {
"assertions": [
{
Expand Down
Loading

0 comments on commit 5f01837

Please sign in to comment.