Skip to content

fix: run autodetection on render to prevent detection to be wrapped by act #1304

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

Conversation

pierrezimmermannbam
Copy link
Collaborator

Summary

Fixes #1302 by calling getHostComponentNames in render to prevent running auto detection in act which fails.

Test plan

Added a test case where I call getHostComponentNames wrapped in act after a render and expect it does not throw

@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Base: 95.13% // Head: 96.05% // Increases project coverage by +0.92% 🎉

Coverage data is based on head (fc9ece9) compared to base (9019eed).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1304      +/-   ##
==========================================
+ Coverage   95.13%   96.05%   +0.92%     
==========================================
  Files          46       49       +3     
  Lines        3205     3295      +90     
  Branches      483      494      +11     
==========================================
+ Hits         3049     3165     +116     
+ Misses        156      130      -26     
Impacted Files Coverage Δ
src/helpers/host-component-names.tsx 100.00% <100.00%> (ø)
src/render.tsx 100.00% <100.00%> (ø)
src/queries/a11yState.ts 100.00% <0.00%> (ø)
src/queries/a11yValue.ts 100.00% <0.00%> (ø)
src/queries/labelText.ts 100.00% <0.00%> (ø)
src/helpers/matchers/matchTextContent.ts 100.00% <0.00%> (ø)
src/helpers/deprecation.ts 100.00% <0.00%> (ø)
src/helpers/query-name.ts 100.00% <0.00%> (ø)
src/helpers/matchers/matchLabelText.ts 100.00% <0.00%> (ø)
src/queries/text.ts 97.89% <0.00%> (+0.22%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mdjastrzebski
Copy link
Member

@pierrezimmermannbam based on your PR, I've added my proposed changes to #1306, as I did not wanted to overwrite your PR, but also could not create a PR to PR because your PR is external to the repo.

@mdjastrzebski
Copy link
Member

Closing as replaced by#1306

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.

[1.15.1] new act implementation is causing actual tests to fail
2 participants