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

test-data-ids for static content, useful when asserting. #29

Open
EricEidel opened this issue Feb 4, 2024 · 0 comments
Open

test-data-ids for static content, useful when asserting. #29

EricEidel opened this issue Feb 4, 2024 · 0 comments

Comments

@EricEidel
Copy link

EricEidel commented Feb 4, 2024

Hey all! Thanks for building this up. Very handy extension - we're exploring adopting this, with conjunction of semi-auto-generating test-data-ids with react-id-generator.

One suggestion I had for the current rules is that they are focused on elements which you'd be interacting with (buttons, anchors). The flip side of that is conducting assertions - making sure a certain element contains text (post action or page load). I'm not sure how difficult it would be to add rules for <p>, <span>, <h1> through <h6> and so on.

Once we fully adopt the plugin, I'll give it a spin - but as part of our evaluation of this as a potential solution, this jumped out as a big missing part.

I'm also not sure if there's an easy way to incorporate auto-generation of ids - for most of my elements, I don't care if they're pretty or not, I just want a unique one. If it's commonly used, I'll name it myself, but it'd be great to have a --fix option that just generates random ones / configurable ones. Some documentation on how to wire this up or native functionality would really make this a one-stop-shop for this use case! :)

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

No branches or pull requests

1 participant