|
19 | 19 |
|
20 | 20 | import expect from '@kbn/expect'; |
21 | 21 |
|
22 | | -const TEST_COLUMN_NAMES = ['@message']; |
23 | | -const TEST_FILTER_COLUMN_NAMES = [ |
24 | | - ['extension', 'jpg'], |
25 | | - ['geo.src', 'IN'], |
26 | | -]; |
27 | | - |
28 | 22 | export default function({ getService, getPageObjects }) { |
29 | 23 | const docTable = getService('docTable'); |
30 | 24 | const testSubjects = getService('testSubjects'); |
31 | 25 | const PageObjects = getPageObjects(['common', 'discover', 'timePicker']); |
32 | 26 | const esArchiver = getService('esArchiver'); |
| 27 | + const retry = getService('retry'); |
33 | 28 |
|
34 | | - // FLAKY: https://github.com/elastic/kibana/issues/62281 |
35 | | - describe.skip('doc link in discover', function contextSize() { |
| 29 | + describe('doc link in discover', function contextSize() { |
36 | 30 | before(async function() { |
37 | 31 | await esArchiver.loadIfNeeded('logstash_functional'); |
38 | 32 | await PageObjects.common.navigateToApp('discover'); |
39 | 33 | await PageObjects.timePicker.setDefaultAbsoluteRange(); |
40 | 34 | await PageObjects.discover.waitForDocTableLoadingComplete(); |
41 | | - for (const columnName of TEST_COLUMN_NAMES) { |
42 | | - await PageObjects.discover.clickFieldListItemAdd(columnName); |
43 | | - } |
44 | | - for (const [columnName, value] of TEST_FILTER_COLUMN_NAMES) { |
45 | | - await PageObjects.discover.clickFieldListItem(columnName); |
46 | | - await PageObjects.discover.clickFieldListPlusFilter(columnName, value); |
47 | | - } |
48 | 35 | }); |
49 | 36 |
|
50 | 37 | it('should open the doc view of the selected document', async function() { |
51 | 38 | // navigate to the doc view |
52 | 39 | await docTable.clickRowToggle({ rowIndex: 0 }); |
53 | | - await (await docTable.getRowActions({ rowIndex: 0 }))[1].click(); |
| 40 | + |
| 41 | + // click the open action |
| 42 | + await retry.try(async () => { |
| 43 | + const rowActions = await docTable.getRowActions({ rowIndex: 0 }); |
| 44 | + if (!rowActions.length) { |
| 45 | + throw new Error('row actions empty, trying again'); |
| 46 | + } |
| 47 | + await rowActions[1].click(); |
| 48 | + }); |
54 | 49 |
|
55 | 50 | const hasDocHit = await testSubjects.exists('doc-hit'); |
56 | 51 | expect(hasDocHit).to.be(true); |
|
0 commit comments