[Discover] Improve and unskip a11y context view test (#66959)

This commit is contained in:
Matthias Wilhelm 2020-05-20 09:28:01 +02:00 committed by GitHub
parent 19c625b430
commit 3ce0b5755e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
});