Skip to content

[charts] Remove fireEvent usage from tests #17006

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

Merged
merged 4 commits into from
Mar 18, 2025

Conversation

JCQuintas
Copy link
Member

@JCQuintas JCQuintas added test scope: charts Changes or issues related to the charts product maintenance labels Mar 17, 2025
@JCQuintas JCQuintas self-assigned this Mar 17, 2025
@mui-bot
Copy link

mui-bot commented Mar 17, 2025

Deploy preview: https://deploy-preview-17006--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 9f8228b

Copy link

codspeed-hq bot commented Mar 17, 2025

CodSpeed Performance Report

Merging #17006 will not alter performance

Comparing JCQuintas:remove-fire-event (9f8228b) with master (e5a59cd)

Summary

✅ 7 untouched benchmarks

@JCQuintas JCQuintas marked this pull request as ready for review March 17, 2025 20:36
@JCQuintas JCQuintas enabled auto-merge (squash) March 17, 2025 20:36
@JCQuintas JCQuintas merged commit 8d052c8 into mui:master Mar 18, 2025
23 checks passed
@JCQuintas JCQuintas deleted the remove-fire-event branch March 18, 2025 07:51
Comment on lines -191 to +198
fireEvent.click(rectangles[0]);
await user.click(rectangles[0]);
Copy link
Member

Choose a reason for hiding this comment

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

It's not 100% clear that this is better:

  • It feels slower to run in the CI.
  • It doesn't force people to understand what's going on when implementing the code at the JS event granularity level.
  • Test

In exchange, we get more reliability, but is this gain real? I don't recall seeing one case where we had regressions because we relied on firing the wrong events.

We will see with more time

@oliviertassinari oliviertassinari added type: enhancement This is not a bug, nor a new feature and removed maintenance labels May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: charts Changes or issues related to the charts product test type: enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants