-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Functional tests for the Overview page and side nav (#124793)
* update side nav tests for full ml access * ML nodes tests * assert empty states * assert getting started callout * assert panels with data * assert read ml access * waitForDatePickerIndicatorLoaded * add missing step * fix typo * rename variable
- Loading branch information
Showing
11 changed files
with
196 additions
and
21 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
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
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
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
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,41 @@ | ||
/* | ||
* 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 expect from '@kbn/expect'; | ||
import { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
export function MlNodesPanelProvider({ getService }: FtrProviderContext) { | ||
const testSubjects = getService('testSubjects'); | ||
|
||
return { | ||
async assertNodesOverviewPanelExists(expectPanelExits: boolean = true) { | ||
if (expectPanelExits) { | ||
await testSubjects.existOrFail('mlNodesOverviewPanel'); | ||
} else { | ||
await testSubjects.missingOrFail('mlNodesOverviewPanel'); | ||
} | ||
}, | ||
|
||
async assertNodesListLoaded() { | ||
await testSubjects.existOrFail('mlNodesTable loaded', { timeout: 5000 }); | ||
}, | ||
|
||
async assertMlNodesCount(minCount: number = 1) { | ||
const actualCount = parseInt(await testSubjects.getVisibleText('mlTotalNodesCount'), 10); | ||
expect(actualCount).to.not.be.lessThan( | ||
minCount, | ||
`Total ML nodes count should be at least '${minCount}' (got '${actualCount}')` | ||
); | ||
}, | ||
|
||
async assertNodeOverviewPanel() { | ||
await this.assertNodesOverviewPanelExists(); | ||
await this.assertNodesListLoaded(); | ||
await this.assertMlNodesCount(); | ||
}, | ||
}; | ||
} |
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
Oops, something went wrong.