Skip to content

Conversation

@sainthkh
Copy link
Contributor

Thanks, @ryan-snyder!

User facing changelog

Allows cy.visit() to visit the URLs with .. like https://google.com?q=..

Additional details

  • Why was this change necessary? => Perfectly fine URL was not allowed.
  • What is affected by this change? => N/A
  • Any implementation details to explain? => When there are consecutive dots, it is not a valid URL. But $Location.isUrlLike() treats it's fine. Fixed that issue.

How has the user experience changed?

N/A

PR Tasks

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

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 21, 2020

Thanks for taking the time to open a PR!

@sainthkh sainthkh changed the title fix: cy.visit() allows the URLs with .. fix: cy.visit() allows the URLs with double dots. Sep 21, 2020
@sainthkh sainthkh marked this pull request as ready for review September 21, 2020 07:31
@sainthkh
Copy link
Contributor Author

Flaky tests.

@bahmutov bahmutov requested a review from flotwig September 21, 2020 19:34
Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @sainthkh, LGTM. I was also curious if we could replace some of the Location methods using the URL API (https://developer.mozilla.org/en-US/docs/Web/API/URL) and it seems to work well.

@sainthkh
Copy link
Contributor Author

@flotwig It's much simpler. LGTM.

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.

cy.visit() page with baseUrl and two dots doesn't work

2 participants