Added API Tests
This commit is contained in:
25
API Tests/BGApp/Auth/Login.yml
Normal file
25
API Tests/BGApp/Auth/Login.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
info:
|
||||||
|
name: Login
|
||||||
|
type: http
|
||||||
|
seq: 1
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: POST
|
||||||
|
url: http://localhost:3000/api/auth/login
|
||||||
|
headers:
|
||||||
|
- name: Content-Type
|
||||||
|
value: application/json
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"email":"james@dardry.com",
|
||||||
|
"password":"Foobar"
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
18
API Tests/BGApp/Auth/Token.yml
Normal file
18
API Tests/BGApp/Auth/Token.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
info:
|
||||||
|
name: Token
|
||||||
|
type: http
|
||||||
|
seq: 2
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: http://localhost:3000/api/auth/token
|
||||||
|
headers:
|
||||||
|
- name: Cookie
|
||||||
|
value: refresh=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1IjoiMSIsInIiOiIxIiwiaWF0IjoxNzcxNTk3NjQ2LCJleHAiOjE3NzQxODk2NDZ9.07ViS5Nie3Bi2OgnlHyybDNZ9bdXPRRiqO-RFLhjoKo; Path=/; Max-Age=2592000; Secure; HttpOnly; SameSite=Lax
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
4
API Tests/BGApp/Auth/folder.yml
Normal file
4
API Tests/BGApp/Auth/folder.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
info:
|
||||||
|
name: Auth
|
||||||
|
type: folder
|
||||||
|
seq: 1
|
||||||
21
API Tests/BGApp/Game/Create.yml
Normal file
21
API Tests/BGApp/Game/Create.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
info:
|
||||||
|
name: Create
|
||||||
|
type: http
|
||||||
|
seq: 1
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: POST
|
||||||
|
url: http://localhost:3000/api/game
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"name": "Test Game3"
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
19
API Tests/BGApp/Game/Delete.yml
Normal file
19
API Tests/BGApp/Game/Delete.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
info:
|
||||||
|
name: Delete
|
||||||
|
type: http
|
||||||
|
seq: 4
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: DELETE
|
||||||
|
url: http://localhost:3000/api/game/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: bk5e
|
||||||
|
type: path
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
19
API Tests/BGApp/Game/Get.yml
Normal file
19
API Tests/BGApp/Game/Get.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
info:
|
||||||
|
name: Get
|
||||||
|
type: http
|
||||||
|
seq: 2
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: http://localhost:3000/api/game/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: bk5e
|
||||||
|
type: path
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
19
API Tests/BGApp/Game/Search.yml
Normal file
19
API Tests/BGApp/Game/Search.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
info:
|
||||||
|
name: Search
|
||||||
|
type: http
|
||||||
|
seq: 5
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: http://localhost:3000/api/game/search/:query
|
||||||
|
params:
|
||||||
|
- name: query
|
||||||
|
value: game
|
||||||
|
type: path
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
25
API Tests/BGApp/Game/Update.yml
Normal file
25
API Tests/BGApp/Game/Update.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
info:
|
||||||
|
name: Update
|
||||||
|
type: http
|
||||||
|
seq: 3
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: PATCH
|
||||||
|
url: http://localhost:3000/api/game/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: el5a
|
||||||
|
type: path
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"name":"Updated game"
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
7
API Tests/BGApp/Game/folder.yml
Normal file
7
API Tests/BGApp/Game/folder.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
info:
|
||||||
|
name: Game
|
||||||
|
type: folder
|
||||||
|
seq: 4
|
||||||
|
|
||||||
|
request:
|
||||||
|
auth: inherit
|
||||||
22
API Tests/BGApp/Invites/Accept.yml
Normal file
22
API Tests/BGApp/Invites/Accept.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
info:
|
||||||
|
name: Accept
|
||||||
|
type: http
|
||||||
|
seq: 2
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: POST
|
||||||
|
url: http://localhost:3000/api/invite/accept
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"inviteCode": "3ST6N8",
|
||||||
|
"password": "test123"
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
22
API Tests/BGApp/Invites/Create.yml
Normal file
22
API Tests/BGApp/Invites/Create.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
info:
|
||||||
|
name: Create
|
||||||
|
type: http
|
||||||
|
seq: 5
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: POST
|
||||||
|
url: http://localhost:3000/api/invite
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"email": "james+test2@dardry.com",
|
||||||
|
"playerId": "boja"
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
7
API Tests/BGApp/Invites/folder.yml
Normal file
7
API Tests/BGApp/Invites/folder.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
info:
|
||||||
|
name: Invites
|
||||||
|
type: folder
|
||||||
|
seq: 5
|
||||||
|
|
||||||
|
request:
|
||||||
|
auth: inherit
|
||||||
21
API Tests/BGApp/Players/Create.yml
Normal file
21
API Tests/BGApp/Players/Create.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
info:
|
||||||
|
name: Create
|
||||||
|
type: http
|
||||||
|
seq: 1
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: POST
|
||||||
|
url: http://localhost:3000/api/player
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"name": "Invited player2"
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
19
API Tests/BGApp/Players/Delete.yml
Normal file
19
API Tests/BGApp/Players/Delete.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
info:
|
||||||
|
name: Delete
|
||||||
|
type: http
|
||||||
|
seq: 4
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: DELETE
|
||||||
|
url: http://localhost:3000/api/player/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: bmOe
|
||||||
|
type: path
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
19
API Tests/BGApp/Players/Get.yml
Normal file
19
API Tests/BGApp/Players/Get.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
info:
|
||||||
|
name: Get
|
||||||
|
type: http
|
||||||
|
seq: 2
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: http://localhost:3000/api/player/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: ejRe
|
||||||
|
type: path
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
15
API Tests/BGApp/Players/List.yml
Normal file
15
API Tests/BGApp/Players/List.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
info:
|
||||||
|
name: List
|
||||||
|
type: http
|
||||||
|
seq: 5
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: http://localhost:3000/api/player/list
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
27
API Tests/BGApp/Players/Update.yml
Normal file
27
API Tests/BGApp/Players/Update.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
info:
|
||||||
|
name: Update
|
||||||
|
type: http
|
||||||
|
seq: 3
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: PATCH
|
||||||
|
url: http://localhost:3000/api/player/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: bmOe
|
||||||
|
type: path
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"name": "Test Player",
|
||||||
|
"isRatingLocked": true,
|
||||||
|
"canBeMultiple": false
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
7
API Tests/BGApp/Players/folder.yml
Normal file
7
API Tests/BGApp/Players/folder.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
info:
|
||||||
|
name: Players
|
||||||
|
type: folder
|
||||||
|
seq: 2
|
||||||
|
|
||||||
|
request:
|
||||||
|
auth: inherit
|
||||||
23
API Tests/BGApp/User/Create.yml
Normal file
23
API Tests/BGApp/User/Create.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
info:
|
||||||
|
name: Create
|
||||||
|
type: http
|
||||||
|
seq: 1
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: POST
|
||||||
|
url: http://localhost:3000/api/user
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"email": "Test User",
|
||||||
|
"password": "Test123",
|
||||||
|
"playerId": "enRe"
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
19
API Tests/BGApp/User/Delete.yml
Normal file
19
API Tests/BGApp/User/Delete.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
info:
|
||||||
|
name: Delete
|
||||||
|
type: http
|
||||||
|
seq: 4
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: DELETE
|
||||||
|
url: http://localhost:3000/api/user/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: ""
|
||||||
|
type: path
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
19
API Tests/BGApp/User/Get.yml
Normal file
19
API Tests/BGApp/User/Get.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
info:
|
||||||
|
name: Get
|
||||||
|
type: http
|
||||||
|
seq: 2
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: http://localhost:3000/api/user/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: ejRe
|
||||||
|
type: path
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
26
API Tests/BGApp/User/Update.yml
Normal file
26
API Tests/BGApp/User/Update.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
info:
|
||||||
|
name: Update
|
||||||
|
type: http
|
||||||
|
seq: 3
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: PATCH
|
||||||
|
url: http://localhost:3000/api/user/:id
|
||||||
|
params:
|
||||||
|
- name: id
|
||||||
|
value: ""
|
||||||
|
type: path
|
||||||
|
body:
|
||||||
|
type: json
|
||||||
|
data: |-
|
||||||
|
{
|
||||||
|
"isActive": true,
|
||||||
|
"isAdmin": false
|
||||||
|
}
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
7
API Tests/BGApp/User/folder.yml
Normal file
7
API Tests/BGApp/User/folder.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
info:
|
||||||
|
name: User
|
||||||
|
type: folder
|
||||||
|
seq: 3
|
||||||
|
|
||||||
|
request:
|
||||||
|
auth: inherit
|
||||||
40
API Tests/BGApp/opencollection.yml
Normal file
40
API Tests/BGApp/opencollection.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
opencollection: 1.0.0
|
||||||
|
|
||||||
|
info:
|
||||||
|
name: BGApp
|
||||||
|
config:
|
||||||
|
proxy:
|
||||||
|
inherit: true
|
||||||
|
config:
|
||||||
|
protocol: http
|
||||||
|
hostname: ""
|
||||||
|
port: ""
|
||||||
|
auth:
|
||||||
|
username: ""
|
||||||
|
password: ""
|
||||||
|
bypassProxy: ""
|
||||||
|
|
||||||
|
request:
|
||||||
|
auth:
|
||||||
|
type: bearer
|
||||||
|
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlalJlIiwiY2xhaW1zIjpbIkFETUlOIiwiVVNFUlNfQ1JFQVRFIiwiVVNFUlNfU0VMRl9SRUFEIiwiVVNFUlNfU0VMRl9VUERBVEUiLCJVU0VSU19TRUxGX0RFTEVURSIsIlVTRVJTX09USEVSX1JFQUQiLCJVU0VSU19PVEhFUl9VUERBVEUiXSwiaWF0IjoxNzcxNjE4NTQzLCJleHAiOjE4MDMxNTQ1NDN9.R-3Qb5CEcLJBSt7DnsO9b0IGRVYDIZuFfH1m9TikVXU
|
||||||
|
actions:
|
||||||
|
- type: set-variable
|
||||||
|
phase: after-response
|
||||||
|
selector:
|
||||||
|
expression: ${token}
|
||||||
|
method: jsonq
|
||||||
|
variable:
|
||||||
|
name: Token
|
||||||
|
scope: runtime
|
||||||
|
disabled: true
|
||||||
|
bundled: false
|
||||||
|
extensions:
|
||||||
|
bruno:
|
||||||
|
ignore:
|
||||||
|
- node_modules
|
||||||
|
- .git
|
||||||
|
presets:
|
||||||
|
request:
|
||||||
|
type: http
|
||||||
|
url: http://localhost:3000/api/
|
||||||
Reference in New Issue
Block a user