Skip to content

[8.18] Attempt to fix custom_threshold_preview_chart flaky test (#212028)#225507

Merged
kibanamachine merged 1 commit intoelastic:8.18from
kibanamachine:backport/8.18/pr-212028
Jun 26, 2025
Merged

[8.18] Attempt to fix custom_threshold_preview_chart flaky test (#212028)#225507
kibanamachine merged 1 commit intoelastic:8.18from
kibanamachine:backport/8.18/pr-212028

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.18:

Questions ?

Please refer to the Backport tool documentation

)

Fixes elastic#209317

## Summary

Summary of
[Slack](https://elastic.slack.com/archives/C04HT4P1YS3/p1740054800086779)
discussion:

As shown below, we check if the `Create rule` button exists and then we
try to click it:
```
const clickCreateRuleButton = async () => {
    await testSubjects.existOrFail('createRuleButton');
    const createRuleButton = await testSubjects.find('createRuleButton');
    return await createRuleButton.click();
  };
```

It seems something goes wrong during click in this case and even after 2
mins, we don't see the modal:
```
[00:03:11]         │ debg --- retry.tryForTime error: [data-test-subj="ruleTypeModal"] is not displayed
...
[00:05:09]         └- ✖ fail: ObservabilityApp Custom threshold preview chart does render the empty chart only once at bootstrap
```

@dmlemeshko pointed to the implementation that we have for the button
and the fact that we need to first check if the user is authorized to
see this button, and something might have caused the click not to be
successful even though there is no error reported by WebDriver.

```
useEffect(() => {
    setHeaderActions?.([
      ...(authorizedToCreateAnyRules ? [<CreateRuleButton openFlyout={openRuleTypeModal} />] : []),
      <RulesSettingsLink />,
      <RulesListDocLink />,
    ]);
  }, [authorizedToCreateAnyRules]);
```

Long story short, we will add waiting for the global spinner to
hopefully make this test less flaky 🤞🏻

---------

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
(cherry picked from commit 2f0bad7)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jun 26, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) June 26, 2025 16:08
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Jun 26, 2025
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@kibanamachine kibanamachine merged commit 07fff40 into elastic:8.18 Jun 26, 2025
13 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @maryam-saeidi

Copilot AI added a commit that referenced this pull request Apr 13, 2026
…ents for accessibility

Closes #225507

Agent-Logs-Url: https://github.com/elastic/kibana/sessions/0c708412-8300-4299-8a66-2934198f077f

Co-authored-by: alexwizp <20072247+alexwizp@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR ci:project-deploy-observability Create an Observability project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants