forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Trained models: Accessibility tests (elastic#197446)
## Summary Accessibility tests for Trained models page.
- Loading branch information
Showing
4 changed files
with
77 additions
and
7 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
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
71 changes: 71 additions & 0 deletions
71
x-pack/test/accessibility/apps/group2/ml_trained_models.ts
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,71 @@ | ||
/* | ||
* 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 testModelId = 'lang_ident_model_1'; | ||
|
||
describe('machine learning trained models page Accessibility', function () { | ||
before(async () => { | ||
await ml.securityCommon.createMlRoles(); | ||
await ml.securityCommon.createMlUsers(); | ||
await ml.api.createIngestPipeline(testModelId); | ||
await ml.securityUI.loginAsMlPowerUser(); | ||
await ml.navigation.navigateToMl(); | ||
await ml.navigation.navigateToTrainedModels(); | ||
}); | ||
|
||
after(async () => { | ||
await ml.api.deleteIngestPipeline(testModelId); | ||
|
||
await ml.securityCommon.cleanMlUsers(); | ||
await ml.securityCommon.cleanMlRoles(); | ||
await ml.securityUI.logout(); | ||
}); | ||
|
||
it('trained models list', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('trained model details', async () => { | ||
await ml.trainedModelsTable.ensureRowIsExpanded(testModelId); | ||
await a11y.testAppSnapshot(); | ||
|
||
await ml.testExecution.logTestStep('Assert the Details tab content'); | ||
await ml.trainedModelsTable.assertDetailsTabContent(); | ||
await a11y.testAppSnapshot(); | ||
|
||
await ml.testExecution.logTestStep('Assert the Models Map tab content'); | ||
await ml.trainedModelsTable.assertModelsMapTabContent(); | ||
await a11y.testAppSnapshot(); | ||
|
||
await ml.testExecution.logTestStep('Assert the Inference Config tab content'); | ||
await ml.trainedModelsTable.assertInferenceConfigTabContent(); | ||
await a11y.testAppSnapshot(); | ||
|
||
await ml.testExecution.logTestStep('Assert the Stats tab content'); | ||
await ml.trainedModelsTable.assertStatsTabContent(); | ||
await a11y.testAppSnapshot(); | ||
|
||
await ml.testExecution.logTestStep('Assert the Pipelines tab content'); | ||
await ml.trainedModelsTable.assertPipelinesTabContent(); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('add trained model flyout', async () => { | ||
await ml.trainedModelsFlyout.open(); | ||
await a11y.testAppSnapshot(); | ||
|
||
await ml.trainedModelsFlyout.changeTab('manualDownload'); | ||
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