Skip to content

Commit

Permalink
Add missing control unit WireMock stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Nov 24, 2023
1 parent 1879fe6 commit 4f66e0b
Show file tree
Hide file tree
Showing 13 changed files with 146 additions and 37 deletions.
17 changes: 17 additions & 0 deletions frontend/cypress/mappings/delete-control_unit_contacts-*.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"request": {
"method": "DELETE",
"urlPattern": "/api/v1/control_unit_contacts/[0-9]+"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
},
"jsonBody": {}
}
}
17 changes: 17 additions & 0 deletions frontend/cypress/mappings/delete-control_unit_resources-*.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"request": {
"method": "DELETE",
"urlPattern": "/api/v1/control_unit_resources/[0-9]+"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
},
"jsonBody": {}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"request": {
"method": "PUT",
"url": "/api/v1/control_unit_contacts/*"
"method": "GET",
"urlPattern": "/api/v1/control_unit_resources/[0-9]+/can_delete"
},
"response": {
"status": 200,
Expand All @@ -10,6 +10,8 @@
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*"
},
"jsonBody": {}
"jsonBody": {
"value": true
}
}
}
16 changes: 16 additions & 0 deletions frontend/cypress/mappings/options-control_unit_contacts.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"request": {
"method": "OPTIONS",
"urlPattern": "/api/v1/control_unit_contacts.*"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
}
}
}
16 changes: 16 additions & 0 deletions frontend/cypress/mappings/options-control_unit_resources.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"request": {
"method": "OPTIONS",
"urlPattern": "/api/v1/control_unit_resources.*"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
}
}
}
16 changes: 16 additions & 0 deletions frontend/cypress/mappings/options-control_units.v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"request": {
"method": "OPTIONS",
"urlPattern": "/api/v2/control_units.*"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
}
}
}
6 changes: 4 additions & 2 deletions frontend/cypress/mappings/post-control_unit_contacts.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"response": {
"status": 201,
"headers": {
"Content-Type": "application/json",
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*"
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
},
"jsonBody": {}
}
Expand Down
6 changes: 4 additions & 2 deletions frontend/cypress/mappings/post-control_unit_resources.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"response": {
"status": 201,
"headers": {
"Content-Type": "application/json",
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*"
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
},
"jsonBody": {}
}
Expand Down
15 changes: 0 additions & 15 deletions frontend/cypress/mappings/post-control_units.v2.json

This file was deleted.

17 changes: 17 additions & 0 deletions frontend/cypress/mappings/put-control_unit_contacts-*.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"request": {
"method": "PUT",
"urlPattern": "/api/v1/control_unit_contacts/[0-9]+"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
},
"jsonBody": {}
}
}
17 changes: 17 additions & 0 deletions frontend/cypress/mappings/put-control_unit_resources-*.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"request": {
"method": "PUT",
"urlPattern": "/api/v1/control_unit_resources/[0-9]+"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
},
"jsonBody": {}
}
}
15 changes: 0 additions & 15 deletions frontend/cypress/mappings/put-control_unit_resources.v1.json

This file was deleted.

17 changes: 17 additions & 0 deletions frontend/cypress/mappings/put-control_units-*.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"request": {
"method": "PUT",
"urlPattern": "/api/v2/control_units/[0-9]+"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers": "*",
"Content-Type": "application/json"
},
"jsonBody": {}
}
}

0 comments on commit 4f66e0b

Please sign in to comment.