Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export const EventRateChart: FC<Props> = ({
loading = false,
}) => {
return (
<div style={{ width, height }} data-test-subj="mlEventRateChart">
<div
style={{ width, height }}
data-test-subj={`mlEventRateChart ${eventRateChartData.length ? 'withData' : 'empty'}`}
>
<LoadingWrapper height={height} hasData={eventRateChartData.length > 0} loading={loading}>
<Chart>
{showAxis === true && <Axes />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const PostSaveOptions: FC<Props> = ({ jobRunner }) => {
datafeedState === DATAFEED_STATE.STARTING || datafeedState === DATAFEED_STATE.STARTED
}
onClick={startJobInRealTime}
data-test-subj="mlButtonUseFullData3"
data-test-subj="mlJobWizardButtonRunInRealTime"
>
<FormattedMessage
id="xpack.ml.newJob.wizard.summaryStep.postSaveOptions.startJobInRealTime"
Expand All @@ -95,7 +95,7 @@ export const PostSaveOptions: FC<Props> = ({ jobRunner }) => {
watchCreated === true
}
onClick={() => setWatchFlyoutVisible(true)}
data-test-subj="mlButtonUseFullData"
data-test-subj="mlJobWizardButtonCreateWatch"
>
<FormattedMessage
id="xpack.ml.newJob.wizard.summaryStep.postSaveOptions.createWatch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const TimeRangePicker: FC<Props> = ({ setTimeRange, timeRange }) => {

return (
<Fragment>
<div style={{ minWidth: WIDTH }}>
<div style={{ minWidth: WIDTH }} data-test-subj={`jobWizardDateRange`}>
Copy link
Contributor

Choose a reason for hiding this comment

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

I see most data-test-subj have a ml prefix but this one does not - should we generally have it?

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in #47032

<EuiDatePickerRange
fullWidth={true}
startDateControl={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const Page: FC<PageProps> = ({ existingJobsAndGroups, jobType }) => {

return (
<Fragment>
<EuiPage style={{ backgroundColor: 'inherit' }} data-test-subj="mlPageJobWizard">
<EuiPage style={{ backgroundColor: 'inherit' }} data-test-subj={`mlPageJobWizard ${jobType}`}>
<EuiPageBody>
<EuiPageContentBody>
<Wizard
Expand Down

This file was deleted.

Loading