Open JMasr opened 7 months ago
A possible solution is just remove the HTTP verbs on the request name
`pm.test("Old request updated", () => { let oldRequest = folder.item.find(req => {return req.name === "raw text"}) pm.expect(oldRequest.name, 'check name').equals("raw text") pm.expect(oldRequest.request.method, 'check method').equals("POST") pass += 1 })
pm.test("New request added", () => { pm.expect(folder.item.length, 'check number of requests').equals(2)
let newRequest = folder.item.find(req => { return req.name === "query params"})
pm.expect(newRequest.name, 'check name').equals("query params")
pm.expect(newRequest.request.method, 'check method').equals("GET")
pm.expect(newRequest.request.url.query.length, 'check parameters').equals(2)
pass += 1
})`
Describe the bug The test 4 and test 5 on the submit request for "Day 02: Collections and environments" in the "30 Days of Postman - for developers" always fail because the request name used is different to the actual name of the previous requests.
URL of where you see the bug Post-response scripts on the lines: 25, 26, 34, and 35
To Reproduce Steps to reproduce the behavior:
Expected behavior After complete the instructions correctly, the test must be on green and only be red if the data were wrong.
Screenshots
Desktop (please complete the following information):