-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hide options that do not belong to Cypress.RequestOptions
from "Request:" in the HTML
#197
base: master
Are you sure you want to change the base?
Conversation
Hi @aubincc ! |
Sure, I'll see if I can have a look. |
Tests for default behaviour and set behaviour: property is hidden
Tests for default behaviour and set behaviour: property is hidden
Create hides-failOnStatusCode.cy.ts
Show fail on status code
failOnStatusCode is now hidden in HTML of req body Following bahmutov#197 Set Cypress env var API_SHOW_FAILONSTATUSCODE to true to reveal it. Added tests along with it. 😉 at @LeJeanbono
Nice one ! interface Loggable {
log: boolean
}
interface Failable {
failOnStatusCode: boolean
retryOnStatusCodeFailure: boolean
retryOnNetworkFailure: boolean
} To only show what's depend on pure request stuff : interface RequestOptions {
auth: object
body: RequestBody
encoding: Encodings
followRedirect: boolean
form: boolean
gzip: boolean
headers: object
method: HttpMethod
qs: object
url: string
} What's do you think ? |
I think of a question:
|
|
Alright, please be nice and patient now, today was my first go at TypeScript ever 🥵 |
I have done it and it is working but I'm running into a little bit of a nightmare when pushing. |
Update branch only-requestoptions
Replacing details for: API_SHOW_FAILONSTATUSCODE with: API_SHOW_GENUINE_REQUEST_OPTIONS_ONLY
With Cypress env var API_SHOW_GENUINE_REQUEST_OPTIONS_ONLY only genuineRequestOptions are kept in the displayed Request info
Added Cypress env var `API_SHOW_GENUINE_REQUEST_OPTIONS_ONLY` Removed Cypress env var `API_SHOW_FAILONSTATUSCODE` This new boolean variable, if set to true, will filter out all keys which are not genuinely sent to the API. `log`, `failOnStatusCode`, `retryOnStatusCodeFailure`, `retryOnNetworkFailure` will be removed from sight. All the others belonging to Cypress.RequestOptions will be kept.
Cypress.RequestOptions
from "Request:" in the HTML
I'd like a review @LeJeanbono My next goal would be to convert the |
Keeping track
Are you done @aubincc ? |
Done with the RequestOptions yes, would you care to verify my code? About the querystring, I will see to that another time. |
@LeJeanbono what must I do now? |
This does not make a big difference, but I have never found it useful to have this property shown in the HTML.
If you like I can turn it into an option.