mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[6.x] Fixed omission that caused the test to still be flaky. Need to make sure the element is displayed. (#28517) (#28856)
* Made change to cluster overview service to more reliably check if the page has loaded. * Made change to cluster overview service to more reliably check if the page has loaded.
This commit is contained in:
parent
818ea88e79
commit
5fd3742f5f
1 changed files with 11 additions and 2 deletions
|
@ -4,6 +4,8 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import expect from 'expect.js';
|
||||
|
||||
export function MonitoringClusterOverviewProvider({ getService }) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
const retry = getService('retry');
|
||||
|
@ -54,8 +56,15 @@ export function MonitoringClusterOverviewProvider({ getService }) {
|
|||
return new class ClusterOverview {
|
||||
|
||||
async isOnClusterOverview() {
|
||||
const pageId = await retry.try(() => testSubjects.find(SUBJ_CLUSTER_OVERVIEW));
|
||||
return pageId !== null;
|
||||
await retry.try(async () => {
|
||||
const clusterHeadingElement = await testSubjects.find(SUBJ_CLUSTER_NAME);
|
||||
expect(await clusterHeadingElement.isDisplayed()).to.be(true);
|
||||
});
|
||||
await retry.try(async () => {
|
||||
const clusterHeading = await testSubjects.find(SUBJ_CLUSTER_NAME);
|
||||
expect(await clusterHeading.getVisibleText()).not.to.be.empty();
|
||||
});
|
||||
return true;
|
||||
}
|
||||
getClusterName() {
|
||||
return testSubjects.getVisibleText(SUBJ_CLUSTER_NAME);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue