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 error: Cannot find the Button's disabled attribute #10927

Closed
dlabrecq opened this issue Aug 28, 2024 · 2 comments
Closed

Test error: Cannot find the Button's disabled attribute #10927

dlabrecq opened this issue Aug 28, 2024 · 2 comments
Assignees

Comments

@tlabaj tlabaj transferred this issue from patternfly/patternfly Sep 6, 2024
@tlabaj tlabaj added this to the Penta final release milestone Sep 9, 2024
@tlabaj tlabaj moved this from Needs triage to Ready to assign in PatternFly Issues Sep 9, 2024
@kmcfaul kmcfaul moved this from Ready to assign to Not started in PatternFly Issues Sep 12, 2024
@wise-king-sullyman
Copy link
Contributor

These failures are because we added a new wrapping div around the text inside of buttons in v6, and the RTL byText query is now returning that wrapper rather than the button element itself, which is where those attributes live.

I would suggest using byRole queries instead and passing a name option searching for the text value you're currently passing into the byText query, as it will return the top level button element. Also FWIW the RTL team does suggest prioritizing the use of byRole queries over byText when possible.

@dlabrecq
Copy link
Member Author

Updated to use byRole

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants