Skip to content

Commit

Permalink
[Discover] Unskip data grid context tests (elastic#196672)
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta authored Oct 18, 2024
1 parent 07fc875 commit 6bb2d77
Showing 1 changed file with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const filterBar = getService('filterBar');
const dataGrid = getService('dataGrid');
const testSubjects = getService('testSubjects');
const { common, discover, timePicker, dashboard, header, unifiedFieldList } = getPageObjects([
'common',
'discover',
'timePicker',
'dashboard',
'header',
'unifiedFieldList',
]);
const { common, discover, timePicker, dashboard, header, unifiedFieldList, context } =
getPageObjects([
'common',
'discover',
'timePicker',
'dashboard',
'header',
'unifiedFieldList',
'context',
]);
const defaultSettings = {
defaultIndex: 'logstash-*',
'discover:rowHeightOption': 0, // single line
Expand All @@ -40,8 +42,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const browser = getService('browser');
const security = getService('security');

// Failing: See https:/elastic/kibana/issues/196120
describe.skip('discover data grid context tests', () => {
describe('discover data grid context tests', () => {
before(async () => {
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']);
await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] });
Expand Down Expand Up @@ -70,22 +71,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('should open the context view with the selected document as anchor', async () => {
// check the anchor timestamp in the context view
await retry.waitFor('selected document timestamp matches anchor timestamp ', async () => {
// get the timestamp of the first row
const discoverFields = await dataGrid.getFields();
const firstTimestamp = discoverFields[0][0];
// get the timestamp of the first row
const discoverFields = await dataGrid.getFields();
const firstTimestamp = discoverFields[0][0];

// navigate to the context view
await dataGrid.clickRowToggle({ rowIndex: 0 });
const rowActions = await dataGrid.getRowActions({ rowIndex: 0 });
await rowActions[1].click();
// navigate to the context view
await dataGrid.clickRowToggle({ rowIndex: 0 });
const rowActions = await dataGrid.getRowActions({ rowIndex: 0 });
await rowActions[1].click();
await context.waitUntilContextLoadingHasFinished();

const contextFields = await dataGrid.getFields();
const anchorTimestamp = contextFields[0][0];
await dataGrid.clickRowToggle({ isAnchorRow: true });
await dataGrid.isShowingDocViewer();
const anchorTimestamp = await testSubjects.getVisibleText('tableDocViewRow-@timestamp-value');

return anchorTimestamp === firstTimestamp;
});
expect(anchorTimestamp).to.be(firstTimestamp);
});

it('should open the context view with the filters disabled', async () => {
Expand Down

0 comments on commit 6bb2d77

Please sign in to comment.