Fedora Account System
Red Hat Associate
Red Hat Customer
Created attachment 1603429 [details] sending keys to textarea be like... Description of problem: New 5.11 CodeMiror react component is hard to interact with in automation Version-Release number of selected component (if applicable): 5.11.0.18.20190806180636_1dd6378 How reproducible: Always Steps to Reproduce: 1. Navigate to Services -> Catalogs -> Orchestration Templates -> Add a new Orchestration Template 2. Fill the "Content" field Actual results: First, I had to change the attribute to be able to interact with it, so I set "contentEditable", "true". 1. The content can be found using the locator "//pre[@class=' CodeMirror-line ']/span". However, if I send keys there, the "Add" button in the UI is always disabled. 2. The textarea can be found using the locator "//div[contains(@class,'miq-codemirror')]//textarea", then I need to delete "hidden" property. When I send keys there, the Add button becomes enabled. However, the text appears twice. Expected results: I would expect textarea to contain the actual typed text OR a javascript way to interact with this component. Additional info: It worked js way in 5.10.
https://github.com/ManageIQ/manageiq-ui-classic/pull/6030
New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/d7dec1ad1a7a780b15a43855063c735ac29522d1 commit d7dec1ad1a7a780b15a43855063c735ac29522d1 Author: Martin Marosi <marvusm.mmi> AuthorDate: Thu Aug 15 04:43:56 2019 -0400 Commit: Martin Marosi <marvusm.mmi> CommitDate: Thu Aug 15 04:43:56 2019 -0400 Use react-codemirror onChange event instead of onBeforeChange. fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1740753 app/javascript/components/code-editor/index.js | 30 +- app/javascript/spec/code-editor/__snapshots__/code-editor.spec.js.snap | 2 + app/javascript/spec/code-editor/code-editor.spec.js | 12 +- app/javascript/spec/orchestration-template/orchestration-template-form.spec.js | 4 +- 4 files changed, 31 insertions(+), 17 deletions(-)
New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk: https://github.com/ManageIQ/manageiq-ui-classic/commit/65e652932510056e184c3b8f4ae20b4bbff6fe16 commit 65e652932510056e184c3b8f4ae20b4bbff6fe16 Author: Harpreet Kataria <hkataria> AuthorDate: Fri Aug 16 03:12:09 2019 +0000 Commit: Satoe Imaishi <simaishi> CommitDate: Wed Sep 30 16:48:54 2020 +0000 Merge pull request #6030 from Hyperkid123/tweak-react-code-editor Use react-codemirror onChange event instead of onBeforeChange. (cherry picked from commit 471bc696f27562e8c560b18a973b17ce7f009975) https://bugzilla.redhat.com/show_bug.cgi?id=1740753 app/javascript/components/code-editor/index.js | 30 +- app/javascript/spec/code-editor/__snapshots__/code-editor.spec.js.snap | 2 + app/javascript/spec/code-editor/code-editor.spec.js | 12 +- app/javascript/spec/orchestration-template/orchestration-template-form.spec.js | 4 +- 4 files changed, 31 insertions(+), 17 deletions(-)
This didn't help to run the tests as they were. The issue now was that the indentation got wrong. But in the end I found a way how to make the tests interact with the CodeMirror using setValue: https://github.com/ManageIQ/integration_tests/pull/10337 It seems though nothing did break.
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 (CloudForms 5.0.9 bug fix and enhancement 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/RHBA-2020:4967