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
Turning switch on/off does not change anything in DOM #2669
Comments
Optionally, some attr in labels like "hidden=True" would make it easier to determine what label is shown, and i won't have to write some complex xpath like |
Hi @abalakh is this bug for PF3 or PF4? Are you currently blocked at this time because of this bug? |
@rachael-phillips PF4 (here or here). |
Thank you! That's super helpful. |
@rachael-phillips no, that's what i've mentioned in #2669 (comment), it works for initial switch state, but if user clicks the switch - framework won't be able to figure out the state has changed as nothing changes in DOM. |
I'm looking at examples in docs (both patternfly-react.surge.sh and patternfly.org). Switch's input is loaded with or without "checked" attribute (
<input class="pf-c-switch__input" ... checked>
), but when changing switch state that attr is not added/removed. No classes or anything else are updated as well.Moreover, both labels (for "on" and "off" states) are present in DOM at the same time, so from test automation perspective i have no idea what state switch is currently in and which label is actually shown.
Making "checked" attr reflect actual switch state (or intoducing some other attr/class/etc) would help a lot.
The text was updated successfully, but these errors were encountered: