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: Alias name for req.alias containing a dot fail to intercept #14621

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

sainthkh
Copy link
Contributor

@sainthkh sainthkh commented Jan 19, 2021

TR-620

User facing changelog

When there was a dot in req.alias, it failed. This PR fixes this problem.

Additional details

  • Why was this change necessary? => adding dot for req.alias failed without reason.
  • What is affected by this change? => N/A
  • Any implementation details to explain? => I only allowed the exception for request and response.

How has the user experience changed?

N/A

Documentation problem.

request and response are reserved. But it is not documented in cy.wait, cy.intercept, cy.route docs.

Only documentation I could find was 0.5.10 changelog. I think it should be added to avoid confusion.

PR Tasks

  • Have tests been added/updated?
  • Has a PR for user-facing changes been opened in cypress-documentation? => Added a section above to get feedback.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 19, 2021

Thanks for taking the time to open a PR!

@@ -100,11 +100,16 @@ module.exports = (Commands, Cypress, cy, state) => {
_.keys(cy.state('aliases')).includes(str.slice(1))) {
specifier = null
} else {
// potentially request, response or index
// potentially request, response
Copy link
Contributor Author

@sainthkh sainthkh Jan 19, 2021

Choose a reason for hiding this comment

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

index part is added at #4248. As far as I researched, there was no test to use a number with cy.wait. It's for cy.get. That's why I removed this.

Maybe I might be wrong.

@sainthkh sainthkh marked this pull request as ready for review January 19, 2021 07:44
@flotwig flotwig merged commit 36a4be0 into cypress-io:develop Jan 22, 2021
pashidlos pushed a commit to pashidlos/cypress that referenced this pull request Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alias name for req.alias containing a dot fail to intercept
2 participants