-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Milestone
Description
Description
It's important to allow the user to select a local file during the Breakpoint.
Video: ✅ See the video on Slack
Acceptance Criteria
- Able to select a local file to replace the current body. Works with Request or Response Breakpoint.
- Replace the Content-Type if need -> Show the alert
- The body is correctly updated with a local file
- Write Unit Tests for 3 following scenarios
How to test
- Make a POST Request -> Create a
on RequestBreakpoint - Click on the Request Body Tab -> Select Local File
Scenario 1: Select a text-based file
- Check if the mime type of the select file -> If it's different than the Content-Type of the Request or Response -> Show the alert
- YES: Change the Content-Type header -> Still replace the body
- NO: Don't change the Content-Type -> Still replace the body
- Replace with a new body
- Execute
- Verify ✅ that the client gets new data
Scenario 2: Select an Image
- Check if the mime type of the select file -> If it's different than the Content-Type of the Request or Response -> Show the alert
- YES: Change the Content-Type header -> Still replace the body
- NO: Don't change the Content-Type -> Still replace the body
- Replace with a new body -> Show the Image preview
- Execute
- Verify ✅ that the client gets new data
Scenario 3: Select a non-text file (binary, pdf, ...)
- Check if the mime type of the select file -> If it's different than the Content-Type of the Request or Response -> Show the alert
- YES: Change the Content-Type header -> Still replace the body
- NO: Don't change the Content-Type -> Still replace the body
- Replace with a new body -> Show body
- Execute
- Verify ✅ that the client gets new data
