Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add extended support for versioned entities in the CLI (#3912)
- Loading branch information
1 parent
fc20b76
commit 7621ff2
Showing
14 changed files
with
352 additions
and
159 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
84 changes: 0 additions & 84 deletions
84
packages/hoppscotch-cli/src/__tests__/functions/checks/isRESTCollection.spec.ts
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
packages/hoppscotch-cli/src/__tests__/samples/collections/coll-v1-req-v0.json
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 @@ | ||
{ | ||
"v": 1, | ||
"name": "coll-v1", | ||
"folders": [], | ||
"requests": [ | ||
{ | ||
"url": "https://httpbin.org", | ||
"path": "/get", | ||
"headers": [ | ||
{ "key": "Inactive-Header", "value": "Inactive Header", "active": false }, | ||
{ "key": "Authorization", "value": "Bearer token123", "active": true } | ||
], | ||
"params": [ | ||
{ "key": "key", "value": "value", "active": true }, | ||
{ "key": "inactive-key", "value": "inactive-param", "active": false } | ||
], | ||
"name": "req-v0", | ||
"method": "GET", | ||
"preRequestScript": "", | ||
"testScript": "pw.test(\"Asserts request params\", () => {\n pw.expect(pw.response.body.args.key).toBe(\"value\")\n pw.expect(pw.response.body.args[\"inactive-key\"]).toBe(undefined)\n})\n\npw.test(\"Asserts request headers\", () => {\n pw.expect(pw.response.body.headers[\"Authorization\"]).toBe(\"Bearer token123\")\n pw.expect(pw.response.body.headers[\"Inactive-Header\"]).toBe(undefined)\n})", | ||
"contentType": "application/json", | ||
"body": "", | ||
"auth": "Bearer Token", | ||
"bearerToken": "token123" | ||
} | ||
] | ||
} |
48 changes: 48 additions & 0 deletions
48
packages/hoppscotch-cli/src/__tests__/samples/collections/coll-v1-req-v1.json
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,48 @@ | ||
{ | ||
"v": 1, | ||
"name": "coll-v1", | ||
"folders": [], | ||
"requests": [ | ||
{ | ||
"v": "1", | ||
"endpoint": "https://httpbin.org/get", | ||
"headers": [ | ||
{ | ||
"key": "Inactive-Header", | ||
"value": "Inactive Header", | ||
"active": false | ||
}, | ||
{ | ||
"key": "Authorization", | ||
"value": "Bearer token123", | ||
"active": true | ||
} | ||
], | ||
"params": [ | ||
{ | ||
"key": "key", | ||
"value": "value", | ||
"active": true | ||
}, | ||
{ | ||
"key": "inactive-key", | ||
"value": "inactive-param", | ||
"active": false | ||
} | ||
], | ||
"name": "req-v1", | ||
"method": "GET", | ||
"preRequestScript": "", | ||
"testScript": "pw.test(\"Asserts request params\", () => {\n pw.expect(pw.response.body.args.key).toBe(\"value\")\n pw.expect(pw.response.body.args[\"inactive-key\"]).toBe(undefined)\n})\n\npw.test(\"Asserts request headers\", () => {\n pw.expect(pw.response.body.headers[\"Authorization\"]).toBe(\"Bearer token123\")\n pw.expect(pw.response.body.headers[\"Inactive-Header\"]).toBe(undefined)\n})", | ||
"body": { | ||
"contentType": null, | ||
"body": null | ||
}, | ||
"auth": { | ||
"authType": "bearer", | ||
"authActive": true, | ||
"token": "token123" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.