Skip to content

Commit

Permalink
[ML] Categorization wizard functional tests (elastic#57600) (elastic#…
Browse files Browse the repository at this point in the history
…57700)

* [ML] Categorization wizard functional tests

* changes based on review

* some idiot left his own name in the code

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
jgowdyelastic and elasticmachine authored Feb 17, 2020
1 parent 0ee1d7c commit c138797
Show file tree
Hide file tree
Showing 10 changed files with 496 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface CardProps {
export const CountCard: FC<CardProps> = ({ onClick, isSelected }) => (
<EuiFlexItem>
<EuiCard
data-test-subj={`mlJobWizardCategorizationDetectorCountCard${isSelected ? ' selected' : ''}`}
title={i18n.translate(
'xpack.ml.newJob.wizard.pickFieldsStep.categorizationDetectorSelect.countCard.title',
{
Expand All @@ -39,6 +40,7 @@ export const CountCard: FC<CardProps> = ({ onClick, isSelected }) => (
export const RareCard: FC<CardProps> = ({ onClick, isSelected }) => (
<EuiFlexItem>
<EuiCard
data-test-subj={`mlJobWizardCategorizationDetectorRareCard${isSelected ? ' selected' : ''}`}
title={i18n.translate(
'xpack.ml.newJob.wizard.pickFieldsStep.categorizationDetectorSelect.rareCard.title',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export const ExamplesValidCallout: FC<Props> = ({
}

return (
<EuiCallOut color={color} title={title}>
<EuiCallOut
color={color}
title={title}
data-test-subj={`mlJobWizardCategorizationExamplesCallout ${overallValidStatus}`}
>
{validationChecks.map((v, i) => (
<div key={i}>{v.message}</div>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ export const FieldExamples: FC<Props> = ({ fieldExamples }) => {
txt.push(buffer);
return { example: txt };
});
return <EuiBasicTable columns={columns} items={items} />;
return (
<EuiBasicTable
columns={columns}
items={items}
data-test-subj="mlJobWizardCategorizationExamplesTable"
/>
);
};

const Token: FC = ({ children }) => (
Expand Down
Loading

0 comments on commit c138797

Please sign in to comment.