fix alias folder ordering and request bodies in Postman collection

This commit is contained in:
2026-04-07 16:16:11 -06:00
parent 2f369c0b17
commit fa4529e123

View File

@@ -3844,6 +3844,43 @@
}
]
},
{
"name": "Create Customer - admin 201",
"request": {
"method": "POST",
"url": "{{baseUrl}}/api/v1/customers",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"Alias\",\n \"lastName\": \"Customer\",\n \"fullName\": \"Alias Customer\",\n \"email\": \"alias.customer.{{}}@example.com\",\n \"phone\": \"555-200-3000\",\n \"role\": \"CUSTOMER\",\n \"active\": true\n}"
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 201', function () {",
" pm.response.to.have.status(201);",
"});",
"var jsonData = pm.response.json();",
"if (jsonData.id !== undefined) pm.collectionVariables.set('customerId', jsonData.id);"
]
}
}
]
},
{
"name": "Get Customer - staff 200",
"request": {
@@ -3906,41 +3943,6 @@
}
]
},
{
"name": "Create Customer - admin 201",
"request": {
"method": "POST",
"url": "{{baseUrl}}/api/v1/customers",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"Alias\",\n \"lastName\": \"Customer\",\n \"email\": \"alias.cust@example.com\",\n \"password\": \"Test1234!\",\n \"role\": \"CUSTOMER\"\n}"
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 201', function () {",
" pm.response.to.have.status(201);",
"});"
]
}
}
]
},
{
"name": "Update Customer - admin 200",
"request": {
@@ -3959,7 +3961,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"AliasUpdated\"\n}"
"raw": "{\n \"firstName\": \"Alias\",\n \"lastName\": \"CustomerUpdated\",\n \"fullName\": \"Alias CustomerUpdated\",\n \"email\": \"alias.customer.updated.{{}}@example.com\",\n \"phone\": \"555-200-3001\",\n \"role\": \"CUSTOMER\",\n \"active\": true\n}"
}
},
"event": [
@@ -4621,6 +4623,43 @@
}
]
},
{
"name": "Create Employee - admin 201",
"request": {
"method": "POST",
"url": "{{baseUrl}}/api/v1/employees",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"username\": \"aliasemployee{{}}\",\n \"password\": \"Test1234!\",\n \"firstName\": \"Alias\",\n \"lastName\": \"Employee\",\n \"fullName\": \"Alias Employee\",\n \"email\": \"alias.employee.{{}}@petshop.com\",\n \"phone\": \"403-555-0300\",\n \"role\": \"STAFF\",\n \"staffRole\": \"GROOMER\",\n \"primaryStoreId\": 1,\n \"active\": true\n}"
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 201', function () {",
" pm.response.to.have.status(201);",
"});",
"var jsonData = pm.response.json();",
"if (jsonData.id !== undefined) pm.collectionVariables.set('employeeId', jsonData.id);"
]
}
}
]
},
{
"name": "Get Employee - admin 200",
"request": {
@@ -4652,41 +4691,6 @@
}
]
},
{
"name": "Create Employee - admin 201",
"request": {
"method": "POST",
"url": "{{baseUrl}}/api/v1/employees",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"Alias\",\n \"lastName\": \"Employee\",\n \"email\": \"alias.staff@example.com\",\n \"password\": \"Test1234!\",\n \"role\": \"STAFF\"\n}"
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 201', function () {",
" pm.response.to.have.status(201);",
"});"
]
}
}
]
},
{
"name": "Update Employee - admin 200",
"request": {
@@ -4705,7 +4709,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"AliasUpdated\"\n}"
"raw": "{\n \"firstName\": \"Alias\",\n \"lastName\": \"EmployeeUpdated\",\n \"fullName\": \"Alias EmployeeUpdated\",\n \"email\": \"alias.employee.updated.{{}}@petshop.com\",\n \"phone\": \"403-555-0301\",\n \"role\": \"STAFF\",\n \"staffRole\": \"VET\",\n \"primaryStoreId\": 1,\n \"active\": true\n}"
}
},
"event": [