forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Memory usage accessibility tests (elastic#198306)
## Summary Adds accessibility tests for the ML memory usage page.
- Loading branch information
Showing
2 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
export default function ({ getService }: FtrProviderContext) { | ||
const a11y = getService('a11y'); | ||
const ml = getService('ml'); | ||
|
||
const jobId = 'sample_job'; | ||
|
||
describe('machine learning memory usage page Accessibility', function () { | ||
before(async () => { | ||
await ml.securityCommon.createMlRoles(); | ||
await ml.securityCommon.createMlUsers(); | ||
await ml.securityUI.loginAsMlPowerUser(); | ||
|
||
const jobConfig = ml.commonConfig.getADFqSingleMetricJobConfig(jobId); | ||
await ml.api.createAnomalyDetectionJob(jobConfig); | ||
await ml.api.openAnomalyDetectionJob(jobId); | ||
|
||
await ml.navigation.navigateToMl(); | ||
await ml.navigation.navigateToMemoryUsage(); | ||
}); | ||
|
||
after(async () => { | ||
await ml.securityCommon.cleanMlUsers(); | ||
await ml.securityCommon.cleanMlRoles(); | ||
|
||
await ml.api.closeAnomalyDetectionJob(jobId); | ||
await ml.api.cleanMlIndices(); | ||
}); | ||
|
||
it('memory usage - nodes tab - page', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('memory usage - nodes tab - node details and node memory usage', async () => { | ||
await ml.memoryUsage.expandRow(); | ||
await a11y.testAppSnapshot(); | ||
|
||
await ml.memoryUsage.selectNodeExpandedRowTab('mlNodesOverviewPanelMemoryTab'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('memory usage - memory usage tab - page', async () => { | ||
await ml.memoryUsage.selectTab('memory-usage'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters