Skip to content

Commit

Permalink
[ML] Edits to a11y tests following review
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson committed Jan 15, 2021
1 parent 5a1ddef commit 55ed796
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ export const DataGrid: FC<Props> = memo(
})}
>
<EuiButtonEmpty
aria-checked={chartsVisible}
role="checkbox"
aria-pressed={chartsVisible}
className={`euiDataGrid__controlBtn${
chartsVisible ? ' euiDataGrid__controlBtn--active' : ''
}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const MultiSelectPicker: FC<{
return (
<EuiFilterGroup data-test-subj={dataTestSubj}>
<EuiPopover
ownFocus
data-test-subj={`${dataTestSubj}-popover`}
button={button}
isOpen={isPopoverOpen}
Expand Down
26 changes: 13 additions & 13 deletions x-pack/test/accessibility/apps/ml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import path from 'path';

import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
export default function ({ getService }: FtrProviderContext) {
const a11y = getService('a11y');
const ml = getService('ml');

Expand Down Expand Up @@ -59,12 +59,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

describe('with data loaded', function () {
const adJobId = 'fq_single_permission';
const dfaOutlierJobId = 'iph_outlier_permission';
const calendarId = 'calendar_permission';
const eventDescription = 'calendar_event_permission';
const filterId = 'filter_permission';
const filterItems = ['filter_item_permission'];
const adJobId = 'fq_single_a11y';
const dfaOutlierJobId = 'iph_outlier_a11y';
const calendarId = 'calendar_a11y';
const eventDescription = 'calendar_event_a11y';
const filterId = 'filter_a11y';
const filterItems = ['filter_item_a11y'];
const fqIndexPattern = 'ft_farequote';
const ecIndexPattern = 'ft_module_sample_ecommerce';
const ihpIndexPattern = 'ft_ihp_outlier';
Expand Down Expand Up @@ -172,7 +172,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});

it('anomaly detection create single metric pick fields step', async () => {
it('anomaly detection create single metric job pick fields step', async () => {
await ml.jobWizardCommon.advanceToPickFieldsSection();
await ml.testExecution.logTestStep('job creation selects field and aggregation');
await ml.jobWizardCommon.selectAggAndField(adJobAggAndFieldIdentifier, true);
Expand All @@ -192,12 +192,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});

it('anomaly detection create single metric validation step', async () => {
it('anomaly detection create single metric job validation step', async () => {
await ml.jobWizardCommon.advanceToValidationSection();
await a11y.testAppSnapshot();
});

it('anomaly detection create single metric summary step', async () => {
it('anomaly detection create single metric job summary step', async () => {
await ml.jobWizardCommon.advanceToSummarySection();
await a11y.testAppSnapshot();
});
Expand Down Expand Up @@ -263,18 +263,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});

it('data frame analytics create job additional options step', async () => {
it('data frame analytics create job additional options step for outlier job', async () => {
await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep();
await a11y.testAppSnapshot();
});

it('data frame analytics create job additional options step', async () => {
it('data frame analytics create job additional options step for outlier job', async () => {
await ml.dataFrameAnalyticsCreation.continueToDetailsStep();
await ml.dataFrameAnalyticsCreation.setJobId(dfaJobId);
await a11y.testAppSnapshot();
});

it('data frame analytics create job create step', async () => {
it('data frame analytics create job create step for outlier job', async () => {
await ml.dataFrameAnalyticsCreation.continueToCreateStep();
await a11y.testAppSnapshot();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function MachineLearningDataFrameAnalyticsCreationProvider(
const actualCheckState =
(await testSubjects.getAttribute(
'mlAnalyticsCreationDataGridHistogramButton',
'aria-checked'
'aria-pressed'
)) === 'true';
expect(actualCheckState).to.eql(
expectedCheckState,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/services/transform/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export function TransformWizardProvider({ getService }: FtrProviderContext) {
const actualCheckState =
(await testSubjects.getAttribute(
'transformIndexPreviewHistogramButton',
'aria-checked'
'aria-pressed'
)) === 'true';
expect(actualCheckState).to.eql(
expectedCheckState,
Expand Down

0 comments on commit 55ed796

Please sign in to comment.