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: change, input events are not fired when the same option is selected again. #19623

Merged
merged 3 commits into from
Feb 9, 2022

Conversation

sainthkh
Copy link
Contributor

User facing changelog

change, input events are not fired when the same option is selected again.

Additional details

  • Why was this change necessary? => When the same <option> is selected, change, input events are not be fired in browsers, but Cypress does.
  • What is affected by this change? => N/A
  • Any implementation details to explain? => I cache the selected old values and check them.

How has the user experience changed?

Before: cy.select doesn't follow the browser behavior.
After: cy.select follows it.

PR Tasks

  • Have tests been added/updated?
  • [na] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [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 Jan 10, 2022

Thanks for taking the time to open a PR!

@sainthkh sainthkh marked this pull request as ready for review January 10, 2022 01:20
@sainthkh sainthkh requested a review from a team as a code owner January 10, 2022 01:20
@sainthkh sainthkh requested review from jennifer-shehane and removed request for a team January 10, 2022 01:20
@jennifer-shehane jennifer-shehane removed their request for review February 3, 2022 16:29
Comment on lines -368 to +387
cy.get('#select-maps').select('de_dust2').select('de_aztec')
cy.get('#select-maps').select('de_aztec').select('de_dust2')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

2 tests that use #select-maps have been changed because it tries to select the already-selected first option. I changed them to select the second one.

@sainthkh
Copy link
Contributor Author

sainthkh commented Feb 7, 2022

system-tests failed because CircleCI doesn't end some tests for me. It's also happening in #19837

@BlueWinds BlueWinds self-requested a review February 7, 2022 16:00
@jennifer-shehane jennifer-shehane merged commit e218960 into cypress-io:develop Feb 9, 2022
tgriesser added a commit that referenced this pull request Feb 14, 2022
* develop:
  feat: gray out the path to system node in cypress run header (#20121)
  feat: redesign server errors (#20072)
  test: fix awesome-typescript-loader test and remove test-binary job (#20131)
  fix: Fix issues with stack traces and command log in Chrome 99 (#20049)
  fix: `cy.type(' ')` fires click event on button-like elements. (#20067)
  fix: `change`, `input` events are not fired when the same option is selected again. (#19623)
  build: publish vue3 on latest (#20099)
  chore: release @cypress/webpack-preprocessor-v5.11.1
  chore: release @cypress/webpack-dev-server-v1.8.1
  fix: detect newly added specs in dev-server compilation (#17950)
  chore: Remove pkg/driver //@ts-nocheck part 3 (#19837)
  chore: set up semantic-pull-request GitHub Action (#20091)
  chore: release @cypress/react-v5.12.2
  fix: remove nullish coalescing in js files to support node 12 (#20094)
  docs: update @cypress/webpack-preprocessor links (#19902)
  refactor: use aliases instead of meta (#19566)
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.

In a select element, the onChange event fires even when selecting the currently chosen option
5 participants