* feat: bru.sendRequest api
* updated the postman-translations logic to handle `pm.sendRequest` to `bru.sendRequest` translations, and added unit tests
* ~ removed `maxRedirects` and `proxy` values for sendRequest axios-instance
~ fixed the imports for the `send-request-transformer` function
~ `sendRequest` and `runRequest` will return same response object in both safe and developer mode
~ sendRequest function optimization
* revert sendRequest to async function, added a testcase for sendRequest with url string
* sendRequest callback errors handling
* updated tests and added await for the callbacks
---------
Co-authored-by: lohit <lohit@usebruno.com>
- Improved the Codegen setup
- Removed the app-launch related boilerplate from tests
- Enable recording mode by default
- Option to provide the test file name to save the recording
- Added GitHub workflow to run Playwright tests with Electron in
Headless mode(mocking display using `xvfb`).
* move interpolateMockVars function inside the main interpolate logic inside bruno-common.
* improve comments for JSON escaping logic in interpolate function
* update faker-functions to use CommonJS module syntax to satisfy jest and add regex validation tests
---------
Co-authored-by: sanjai0py <sanjailucifer666@gmail.com>
Co-authored-by: ramki-bruno <ramki@usebruno.com>
This contains the bulk of the changes apart from renaming files.
This is a continuation of #2341.
Co-authored-by: lohit <lohit@usebruno.com>
Co-authored-by: pooja-bruno <pooja@usebruno.com>
* Fix: Revert selective JSON parsing where string response is not parsed
- Revert "Merge pull request #3706 from Pragadesh-45/fix/response-format-updates"
- e897dc1eb0
- Revert "Merge pull request #3676 from pooja-bruno/fix/string-json-response"
- 1f2bee1f90
* Fix: Revert interpreting Assert RHS-value wrapped in quotes literally
- Revert "Merge pull request #3806 from Pragadesh-45/fix/handle-assert-results"
- 63d3cb380d
- Revert "Merge pull request #3805 from Pragadesh-45/fix/handle-assert-results"
- 6abd063749
* Fix: Inconsistent JSON formatting in preview when encoded value is a string
* Fix: Prettify JSON for Res-preview without parsing to avoid JS specific roundings
* Fix(testbench): req.body is always Buffer after the binary req body related changes
* Added `/api/echo/custom` where response can be configured using request itself
* Added tests for validating Assert and Response-preview
Co-authored-by: Pragadesh-45 <temporaryg7904@gmail.com>
* Handle char-encoding in Response-preview and added more tests
* Updated API endpoint in tests to use httpfaker api
* QuickJS (Safe Mode) exec logic to handle template literals similar to Developer Mode
* Safe Mode bru.runRequest to return statusText similar to Developer Mode
---------
Co-authored-by: ramki-bruno <ramki@usebruno.com>
Co-authored-by: Anoop M D <anoop.md1421@gmail.com>