Skip to content

Add have_child_tag to match any child or grand child tags. #83

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rajaravivarma-r
Copy link

  • The have_child_tag can be used to match any child or grand child tags.
  • Does not alter any existing matchers' behaviour.

TODO: Documentation pending.

@rajaravivarma-r
Copy link
Author

@kucaahbe This PR addresses this issue #65 and possibly an alternative approach to this issue #76 too.

The idea is to match child elements strictly, and not match against the parent tag, which is the current behaviour. Right now, I've added have_child_tag matcher which will match against any child or grand child.

Later we can add have_direct_child_tag matcher, to match against any direct child as well.

Please let me know if this is something you want to proceed with, I'm happy to polish this and add documentation.

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.

2 participants