cypress
cypress copied to clipboard
feat: Add RequestResponseBody #22378
Additional details
- Added RequestResponseBody interface.
- This change improves the typing and structure of the project.
- Added a test case for the added RequestResponseBody interface.
Steps to test
- Created a responseBody object of type RequestResponseBody with a placeholder JSON object.
- The test case to checks the basic structure of the RequestResponseBody interface.
PR tasks
- Add interface to improve typing structure.
Questions for reviewers
- Should more fields be added to the interface?
- Create a Draft Pull Request if your PR is not ready for review. Mark the PR as Ready for Review when you're ready for a Cypress team member to review the PR.
@JohnKalan Thanks for the contribution. Couple things:
- You'll need to sign the CLA
- Can you expand on the need for this change? Depending on how your service responds the
body
field can be a variety of things which is why it's genericized asT
. To fit your use case you could simply pass an appropriate generic tocy.request
like so:
type MyResponseType = {
json: JSON
}
cy.request<MyResponseType>(...)
- This would need test updates to
cypress/cli/types/tests/kitchen-sink.ts
30 flaky tests on run #48240 ↗︎
![]() |
![]() |
![]() |
![]() |
![]() |
Details:
Add changelog entry | |||
Project: cypress | Commit: bd36070094 |
||
Status: Passed | Duration: 23:04 💡 | ||
Started: Jun 26, 2023 5:45 PM | Ended: Jun 26, 2023 6:08 PM |
commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox
Test | Artifacts | |
---|---|---|
network stubbing > intercepting request > can delay and throttle a StaticResponse |
Output
|
commands/files.cy.js • 1 flaky test • 5x-driver-firefox
Test | Artifacts | |
---|---|---|
... > throws when there is an error writing the file |
Output
|
cypress/cypress.cy.js • 3 flaky tests • 5x-driver-firefox
Test | Artifacts | |
---|---|---|
... > correctly returns currentRetry |
Output
|
|
... > correctly returns currentRetry |
Output
|
|
... > correctly returns currentRetry |
Output
|
commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron
Test | Artifacts | |
---|---|---|
network stubbing > intercepting request > can delay and throttle a StaticResponse |
Output
Video
|
e2e/origin/navigation.cy.ts • 1 flaky test • 5x-driver-electron
Test | Artifacts | |
---|---|---|
delayed navigation > errors > redirects to an unexpected cross-origin and calls another command in the cy.origin command |
Output
Video
|
The first 5 flaky specs are shown, see all 17 specs in Cypress Cloud.
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
This PR has not had any activity in 180 days. If no activity is detected in the next 14 days, this PR will be closed.
This PR has been closed due to inactivity