-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Automatic Import] Fix the enter bug (#199894)
## Release Notes Fixes the bug where pressing Enter reloaded the Automatic Import. ## Summary - Fixes #198238 - Adds/fixes telemetry for CEL events. - Refactors navigation functionality. - Adds extensive unit tests and a Cypress test for it. ## Details When the user presses the Enter inside our input field, the expected action is to send the form, in this case completing the step. However, previously the form submission would instead lead to reloading the whole Automatic Import page. In this PR we capture the form submission event and bubble it up as `completeStep` to the main component. We also move the implementation from the `Footer` up to this main component `CreateIntegrationAssistant`. This helps collect all the details about the step order in one place and refactor this logic. As a result, pressing `Enter` in any field now either - Is processed by the field itself (in case of multi-line fields); - Leads to the same action as pressing the "Next" button (desired result); or - Does nothing (e.g. in the inputs in the "Define data stream and upload logs" group – the reason for this is unclear). We add CEL-specific telemetry identifiers so that telemetry for step 5 is not always reported as `Deploy Step`. We also rename a bunch of stuff that was named `...StepReady` into `...StepReadyToComplete` as the previous name was ambiguous. To demonstrate this ambiguity we've enlisted the help of GPT 4o: <img width="832" alt="SCR-20241125-tiaa" src="https://github.com/user-attachments/assets/ad6bcf7c-7cb2-41c2-ac6b-38924ce990d3"> ## Testing We provide a Cypress test for Enter behavior: pressing it on the "integration title" input should let the flow proceed to the next step. This test fails on `main`. We also provide unit tests for all steps of navigation functionality in `x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/create_integration_assistant.test.tsx`: Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
d4194ba
commit d8bb72e
Showing
19 changed files
with
976 additions
and
495 deletions.
There are no files selected for viewing
678 changes: 652 additions & 26 deletions
678
...nts/create_integration/create_integration_assistant/create_integration_assistant.test.tsx
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.