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

chore: alter test cases that check for exact error description #170

Merged
merged 2 commits into from
Nov 4, 2024
Merged
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 @@ -239,7 +239,11 @@
"description": "Payer side Callback Body - Error Description is Destination FSP Error",
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Unsupported participant')",
" if(environment.API_TYPE === 'fspiop') {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Unsupported participant')",
" } else {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.not.equal(undefined)",
" }",
"}"
]
}
Expand Down Expand Up @@ -418,7 +422,11 @@
"description": "Payer side Callback Body - Error Description is Generic validation error",
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Generic validation error - Participant')",
" if(environment.API_TYPE === 'fspiop') {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Generic validation error - Participant')",
" } else {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.not.equal(undefined)",
" }",
"}"
]
}
Expand Down Expand Up @@ -985,4 +993,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@
"description": "Payer side Callback Body - Error Description is Destination FSP Error",
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Unsupported participant')",
" if(environment.API_TYPE === 'fspiop') {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Unsupported participant')",
" } else {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.not.equal(undefined)",
" }",
"}"
]
}
Expand Down Expand Up @@ -454,7 +458,11 @@
"description": "Payer side Callback Body - Error Description is Generic ID not found",
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" if(environment.API_TYPE === 'fspiop') {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Generic ID not found - Payer proxy or payee proxy not found')",
" } else {",
" expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.not.equal(undefined)",
" }",
"}"
]
}
Expand Down Expand Up @@ -1017,4 +1025,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,11 @@
"id": 3,
"description": "Error description should be returned",
"exec": [
"expect(typeof callback.body.errorInformation.errorDescription).to.equal('string');"
"if(environment.API_TYPE === 'fspiop') {",
"expect(typeof callback.body.errorInformation.errorDescription).to.equal('string');",
"} else {",
"expect(callback.body.errorInformation.errorDescription).to.not.equal(undefined);",
"}"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,11 @@
"id": 11,
"description": "Payee Side Callback Body - Response Error Description is Modified request",
"exec": [
"if (environment.API_TYPE === 'fspiop') {",
"expect(requestVariables.payeeCallback.body.errorInformation['errorDescription']).to.equal('Modified request')",
""
"} else {",
"expect(requestVariables.payeeCallback.body.errorInformation['errorDescription']).to.not.equal(undefined)",
"}"
]
}
]
Expand Down Expand Up @@ -978,4 +981,4 @@
}
}
]
}
}
14 changes: 11 additions & 3 deletions collections/hub/golden_path/feature_tests/get_transfers.json
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,11 @@
"description": "Payee FSP: Error Description should be returned",
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" expect(requestVariables.payeeCallback.data.errorInformation.errorDescription).to.equal('Generic client error')",
" if(environment.API_TYPE === 'fspiop') {",
" expect(requestVariables.payeeCallback.data.errorInformation.errorDescription).to.equal('Generic client error')",
" } else {",
" expect(requestVariables.payeeCallback.data.errorInformation.errorDescription).to.not.equal(undefined)",
" }",
"}"
]
}
Expand Down Expand Up @@ -981,7 +985,11 @@
"id": 11,
"description": "Payer FSP: Error Description should be returned",
"exec": [
"expect(callback.body.errorInformation.errorDescription).to.equal('Transfer ID not found - Provided Transfer ID was not found on the server.')"
"if(environment.API_TYPE === 'fspiop') {",
"expect(callback.body.errorInformation.errorDescription).to.equal('Transfer ID not found - Provided Transfer ID was not found on the server.')",
"} else {",
"expect(callback.body.errorInformation.errorDescription).to.not.equal(undefined)",
"}"
]
}
]
Expand All @@ -1008,4 +1016,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,11 @@
"id": 4,
"description": "Callback Body - errorDescription is Transfer expired",
"exec": [
"if (environment.API_TYPE === 'fspiop') {",
"expect(callback.body.errorInformation.errorDescription).to.equal('Transfer expired')",
""
"} else {",
"expect(callback.body.errorInformation.errorDescription).to.not.equal(undefined)",
"}"
]
}
]
Expand Down Expand Up @@ -510,14 +513,16 @@
"id": 19,
"description": "Callback Body - error cause in extensionList",
"exec": [
"if (environment.API_TYPE === 'fspiop') {",
"expect(callback.body).to.have.property('extensionList')",
"expect(callback.body.extensionList).to.have.property('extension')",
"",
"const filteredExtensionListForCause = callback.body.extensionList.extension.filter(ext => ext.key === \"cause\")",
"",
"expect(filteredExtensionListForCause.length).to.equal(1)",
"",
"expect(filteredExtensionListForCause[0].value).to.equal(\"3303: Transfer expired\")"
"expect(filteredExtensionListForCause[0].value).to.equal(\"3303: Transfer expired\")",
"}"
]
}
]
Expand Down Expand Up @@ -642,4 +647,4 @@
}
}
]
}
}