[ML] Adds functional tests for the index data visualizer card contents#83174
Conversation
|
Pinging @elastic/ml-ui (:ml) |
| }, | ||
|
|
||
| async assertNonMetricCardContents(cardType: string, fieldName: string, exampleCount?: number) { | ||
| await testSubjects.existOrFail( |
There was a problem hiding this comment.
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.
x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer.ts
Outdated
Show resolved
Hide resolved
| defaultMessage="Sample size (per shard): {wrappedValue}" | ||
| values={{ wrappedValue: <b>{v}</b> }} | ||
| /> | ||
| <div data-test-subj={`mlDataVisualizerShardSizeOption ${v}`}> |
There was a problem hiding this comment.
nit: I presume it should be span instead of div, just to make sure the element stays inline like FormattedMessage result element
|
Checking test stability in a flaky test runner job ... no failure in 50 runs ✔️ |
pheyos
left a comment
There was a problem hiding this comment.
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