From 3ca207184ee5fff54d69db8b0c934273bfb61b5c Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Tue, 19 May 2020 08:08:13 +0200 Subject: [PATCH] Improve a11y context view test --- test/accessibility/apps/discover.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/accessibility/apps/discover.ts b/test/accessibility/apps/discover.ts index 0168626d4a1a9..a3ddcf8af666d 100644 --- a/test/accessibility/apps/discover.ts +++ b/test/accessibility/apps/discover.ts @@ -21,6 +21,7 @@ import { FtrProviderContext } from '../ftr_provider_context'; export default function({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'discover', 'header', 'share', 'timePicker']); + const retry = getService('retry'); const a11y = getService('a11y'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); @@ -33,8 +34,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) { ['geo.src', 'IN'], ]; - // FLAKY: https://github.com/elastic/kibana/issues/62497 - describe.skip('Discover', () => { + describe('Discover', () => { before(async () => { await esArchiver.load('discover'); await esArchiver.loadIfNeeded('logstash_functional'); @@ -133,7 +133,14 @@ export default function({ getService, getPageObjects }: FtrProviderContext) { // Context view test it('should open context view on a doc', async () => { await docTable.clickRowToggle(); - await (await docTable.getRowActions())[0].click(); + // click the open action + await retry.try(async () => { + const rowActions = await docTable.getRowActions(); + if (!rowActions.length) { + throw new Error('row actions empty, trying again'); + } + await rowActions[0].click(); + }); await a11y.testAppSnapshot(); });