From 6b7d30a701d6e9c3240fe2673b4c2c74dc1793d9 Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Fri, 27 Aug 2021 09:42:53 +0530 Subject: [PATCH] fix: restore v1 test API --- helpers/testSnippets.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(); });`, }, ]