Skip to content

Commit

Permalink
[Discover] Unskip doc link functional test (#66884)
Browse files Browse the repository at this point in the history
Co-authored-by: Spencer Alger <[email protected]>
  • Loading branch information
kertal and Spencer Alger authored May 19, 2020
1 parent f7181a9 commit 0d71ed2
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions test/functional/apps/discover/_doc_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,33 @@

import expect from '@kbn/expect';

const TEST_COLUMN_NAMES = ['@message'];
const TEST_FILTER_COLUMN_NAMES = [
['extension', 'jpg'],
['geo.src', 'IN'],
];

export default function({ getService, getPageObjects }) {
const docTable = getService('docTable');
const testSubjects = getService('testSubjects');
const PageObjects = getPageObjects(['common', 'discover', 'timePicker']);
const esArchiver = getService('esArchiver');
const retry = getService('retry');

// FLAKY: https://github.com/elastic/kibana/issues/62281
describe.skip('doc link in discover', function contextSize() {
describe('doc link in discover', function contextSize() {
before(async function() {
await esArchiver.loadIfNeeded('logstash_functional');
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setDefaultAbsoluteRange();
await PageObjects.discover.waitForDocTableLoadingComplete();
for (const columnName of TEST_COLUMN_NAMES) {
await PageObjects.discover.clickFieldListItemAdd(columnName);
}
for (const [columnName, value] of TEST_FILTER_COLUMN_NAMES) {
await PageObjects.discover.clickFieldListItem(columnName);
await PageObjects.discover.clickFieldListPlusFilter(columnName, value);
}
});

it('should open the doc view of the selected document', async function() {
// navigate to the doc view
await docTable.clickRowToggle({ rowIndex: 0 });
await (await docTable.getRowActions({ rowIndex: 0 }))[1].click();

// click the open action
await retry.try(async () => {
const rowActions = await docTable.getRowActions({ rowIndex: 0 });
if (!rowActions.length) {
throw new Error('row actions empty, trying again');
}
await rowActions[1].click();
});

const hasDocHit = await testSubjects.exists('doc-hit');
expect(hasDocHit).to.be(true);
Expand Down

0 comments on commit 0d71ed2

Please sign in to comment.