[ML] Add clone tests for single metric, multi metric and population jobs#46894
[ML] Add clone tests for single metric, multi metric and population jobs#46894pheyos merged 14 commits intoelastic:masterfrom
Conversation
…ibana into clone_single_metric_job
|
Pinging @elastic/ml-ui |
jgowdyelastic
left a comment
There was a problem hiding this comment.
Added a couple of unimportant nits, other than that LGTM
| return ( | ||
| <Fragment> | ||
| <EuiPage style={{ backgroundColor: 'inherit' }} data-test-subj="mlPageJobWizard"> | ||
| <EuiPage style={{ backgroundColor: 'inherit' }} data-test-subj={'mlPageJobWizard ' + jobType}> |
There was a problem hiding this comment.
nit, we normally use template literals for string concatenation. this would be `mlPageJobWizard ${jobType}`
| <div | ||
| style={{ width, height }} | ||
| data-test-subj={ | ||
| eventRateChartData.length > 0 ? 'mlEventRateChart withData' : 'mlEventRateChart empty' |
There was a problem hiding this comment.
nit, could be:
mlEventRateChart ${eventRateChartData.length ? 'withData' : 'empty'}
but I don't know if it's much of an improvement, it just removes the duplication of mlEventRateChart
💚 Build Succeeded |
peteharverson
left a comment
There was a problem hiding this comment.
One nit but otherwise all LGTM
| } | ||
| onClick={startJobInRealTime} | ||
| data-test-subj="mlButtonUseFullData3" | ||
| data-test-subj="mlJobWizardButtonRunInRealtime" |
There was a problem hiding this comment.
Nit - but elsewhere we use RealTime, so should be mlJobWizardButtonRunInRealTime for consistency.
| 'job processing to finish', | ||
| 5 * 60 * 1000, | ||
| async () => (await testSubjects.exists('mlJobWizardButtonCreateJob')) === false | ||
| async () => await testSubjects.exists('mlJobWizardButtonRunInRealtime') |
There was a problem hiding this comment.
As above, better to use mlJobWizardButtonRunInRealTime with uppercase T for consistency.
walterra
left a comment
There was a problem hiding this comment.
LGTM, just added a question about data-test-subj naming.
| return ( | ||
| <Fragment> | ||
| <div style={{ minWidth: WIDTH }}> | ||
| <div style={{ minWidth: WIDTH }} data-test-subj={`jobWizardDateRange`}> |
There was a problem hiding this comment.
I see most data-test-subj have a ml prefix but this one does not - should we generally have it?
There was a problem hiding this comment.
Good question. When I started creating test subjects, I've named them ml* with a rather long descriptive name, but over time I began to give shorter names to make parent-child relations better to read, e.g. testSubjects.getVisibleText(`dataSplit > splitCard front > splitCardTitle`). I'm still not perfectly sure what the best way of naming is, but ml namespacing is probably a good idea, so I will go through our test subjects in a follow-up and add it where needed.
💔 Build FailedUnrelated failure in x-pack ciGroup7 |
|
retest |
💚 Build Succeeded |
…obs (elastic#46894) This PR adds tests for ML single metric, multi metric and population job cloning.
Summary
This PR adds tests for ML single metric, multi metric and population job cloning.
High level test steps
create jobtest left off.Other changes
create_single_metric_jobtosingle_metric_jobas the test file now also contains a cloning sub suite (similar for multi metric and population jobs).