Skip to content

feat(dom): toBePressed and toBePartiallyPressed#172

Open
KeylaMunnoz wants to merge 6 commits into
mainfrom
feat-dom-to-be-pressed
Open

feat(dom): toBePressed and toBePartiallyPressed#172
KeylaMunnoz wants to merge 6 commits into
mainfrom
feat-dom-to-be-pressed

Conversation

@KeylaMunnoz
Copy link
Copy Markdown
Collaborator

What has been added:

  • toBePressed and toBePartiallyPressed assertions
  • isButtonElement and isValidAriaPressed helpers
  • tests for these assertions

@KeylaMunnoz KeylaMunnoz requested review from JDOM10 and SbsCruz May 18, 2026 19:37
const nonCommentChildNodes = [...element.childNodes].filter(child => child.nodeType !== COMMENT_NODE_TYPE);
return nonCommentChildNodes.length === 0;
}

Copy link
Copy Markdown
Collaborator

@JDOM10 JDOM10 May 18, 2026

Choose a reason for hiding this comment

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

For these functions, please consider if this file is the best option for them as we have 3 different files for helpers such as dom, accessibility or style. Let me know what you think!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the suggestion Juandi! 😺 I reviewed the helper files and decided to move isValidAriaPressed to the accessibility helpers, as it seemed like a better fit there. After looking at the other function, I felt its current location was still appropriate, so I left it where it was 😄

I've pushed the corresponding changes. Let me know what you think!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

great catch!

Copy link
Copy Markdown
Collaborator

@JDOM10 JDOM10 left a comment

Choose a reason for hiding this comment

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

Hey @KeylaMunnoz! Thank you for working on this, this is looking great! Just left a small comment :shipit:

Anything else you would like to add? @suany0805

@JDOM10 JDOM10 requested a review from suany0805 May 18, 2026 20:48
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.

3 participants