-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Index Management] Fix bug in mappings fields #158912
[Index Management] Fix bug in mappings fields #158912
Conversation
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for fixing the form, @ElenaStoeva! Would it be possible to add a test for this bug?
Thanks for the review @yuliacech! Regarding the tests, I see that there are already integration tests for the Numeric and Range type fields, but I'm not sure how exactly we would write a test for this bug. We would need to simulate typing a backspace but I still don't know if that would be possible and how much effort it would require. Do you have any idea? |
Hi @ElenaStoeva, I think you would need to add a new action to the |
Thanks for the suggestion @yuliacech!
but I noticed that it always passes - even when the fix for the bug is not present, so this test might not be very useful. I also tried adding a functional test but this turned out to be tricky - for some reason the webdriver under the hood is not able to interact with the SubType dropdown menu when I try to click on it or set its value:
I can spend some more time to try to find some way to simulate pressing Backspace but I wonder if it would be worth the time given that this is very specific case that we already tested manually and I'm not sure if it would be beneficial to add a whole test for it. What do you think? |
Hey @yuliacech, I found a workaround for the error in the functional tests so I added them with ea77b4b. Without the fix from this PR, these two tests are failing so they should be catching this bug in the future. |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @ElenaStoeva |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing effort, @ElenaStoeva! Thanks a lot for looking into the tests for the bug as well 👍
Fixes #159403 ## Summary The recently added functional test for the index template wizard in Index Management (added with #158912) seems to be flaky. It fails when trying to navigate the "Add field" button on the "Mappings step" because it's still on the previous step of the index template wizard (the "Index settings" step). This PR adds checks on each step of the wizard to make sure that it is on the right page before proceeding to the next one. Flaky test runner results: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2436 Co-authored-by: Kibana Machine <[email protected]>
Fixes #156202
Summary
This PR fixes the bug in Mappings fields from the Component template wizard by changing the Subtype parameter so that it handles the case when the value in the Subtype dropdown menu is cleared, similarly to what is done in the Type parameter.
How to test: