Skip to content
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

Failing test: Chrome X-Pack Observability UI Functional Tests.x-pack/test/observability_functional/apps/observability/pages/alerts/custom_threshold_preview_chart·ts - ObservabilityApp Custom threshold preview chart does render the empty chart only once at bootstrap #209317

Open
kibanamachine opened this issue Feb 3, 2025 · 7 comments · Fixed by #212028
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:obs-ux-management Observability Management User Experience Team

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Feb 3, 2025

A test failed on a tracked branch

Error: expected testSubject(ruleTypeModal) to exist
    at TestSubjects.existOrFail (test_subjects.ts:76:13)
    at Object.clickOnObservabilityCategory (rules_page.ts:50:5)
    at Context.<anonymous> (custom_threshold_preview_chart.ts:47:7)
    at Object.apply (wrap_function.js:74:16)

First failure: kibana-on-merge - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Feb 3, 2025
@botelastic botelastic bot added the needs-team Issues missing a team label label Feb 3, 2025
@kibanamachine kibanamachine added the Team:obs-ux-management Observability Management User Experience Team label Feb 3, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Feb 3, 2025
@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@maryam-saeidi maryam-saeidi self-assigned this Feb 21, 2025
@maryam-saeidi
Copy link
Member

Summary of Slack 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 🤞🏻

@kibanamachine
Copy link
Contributor Author

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.18

@maryam-saeidi
Copy link
Member

Maybe I should backport my PR to 8.19 and 8.18 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants