-
Notifications
You must be signed in to change notification settings - Fork 401
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
Support unenclosed inner text for details elements in to be visible #396
Support unenclosed inner text for details elements in to be visible #396
Conversation
@@ -49,7 +49,6 @@ clear to read and to maintain. | |||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | |||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this, and the other formatting change might have been automatic, I didn't do them intentionally but I can try to revert those changes if necessary.
src/__tests__/to-be-visible.js
Outdated
}) | ||
}) | ||
|
||
describe('with nested details (unenclosed outer, enclosed inner)', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This set of tests might be a bit redundant, I added them because I wasn't sure how the unenclosed and enclosed details would interact. But thinking it over, there really shouldn't be a significant difference as opposed to the previous nested tests (which these are based off).
I've just come across this issue when testing details with |
I don't think I need any help with the actual code. There were a couple
lint issues that I ended up fixing and I don't think it re-ran the checks
to progress the status of the issue.
Feel free to do what you think is best here. It'd probably need to be
rebased or have the current master merged in because I'm sure things have
changed.
…On Wed, Mar 30, 2022 at 12:00 PM Ben Chidgey ***@***.***> wrote:
I've just come across this issue when testing details with ***@***.***/jest-dom":
"5.16.2". This PR looks a little stale? any help needed?
—
Reply to this email directly, view it on GitHub
<#396 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR2M2HXVULGVZQLNATWEK3VCSCBRANCNFSM5CU53EZA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have rebased main. All linting and testing is passing, can you add me as a collaborator on https://github.com/kschow/jest-dom/ and I will raise a PR to merge into your branch. Once you have merged that into yours that then should kick the status required checks here and we will be moving forward |
…etails-elements-in-toBeVisible-main-rebased Support unenclosed inner text for details elements in to be visible main rebased
Ok thats been raised on your repo and merged into your branch - i'll leave it up to you but thats your original PR with an updated main - its also kicked off the status checks here |
I think at this point we're waiting on a maintainer to take a look at this and approve it. |
It looks like there is one task to complete - but also may be worth dropping a friendly hello to @gnapse to see if this can be progressed. I'll watch with keen 👀 to see what happens with this 👍 |
Codecov Report
@@ Coverage Diff @@
## main #396 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 26
Lines 626 630 +4
Branches 233 234 +1
=========================================
+ Hits 626 630 +4
Continue to review full report at Codecov.
|
🎉 This PR is included in version 5.16.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What:
Supporting unenclosed inner text inside
<details />
elements for toBeVisible(). See #395Why:
Unenclosed inner text is valid for
<details />
elements and should therefore be supported.How:
Updated the isAttributeVisible function. In the case where the inner text is unenclosed there is no "previousElement" so defaults to only check the open attribute of the details element itself. Otherwise, it follows the same logic as before.
Checklist: