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 aria-disabled attribute #10928

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

Test error: Cannot find the Button's aria-disabled attribute #10928

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

Comments

@dlabrecq
Copy link
Member

dlabrecq commented Aug 28, 2024

Please describe the issue

2 tests cannot find the Button's aria-disabled attribute. This test worked with v5, but no longer works with v6.

Are there visuals for this issue? Please provide screenshots

Error 1
Screenshot 2024-09-16 at 5 06 37 PM

Error 2
Screenshot 2024-09-16 at 5 06 54 PM

Could you point to a branch or draft PR where this issue exists? Please provide a link to the code

Error 1

Error 2

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

These failures are in part because of the same cause as #10927, and in part because we have updated the isDisabled prop for Button to set only disabled for button elements and not aria-disabled.

Along with my suggestion in that other issue I would suggest using the toBeDisabled matcher from jest-dom rather than checking for aria-disabled explicitly for these tests.

@dlabrecq
Copy link
Member Author

It's unclear why the previous developer chose to test aria-disabled, but changed to use toBeDisabled

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

4 participants