Description of problem: hard to differentiate the switch status of 'Form view' and 'YAML view' button on operand creation page Version-Release number of selected component (if applicable): 4.10.0-0.nightly-2021-10-16-173656 How reproducible: Always Steps to Reproduce: 1. Check the switch status of 'Form view' and 'YAML view' on operand creation page 2. 3. Actual results: No matter which view is selected, the Xpath expression $x("//input[@data-test='YAML view-radio-input' and @checked]") always return true since the 'checked' property doesn't reveal the real status <input type="radio" data-test="Form view-radio-input" value="form"> <input type="radio" data-test="YAML view-radio-input" value="yaml" checked=""> Expected results: `checked` property should reveal the real status, it should only be added when the input is checked and removed when the input is unchecked Additional info: https://github.com/openshift/console/blob/22c6951efe7c4bca87f3f934063b9f4dcb0a4058/frontend/packages/console-shared/src/components/synced-editor/editor-toggle.tsx#L11~L33
Based on the Patternfly documentation for radio buttons and what is shown when the radio example is inspected in DevTools, this is working as intended.
(In reply to mmensahs from comment #1) > Based on the Patternfly documentation for radio buttons and what is shown > when the radio example is inspected in DevTools, this is working as intended. https://www.patternfly.org/v4/components/radio
Hi mmensahs Can we make `checked` property reveal its real status?
Now we have `data-checked-state` attribute which can be used to distinguish which radio button is checked <input type="radio" data-test="Form view-radio-input" data-checked-state="false" value="form" checked=""> <input type="radio" data-test="YAML view-radio-input" data-checked-state="true" value="yaml"> Verified on 4.10.0-0.nightly-2021-12-18-034942
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:0056