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: Exclude container in the list of queryable roles #550

Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented May 6, 2020

To better understand, review commits individually. The first commit describes the current behavior and the second commit applies the expected behavior.

What:

Why:

  • The container was never part of the considered elements due to how .querySelectorAll works.

How:

Start with container.children

Checklist:

  • [ ] Documentation added to the
    docs site
  • [ ] I've prepared a PR for types targeting
    DefinitelyTyped
  • Tests
  • Ready to be merged

@eps1lon eps1lon added the bug Something isn't working label May 6, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 6, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cdc68ff:

Sandbox Source
upbeat-fog-xpz4v Configuration

@codecov
Copy link

codecov bot commented May 6, 2020

Codecov Report

Merging #550 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #550   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines          438       440    +2     
  Branches       105       105           
=========================================
+ Hits           438       440    +2     
Impacted Files Coverage Δ
src/queries/role.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d62141...cdc68ff. Read the comment docs.

@kentcdodds
Copy link
Member

Makes total sense 👍

Would this also mean that (when using screen) document wouldn't show up as queryable? I think that would be an improvement because it shows up in the log as queryable but it doesn't make sense to query it.

@kentcdodds kentcdodds merged commit 7b3ca97 into testing-library:master May 6, 2020
@kentcdodds
Copy link
Member

Ah, just saw the issue that inspired this PR. Perfect. Thanks!

@kentcdodds
Copy link
Member

🎉 This PR is included in version 7.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@eps1lon eps1lon deleted the fix/queryable-roles-container branch September 7, 2021 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

findByRole - document ignored
2 participants