-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] Adds functional tests for the index data visualizer card contents #83174
[ML] Adds functional tests for the index data visualizer card contents #83174
Conversation
Pinging @elastic/ml-ui (:ml) |
@@ -51,6 +53,167 @@ export function MachineLearningDataVisualizerIndexBasedProvider({ | |||
await testSubjects.existOrFail(`mlFieldDataCard ${fieldName} ${cardType}`); | |||
}, | |||
|
|||
async assertNonMetricCardContents(cardType: string, fieldName: string, exampleCount?: number) { | |||
await testSubjects.existOrFail( |
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.
Since this assertion for mlFieldDataCardContent
is used in multiple places I think it would be good to have its own function with fieldName
and cardType
as the arguments. Same for mlFieldDataCardDocCount
and mlFieldDataCardCardinality
.
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.
Done in 563f2a3
x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer.ts
Outdated
Show resolved
Hide resolved
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.
LGTM
defaultMessage="Sample size (per shard): {wrappedValue}" | ||
values={{ wrappedValue: <b>{v}</b> }} | ||
/> | ||
<div data-test-subj={`mlDataVisualizerShardSizeOption ${v}`}> |
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.
nit: I presume it should be span
instead of div
, just to make sure the element stays inline
like FormattedMessage
result element
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.
Switched to <span>
in 563f2a3
Checking test stability in a flaky test runner job ... no failure in 50 runs ✔️ |
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.
Great to have those tests in! 🎉
LGTM
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
elastic#83174) * [ML] Adds functional tests for the index data visualizer card contents * [ML] Fix translations * [ML] Fix type errors in permissions tests * [ML] Address comments from review
…o-node-details * 'master' of github.com:elastic/kibana: [ML] Adds functional tests for the index data visualizer card contents (elastic#83174)
* master: Migrate `/translations` route to core (elastic#83280) [APM] Ensure APM jest script can run (elastic#83398) [Uptime] Monitor status alert use url as instance (elastic#81736) [ML] Add basic license test run details to ML+Transform READMEs (elastic#83259) TSVB doesn't communicate it's index-patterns to dashboard (elastic#82964) [Alerting UI] Added ability to assign alert actions to resolved action group in UI (elastic#83139) Skips Vega test skip flaky suite (elastic#79967) [bundle optimization] Update to semver 7.x to get tree-shaking (elastic#83020) Added ability to fire actions when an alert instance is resolved (elastic#82799) [ML] Adds functional tests for the index data visualizer card contents (elastic#83174)
Summary
Adds functional tests for the contents of the cards in the index-based data visualizer, plus a test that a change to the sample size (per shard) control results in a change to the displayed document count for one of the cards.
Additional tests added:
Also adds in formatting for the total document count field, so it is consistent with the display of document counts inside each of the cards.
Before:
After:
Checklist