Skip to content

fix: use node property instead of selector for type=text input#823

Merged
kentcdodds merged 3 commits into
testing-library:masterfrom
marcosvega91:pr/fix_type_text
Nov 17, 2020
Merged

fix: use node property instead of selector for type=text input#823
kentcdodds merged 3 commits into
testing-library:masterfrom
marcosvega91:pr/fix_type_text

Conversation

@marcosvega91

@marcosvega91 marcosvega91 commented Nov 16, 2020

Copy link
Copy Markdown
Member

What: close #814

Why: It was a bug

How: Adding an exception for type=text.
Instead of using the selector I have used the node property.

Checklist:

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

@codesandbox-ci

codesandbox-ci Bot commented Nov 16, 2020

Copy link
Copy Markdown

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 79b8b0a:

Sandbox Source
react-testing-library-examples Configuration
react-testing-library demo (forked) Issue #814

@codecov

codecov Bot commented Nov 16, 2020

Copy link
Copy Markdown

Codecov Report

Merging #823 (79b8b0a) into master (d774028) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #823   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines          910       922   +12     
  Branches       276       281    +5     
=========================================
+ Hits           910       922   +12     
Impacted Files Coverage Δ
src/role-helpers.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 d774028...79b8b0a. Read the comment docs.

@marcosvega91

marcosvega91 commented Nov 16, 2020

Copy link
Copy Markdown
Member Author

p.s. from this build I'm having an issue on commit, script hangs on test.
I have seen other users having this issue in some PR. I'll try to understand the reason.

EDIT: it is regarding to this issue
jestjs/jest#10777

EDIT2: fixed reinstalling everything

@kentcdodds kentcdodds left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me 👍 Anyone else want to weigh in?

@eps1lon eps1lon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works for now. I'll revisit this in aria-query though or rather with a more holistic approach. Either aria-query always means "check the property not the attribute" or aria-query needs to be explicit when you check attributes vs. when you check properties.

@kentcdodds

Copy link
Copy Markdown
Member

@eps1lon should we just wait for aria-query instead? Or do you think that's further down the road?

@eps1lon

eps1lon commented Nov 17, 2020

Copy link
Copy Markdown
Member

@eps1lon should we just wait for aria-query instead? Or do you think that's further down the road?

Future improvement. This PR is good to go.

@kentcdodds
kentcdodds merged commit 7e5da11 into testing-library:master Nov 17, 2020
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 7.26.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@marcosvega91
marcosvega91 deleted the pr/fix_type_text branch November 17, 2020 17:09
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.

Input with invalid type does not have textbox role

3 participants