Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix: restore v1 test API

liyasthomas6b7d30a701d6
diff --git a/helpers/testSnippets.js b/helpers/testSnippets.js
index 9b88b9eda..06d12f814 100644
--- a/helpers/testSnippets.js
+++ b/helpers/testSnippets.js
@@ -3,7 +3,7 @@ export default [
name: "Response: Status code is 200",
script: `\n\n// Check status code is 200
pw.test("Status code is 200", ()=> {
- pw.expect(pw.response.statusCode).toBe(200);
+ pw.expect(pw.response.status).toBe(200);
});`,
},
{
@@ -18,28 +18,28 @@ pw.test("Status code is 200", ()=> {
name: "Status code: Status code is 2xx",
script: `\n\n// Check status code is 2xx
pw.test("Status code is 2xx", ()=> {
- pw.expect(pw.response.statusCode).toBeLevel2xx();
+ pw.expect(pw.response.status).toBeLevel2xx();
});`,
},
{
name: "Status code: Status code is 3xx",
script: `\n\n// Check status code is 3xx
pw.test("Status code is 3xx", ()=> {
- pw.expect(pw.response.statusCode).toBeLevel3xx();
+ pw.expect(pw.response.status).toBeLevel3xx();
});`,
},
{
name: "Status code: Status code is 4xx",
script: `\n\n// Check status code is 4xx
pw.test("Status code is 4xx", ()=> {
- pw.expect(pw.response.statusCode).toBeLevel4xx();
+ pw.expect(pw.response.status).toBeLevel4xx();
});`,
},
{
name: "Status code: Status code is 5xx",
script: `\n\n// Check status code is 5xx
pw.test("Status code is 5xx", ()=> {
- pw.expect(pw.response.statusCode).toBeLevel5xx();
+ pw.expect(pw.response.status).toBeLevel5xx();
});`,
},
]