-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add resourceType
support to cy.intercept()
on req
/routeMatcher
#25075
Conversation
Thanks for taking the time to open a PR!
|
@@ -38,7 +38,6 @@ export default defineConfig({ | |||
delete process.env.CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT | |||
process.env.CYPRESS_INTERNAL_E2E_TESTING_SELF = 'true' | |||
process.env.CYPRESS_INTERNAL_VITE_OPEN_MODE_TESTING = 'true' | |||
// process.env.DEBUG = '*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated change, just noticed this while wrestling with debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on my end! Thank you for renaming resourceType
to requestedWith
. I gave this a run against some of the tests in cypress-origin-providers and all checks out
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* fix: Remove unneeded Firefox headless hack (run ci) * Add test to cover new case Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
* fix: cleanup files made by the tmp library in cypress.run() * Apply suggestions from code review * Update cli/lib/cypress.js Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
#25034) Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Closes undefined
* fix behavior when only using inverted tags * fix: fix behavior when only using inverted tags * yarn lint --fix ./npm/grep Co-authored-by: Matt Schile <mschile@cypress.io> Co-authored-by: Ryan Manuel <ryanm@cypress.io> Co-authored-by: Blue F <blue@cypress.io>
[skip ci]
* do not use custom HMR * remove old code
* fix: declare used babel dependencies * try this??? * unlock deps
[skip ci]
* chore: try move to rollup 3 and vite 4 * bump to latest versions
Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Ryan Manuel <ryanm@cypress.io> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
User facing changelog
resourceType
withcy.intercept()
, and to see the resource type of an intercepted request asreq.resourceType
.Additional details
intercept
API too.cy.intercept(..., { log: false }
, these two changes will unblock users on disabling/enabling logs by resource type: Is there an equivalent of cy.server({ignore: (xhr) => bool}) to disable logging, after moving to cy.intercept? #9358 (no PR yet for 9358)Steps to test
Use the new
resourceType
property onRouteMatcher
andreq
to match only certain requests:Possible values:
How has the user experience changed?
PR Tasks
cypress-documentation
? docs(api): add newresourceType
properties tointercept.md
cypress-documentation#4921type definitions
?