Skip to content

Commit

Permalink
[ML] Adds a11y tests for categorization and recognizer job wizards (e…
Browse files Browse the repository at this point in the history
…lastic#162126)

## Summary

Adds accessibility tests for the categorization and data recognizer
anomaly detection job wizards.

As part of this PR I have split out the tests for the anomaly detection
pages into a separate file as the original `ml.ts` file was getting very
large.

Part of elastic#160712
Part of elastic#88496

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
  • Loading branch information
peteharverson authored and Ruhshan committed Jul 19, 2023
1 parent 1364145 commit 95fab93
Show file tree
Hide file tree
Showing 9 changed files with 710 additions and 496 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export const JobSettingsForm: FC<JobSettingsFormProps> = ({
value={jobPrefix}
onChange={({ target: { value } }) => setJobPrefix(value)}
isInvalid={!!validationResult.jobPrefix}
data-test-subj="mlJobRecognizerWizardInputJobIdPrefix"
/>
</EuiFormRow>
</EuiDescribedFormGroup>
Expand Down Expand Up @@ -210,6 +211,7 @@ export const JobSettingsForm: FC<JobSettingsFormProps> = ({
/>
}
paddingSize="l"
data-test-subj="mlJobWizardToggleAdvancedSection"
>
<EuiDescribedFormGroup
title={
Expand All @@ -227,7 +229,10 @@ export const JobSettingsForm: FC<JobSettingsFormProps> = ({
/>
}
>
<EuiFormRow describedByIds={['ml_aria_label_new_job_dedicated_index']}>
<EuiFormRow
describedByIds={['ml_aria_label_new_job_dedicated_index']}
data-test-subj="mlJobWizardAdvancedSection"
>
<EuiSwitch
id="useDedicatedIndex"
name="useDedicatedIndex"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export const Page: FC<PageProps> = ({ moduleId, existingGroupIds }) => {

{jobsAwaitingNodeCount > 0 && <JobsAwaitingNodeWarning jobCount={jobsAwaitingNodeCount} />}

<EuiFlexGroup wrap={true} gutterSize="m">
<EuiFlexGroup wrap={true} gutterSize="m" data-test-subj="mlPageJobWizard recognizer">
<EuiFlexItem grow={1}>
<EuiPanel grow={false} hasShadow={false} hasBorder>
<EuiTitle size="s">
Expand Down
494 changes: 1 addition & 493 deletions x-pack/test/accessibility/apps/ml.ts

Large diffs are not rendered by default.

Loading

0 comments on commit 95fab93

Please sign in to comment.