Skip to content

Commit

Permalink
[Discover] Unskip main functional tests (#84300) (#84536)
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal authored Nov 30, 2020
1 parent 7e2c65b commit f1ac252
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/functional/apps/discover/_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,14 @@ export default function ({ getService, getPageObjects }) {
defaultIndex: 'logstash-*',
};

// Failing: See https://github.com/elastic/kibana/issues/82915
describe.skip('discover app', function describeIndexTests() {
describe('discover test', function describeIndexTests() {
before(async function () {
// delete .kibana index and update configDoc
await kibanaServer.uiSettings.replace(defaultSettings);

log.debug('load kibana index with default index pattern');
await esArchiver.load('discover');

// and load a set of makelogs data
await esArchiver.loadIfNeeded('logstash_functional');
await kibanaServer.uiSettings.replace(defaultSettings);
log.debug('discover');
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setDefaultAbsoluteRange();
Expand Down Expand Up @@ -340,10 +337,13 @@ export default function ({ getService, getPageObjects }) {

const getRequestTimestamp = async () => {
const requestStats = await inspector.getTableData();
const requestTimestamp = requestStats.filter((r) =>
r[0].includes('Request timestamp')
)[0][1];
return requestTimestamp;
const requestStatsRow = requestStats.filter(
(r) => r && r[0] && r[0].includes('Request timestamp')
);
if (!requestStatsRow || !requestStatsRow[0] || !requestStatsRow[0][1]) {
return '';
}
return requestStatsRow[0][1];
};

const requestTimestampBefore = await getRequestTimestamp();
Expand All @@ -352,7 +352,7 @@ export default function ({ getService, getPageObjects }) {
log.debug(
`Timestamp before: ${requestTimestampBefore}, Timestamp after: ${requestTimestampAfter}`
);
return requestTimestampBefore !== requestTimestampAfter;
return requestTimestampAfter && requestTimestampBefore !== requestTimestampAfter;
});
});

Expand Down

0 comments on commit f1ac252

Please sign in to comment.