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: Error message for cy.select() with no arguments #18234

Merged
merged 20 commits into from
Sep 27, 2021

Conversation

davidmunechika
Copy link
Contributor

@davidmunechika davidmunechika commented Sep 24, 2021

User facing changelog

We include a more useful error message when .select() is incorrectly called with no arguments.

Additional details

Previous message: "Cannot read properties of undefined, (reading 'replace')"
image

New message: "cy.select() was not called with any value, index, or text"

Screenshot 2021-09-24 at 8 45 14 AM

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 24, 2021

Thanks for taking the time to open a PR!

@davidmunechika davidmunechika changed the title No argument select error message Error handling for cy.select() with no arguments Sep 24, 2021
@davidmunechika davidmunechika changed the title Error handling for cy.select() with no arguments Error message for cy.select() with no arguments Sep 24, 2021
@davidmunechika davidmunechika changed the title Error message for cy.select() with no arguments fix: Error message for cy.select() with no arguments Sep 24, 2021
@davidmunechika davidmunechika self-assigned this Sep 24, 2021
@davidmunechika davidmunechika marked this pull request as ready for review September 24, 2021 15:28
@davidmunechika davidmunechika requested a review from a team as a code owner September 24, 2021 15:28
@davidmunechika davidmunechika requested review from flotwig and chrisbreiding and removed request for a team September 24, 2021 15:28
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.

This does fix the issue. Nice.

This PR includes the files changes from the other feature though, adding the index feature. Can you have this PR only reflect the changes necessary for the error message when cy.select() has no arguments?

If the PRs are dependent on each other, we could work on getting one in before the other. I see how the error message is a bit affected by the other PR.

@davidmunechika
Copy link
Contributor Author

This does fix the issue. Nice.

This PR includes the files changes from the other feature though, adding the index feature. Can you have this PR only reflect the changes necessary for the error message when cy.select() has no arguments?

If the PRs are dependent on each other, we could work on getting one in before the other. I see how the error message is a bit affected by the other PR.

@jennifer-shehane This should be updated now, thanks!

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! 💯

@cypress
Copy link

cypress bot commented Sep 27, 2021



Test summary

575 0 0 0Flakiness 0


Run details

Project cypress
Status Passed
Commit 6dcaf29
Started Sep 27, 2021 6:53 PM
Ended Sep 27, 2021 7:02 PM
Duration 09:31 💡
OS Linux Debian - 10.9
Browser Electron 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

@chrisbreiding chrisbreiding merged commit c0846f5 into develop Sep 27, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 27, 2021

Released in 8.5.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Sep 27, 2021
@davidmunechika davidmunechika deleted the no-argument-select-error-message branch September 30, 2021 14:54
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.

4 participants