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

[ML] Single metric viewer in dashboards: adds functional test #178768

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Mar 14, 2024

Summary

Related meta issue: #176651

This PR adds functional tests for SMV in dashboards.
Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5485

Checklist

Delete any items that are not applicable to this PR.

@alvarezmelissa87 alvarezmelissa87 added :ml Feature:Anomaly Detection ML anomaly detection release_note:skip Skip the PR/issue when compiling release notes Feature:Functional Testing v8.14.0 labels Mar 14, 2024
@alvarezmelissa87 alvarezmelissa87 self-assigned this Mar 14, 2024
@alvarezmelissa87 alvarezmelissa87 marked this pull request as ready for review March 14, 2024 19:23
@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner March 14, 2024 19:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@alvarezmelissa87
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @alvarezmelissa87

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment, otherwise code LGTM

@@ -16,6 +16,7 @@ export function MachineLearningDashboardEmbeddablesProvider(
const retry = getService('retry');
const testSubjects = getService('testSubjects');
const find = getService('find');
// const ml = getService('ml');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line needed?

@@ -16,6 +16,7 @@ export function MachineLearningDashboardEmbeddablesProvider(
const retry = getService('retry');
const testSubjects = getService('testSubjects');
const find = getService('find');
// const ml = getService('ml');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can remove commented code

await testSubjects.clickWhenNotDisabledWithoutRetry(subj);
await this.assertAnomalyChartsEmbeddableInitializerNotExists();
});
},

async clickSingleMetricViewerInitializerConfirmButtonEnabled() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the function name clickSingleMetricViewerInitializerConfirmButtonEnabled need to reflect that the button is enabled?

);
});

it('create new single metric viewer panel', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might not necessary for this test for now but might be useful in the future to also test that you can add multiple single metric viewer panels

@qn895
Copy link
Member

qn895 commented Mar 18, 2024

Test LGTM 🎉 , just had some nit comments

@alvarezmelissa87 alvarezmelissa87 merged commit a6174d4 into elastic:main Mar 18, 2024
16 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Mar 18, 2024
@alvarezmelissa87 alvarezmelissa87 deleted the ml-smv-embeddable-functional-test branch March 18, 2024 19:13
saikatsarkar056 pushed a commit to saikatsarkar056/kibana that referenced this pull request Mar 21, 2024
…c#178768)

## Summary

Related meta issue: elastic#176651

This PR adds functional tests for SMV in dashboards.
Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5485


### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Anomaly Detection ML anomaly detection Feature:Functional Testing :ml release_note:skip Skip the PR/issue when compiling release notes v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants