Skip to content

Commit

Permalink
chore(mojaloop/#2650): run 3ppi ttk tests with 3ppi services enabled (#…
Browse files Browse the repository at this point in the history
…67)

chore(mojaloop/#2650): Run 3PPI TTK tests with 3PPI services enabled - mojaloop/project#2650
- added provisioning_thirdparty/dfspb_parties.json to load party information into DFSPB's backend simulator
- updated minor test asserts
  • Loading branch information
mdebarros authored Mar 10, 2022
1 parent b7b7f77 commit 8fa7cca
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 4 deletions.
55 changes: 55 additions & 0 deletions collections/hub/provisioning_thirdparty/dfspb_parties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "multi",
"test_cases": [
{
"id": 1,
"name": "dfspb parties upload into sim backend",
"meta": {
"info": "pisp account"
},
"fileInfo": {
"path": "hub/provisioning_thirdparty/dfspb_parties.json"
},
"requests": [
{
"id": 8,
"description": "Load 329294234 into DFSPB Backend Simulator",
"apiVersion": {
"minorVersion": 1,
"majorVersion": 0,
"type": "mojaloop_simulator"
},
"operationPath": "/repository/parties",
"path": "/repository/parties",
"method": "post",
"body": {
"displayName": "Bob Babirusa",
"firstName": "Bob",
"middleName": "O",
"lastName": "Babirusa",
"dateOfBirth": "1970-01-01",
"idType": "MSISDN",
"idValue": "329294234"
},
"url": "{$inputs.DFSPB_BACKEND_TESTAPI_URL}",
"tests": {
"assertions": [
{
"id": 1,
"description": "Status to be 204",
"exec": [
"if (response.status === 500) {",
" expect(response.body.message).to.equal(\"ID is already registered\")",
"} else {",
" expect(response.status).to.equal(204)",
"}"
]
}
]
},
"scriptingEngine": "javascript"
}
]
}
]
}
4 changes: 4 additions & 0 deletions collections/hub/provisioning_thirdparty/master.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"name": "dfspb.json",
"type": "file"
},
{
"name": "dfspb_parties.json",
"type": "file"
},
{
"name": "pisp.json",
"type": "file"
Expand Down
44 changes: 40 additions & 4 deletions collections/hub/thirdparty/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
{
"id": 1,
"name": "Account Linking: Prelinking",
"fileInfo": {
"path": "hub/thirdparty/collection.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -38,6 +41,9 @@
{
"id": 2,
"name": "Account Linking: Discovery",
"fileInfo": {
"path": "hub/thirdparty/collection.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -88,6 +94,9 @@
{
"id": 3,
"name": "Account Linking - Happy Path WEB",
"fileInfo": {
"path": "hub/thirdparty/collection.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -242,6 +251,9 @@
{
"id": 4,
"name": "Account Linking - Happy Path OTP",
"fileInfo": {
"path": "hub/thirdparty/collection.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -395,6 +407,9 @@
{
"id": 5,
"name": "Account Linking - Error @ consent request stage",
"fileInfo": {
"path": "hub/thirdparty/collection.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -453,6 +468,9 @@
{
"id": 6,
"name": "Account Linking - Error @ consent request authenticate stage",
"fileInfo": {
"path": "hub/thirdparty/collection.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -560,6 +578,9 @@
{
"id": 7,
"name": "Account Linking - Error @ consent request register credential stage",
"fileInfo": {
"path": "hub/thirdparty/collection.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -715,6 +736,9 @@
{
"id": 8,
"name": "Third Party Transaction Request - Happy Path",
"fileInfo": {
"path": "hub/thirdparty/collection.json"
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -814,21 +838,33 @@
" consentId: \"2acf1dfa-ce45-486e-b19e-ae4ad9804a63\",",
" consentRequestId: 'b5d6206c-4f06-497d-af15-ed866ea6958f',",
" scopes: [",
" { actions: ['accounts.getBalance', 'accounts.transfer'], accountId: '244431e2-7a56-40c6-814c-932631760fa9' },",
" { actions: ['accounts.getBalance', 'accounts.transfer'], accountId: '6b6e6d77-dbf4-423f-abd5-bc5854e4ab1c' }",
" { accountId: '244431e2-7a56-40c6-814c-932631760fa9', actions: ['accounts.getBalance', 'accounts.transfer'] },",
" { accountId: '6b6e6d77-dbf4-423f-abd5-bc5854e4ab1c', actions: ['accounts.getBalance', 'accounts.transfer'] }",
" ]",
"",
" },",
" challenge: \"fc315dc625bb0bb00029e706de7f38eed98dc370cd386281de46a438b8080e57\",",
" currentState: 'consentReceivedAwaitingCredential'",
"}",
"expect(response.body).to.deep.equal(expected)",
"// expect(response.body.consent.scopes).to.deep.equal(expected.consent.scopes) && ",
"// expect(response.body.consent.currentState).to.equal(expected.consent.currentState) && ",
"// expect(response.body.consent.consentRequestId).to.equal(expected.consent.consentRequestId)",
"",
"expect(response.body).to.deep.equal(expected)"
""
]
}
]
},
"url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}"
"url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}",
"scriptingEngine": "javascript",
"scripts": {
"postRequest": {
"exec": [
""
]
}
}
},
{
"id": 3,
Expand Down

0 comments on commit 8fa7cca

Please sign in to comment.