mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Discover] Improve brushing test (#97830)
This commit is contained in:
parent
7ff28959b1
commit
1d99cae32b
1 changed files with 5 additions and 5 deletions
|
@ -120,6 +120,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
);
|
||||
return actualCount === expectedCount;
|
||||
});
|
||||
const prevRowData = await PageObjects.discover.getDocTableField(1);
|
||||
log.debug(`The first timestamp value in doc table before brushing: ${prevRowData}`);
|
||||
await PageObjects.discover.brushHistogram();
|
||||
await PageObjects.discover.waitUntilSearchingHasFinished();
|
||||
await retry.waitFor('chart rendering complete after being brushed', async () => {
|
||||
|
@ -133,12 +135,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const newDurationHours = await PageObjects.timePicker.getTimeDurationInHours();
|
||||
expect(Math.round(newDurationHours)).to.be(26);
|
||||
|
||||
await retry.waitFor('doc table to contain the right search result', async () => {
|
||||
await retry.waitFor('doc table containing the documents of the brushed range', async () => {
|
||||
const rowData = await PageObjects.discover.getDocTableField(1);
|
||||
log.debug(`The first timestamp value in doc table: ${rowData}`);
|
||||
const dateParsed = Date.parse(rowData);
|
||||
// compare against the parsed date of Sep 20, 2015 @ 17:30:00.000 and Sep 20, 2015 @ 23:30:00.000
|
||||
return dateParsed >= 1442770200000 && dateParsed <= 1442791800000;
|
||||
log.debug(`The first timestamp value in doc table after brushing: ${rowData}`);
|
||||
return prevRowData !== rowData;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue