[Discover] Unskip data grid context tests (#196672)

- Closes https://github.com/elastic/kibana/issues/196120
This commit is contained in:
Julia Rechkunova 2024-10-18 10:22:09 +02:00 committed by GitHub
parent 07fc875360
commit 6bb2d77b59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
@ -40,8 +42,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const browser = getService('browser');
const security = getService('security');
// Failing: See https://github.com/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'] });
@ -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 () => {