Skip to content
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

fix: add more validation to cy.intercept() #16577

Merged
merged 7 commits into from
May 24, 2021
Merged

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented May 19, 2021

  • Closes

User facing changelog

  • Improved cy.intercept() argument validation. Invalid hostnames and extra arguments passed to cy.intercept() now result in an error.

Additional details

  • classifying this as a bug fix. though it may cause failures in existing tests, i'd consider it a bug if anyone is using these patterns, since it is certainly causing unexpected behavior

How has the user experience changed?

New errors

When an invalid number of arguments has been passed:
image

When an invalid hostname is passed:

image

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?
  • [na] Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 19, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented May 19, 2021



Test summary

4078 0 50 2Flakiness 0


Run details

Project cypress
Status Passed
Commit 241370c
Started May 24, 2021 5:36 PM
Ended May 24, 2021 5:45 PM
Duration 09:49 💡
OS Linux Debian - 10.8
Browser Chrome beta 91

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@flotwig flotwig force-pushed the cy-intercept-validation branch 2 times, most recently from 5583ac9 to 44db82b Compare May 19, 2021 02:03
@flotwig flotwig marked this pull request as ready for review May 19, 2021 03:48
@flotwig flotwig requested a review from a team as a code owner May 19, 2021 03:48
@flotwig flotwig requested review from chrisbreiding and removed request for a team and chrisbreiding May 19, 2021 03:48
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, hopefully this helps some people. 😄

@flotwig flotwig merged commit 3c33db5 into develop May 24, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 24, 2021

Released in 7.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v7.4.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 24, 2021
@flotwig flotwig deleted the cy-intercept-validation branch January 24, 2022 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants