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

refactor: export label helpers to his own file and use both in suggestions and query #790

Merged

Conversation

marcosvega91
Copy link
Member

What: Moved label helpers to his own file

Why: suggestions was using his logic to get label content that was not working with aria-labelledby

How: Using the logic implemented by @delca85 both for suggestions and label query

Checklist:

  • Documentation added to the
    docs site
  • Tests
  • Typescript definitions updated
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 16, 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 08d619a:

Sandbox Source
kentcdodds/react-testing-library-examples Configuration

@codecov
Copy link

codecov bot commented Oct 16, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #790   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        26    +1     
  Lines          724       719    -5     
  Branches       190       184    -6     
=========================================
- Hits           724       719    -5     
Impacted Files Coverage Δ
src/label-helpers.js 100.00% <100.00%> (ø)
src/queries/label-text.js 100.00% <100.00%> (ø)
src/suggestions.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 a386d87...08d619a. Read the comment docs.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Just one thing.

src/suggestions.js Show resolved Hide resolved
kentcdodds
kentcdodds previously approved these changes Oct 16, 2020
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Ok, I think it looks good to me. I'd love another reviewer here though. @delca85?

@delca85
Copy link
Member

delca85 commented Oct 16, 2020

Ok, I think it looks good to me. I'd love another reviewer here though. @delca85?

I will be happy to review it but I am going to look at it in a couple of hours, ok?

@marcosvega91
Copy link
Member Author

Is not a problem ☺️ thanks for the help @delca85

src/label-helpers.js Outdated Show resolved Hide resolved
delca85
delca85 previously approved these changes Oct 16, 2020
@delca85
Copy link
Member

delca85 commented Oct 16, 2020

I approved this one. I think using the same logic in both suggestion and get labels logic is really a good idea! As well as fixing the suggestion defect related to label concatenation, for sure.

@kentcdodds
Copy link
Member

Looks like @marcosvega91's other PR made a conflict with this one. Could you get that fixed @marcosvega91? Thanks!

@marcosvega91
Copy link
Member Author

I have rebased the branch 👍 :)

@marcosvega91 marcosvega91 force-pushed the pr/refactor_suggestion branch from 5c74abf to 08d619a Compare October 20, 2020 10:30
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Excellent. Thank you!

@kentcdodds kentcdodds merged commit 626f847 into testing-library:master Oct 20, 2020
@marcosvega91 marcosvega91 deleted the pr/refactor_suggestion branch October 20, 2020 16:38
@testing-library-bot
Copy link

🎉 This PR is included in version 7.26.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants