-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add bruno to tests the APIs (#468)
- Loading branch information
1 parent
8fd7afe
commit 8684fb1
Showing
11 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
meta { | ||
name: GraphQL API | ||
type: graphql | ||
seq: 2 | ||
} | ||
|
||
post { | ||
url: {{BASE_URL}}/v2/graphql | ||
body: graphql | ||
auth: none | ||
} | ||
|
||
body:graphql { | ||
query Pouet { | ||
cards { | ||
id | ||
localId | ||
name | ||
set { | ||
id | ||
name | ||
serie { | ||
id | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
meta { | ||
name: Validate that we can run OPTIONS | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
options { | ||
url: {{BASE_URL}}/status | ||
body: none | ||
auth: none | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"version": "1", | ||
"name": "TCGdex", | ||
"type": "collection", | ||
"presets": { | ||
"requestType": "http" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
meta { | ||
name: get Card list | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: {{BASE_URL}}/v2/en/cards?sort:field=name&sort:order=DESC&pagination:page=1&pagination:itemsPerPage=4 | ||
body: none | ||
auth: none | ||
} | ||
|
||
query { | ||
sort:field: name | ||
sort:order: DESC | ||
pagination:page: 1 | ||
pagination:itemsPerPage: 4 | ||
~name: furret | ||
} | ||
|
||
docs { | ||
Fully describe the card list request, it also has every parameters it can | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
meta { | ||
name: get one card | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
get { | ||
url: {{BASE_URL}}/v2/en/cards/swsh3-136 | ||
body: none | ||
auth: none | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vars { | ||
BASE_URL: http://localhost:3000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vars { | ||
BASE_URL: https://api.tcgdex.net | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
meta { | ||
name: invalid sorting | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: {{BASE_URL}}/v2/en/sets/swsh8/53 | ||
body: none | ||
auth: none | ||
} | ||
|
||
assert { | ||
res.body.id: eq swsh8-53 | ||
res.status: eq 200 | ||
} | ||
|
||
docs { | ||
Validate the issue seen in | ||
|
||
https://github.com/tcgdex/cards-database/issues/466 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
meta { | ||
name: get a set | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
get { | ||
url: {{BASE_URL}}/v2/en/sets/swsh3 | ||
body: none | ||
auth: none | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
meta { | ||
name: get list of sets | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
get { | ||
url: {{BASE_URL}}/v2/en/sets?sort:field=name&sort:order=DESC&pagination:page=1&pagination:itemsPerPage=1&name=Dark | ||
body: none | ||
auth: none | ||
} | ||
|
||
query { | ||
sort:field: name | ||
sort:order: DESC | ||
pagination:page: 1 | ||
pagination:itemsPerPage: 1 | ||
name: Dark | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
meta { | ||
name: get one card from a set | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: {{BASE_URL}}/v2/en/cards/swsh3 | ||
body: none | ||
auth: none | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} |