From 5f759097905afda07739577ae2cf147381e09d23 Mon Sep 17 00:00:00 2001 From: rashmikulkarni Date: Mon, 13 Jun 2022 17:31:26 -0700 Subject: [PATCH] monitoring tests a11y --- x-pack/test/accessibility/apps/stack_monitoring.ts | 4 ++-- .../test/functional/services/monitoring/kibana_overview.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/x-pack/test/accessibility/apps/stack_monitoring.ts b/x-pack/test/accessibility/apps/stack_monitoring.ts index 7dad6d1068de5..c209c0aeba4d4 100644 --- a/x-pack/test/accessibility/apps/stack_monitoring.ts +++ b/x-pack/test/accessibility/apps/stack_monitoring.ts @@ -56,8 +56,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('Kibana Instances Page', async function () { - await kibanaOverview.clickOnInstancesTab(); - await kibanaInstances.isOnInstances(); + await kibanaOverview.isOnOverview(); + await kibanaOverview.clickInstanceTab(); await a11y.testAppSnapshot(); }); }); diff --git a/x-pack/test/functional/services/monitoring/kibana_overview.js b/x-pack/test/functional/services/monitoring/kibana_overview.js index 3549709d1eadb..ce98ab5d715fa 100644 --- a/x-pack/test/functional/services/monitoring/kibana_overview.js +++ b/x-pack/test/functional/services/monitoring/kibana_overview.js @@ -10,11 +10,16 @@ export function MonitoringKibanaOverviewProvider({ getService }) { const retry = getService('retry'); const SUBJ_OVERVIEW_PAGE = 'kibanaOverviewPage'; + const SUBJ_KBN_INSTANCES = 'kibanaInstancesPage'; return new (class KibanaOverview { async isOnOverview() { const pageId = await retry.try(() => testSubjects.find(SUBJ_OVERVIEW_PAGE)); return pageId !== null; } + + async clickInstanceTab() { + return testSubjects.click(SUBJ_KBN_INSTANCES); + } })(); }