mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* refactor getHitCount, use Last_1 year
* revert change to heartbeat test
(cherry picked from commit 1cd4c4892d
)
Co-authored-by: Lee Drengenberg <lee.drengenberg@elastic.co>
This commit is contained in:
parent
794da3f676
commit
75595ce8e3
6 changed files with 12 additions and 8 deletions
|
@ -243,6 +243,10 @@ export class DiscoverPageObject extends FtrService {
|
|||
return await this.testSubjects.getVisibleText('discoverQueryHits');
|
||||
}
|
||||
|
||||
public async getHitCountInt() {
|
||||
return parseInt(await this.getHitCount(), 10);
|
||||
}
|
||||
|
||||
public async getDocHeader() {
|
||||
const table = await this.getDocTable();
|
||||
const docHeader = await table.getHeaders();
|
||||
|
|
|
@ -18,7 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.discover.selectIndexPattern('filebeat-*');
|
||||
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
|
||||
await retry.try(async () => {
|
||||
const hitCount = parseInt(await PageObjects.discover.getHitCount(), 10);
|
||||
const hitCount = await PageObjects.discover.getHitCountInt();
|
||||
expect(hitCount).to.be.greaterThan(0);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.discover.selectIndexPattern('metricbeat-*');
|
||||
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
|
||||
await retry.try(async function () {
|
||||
const hitCount = parseInt(await PageObjects.discover.getHitCount(), 10);
|
||||
const hitCount = await PageObjects.discover.getHitCountInt();
|
||||
expect(hitCount).to.be.greaterThan(0);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -32,7 +32,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.discover.selectIndexPattern('packetbeat-*');
|
||||
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
|
||||
await retry.try(async function () {
|
||||
const hitCount = parseInt(await PageObjects.discover.getHitCount(), 10);
|
||||
const hitCount = await PageObjects.discover.getHitCountInt();
|
||||
expect(hitCount).to.be.greaterThan(0);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -27,7 +27,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.discover.selectIndexPattern('winlogbeat-*');
|
||||
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
|
||||
await retry.try(async function () {
|
||||
const hitCount = parseInt(await PageObjects.discover.getHitCount(), 10);
|
||||
const hitCount = await PageObjects.discover.getHitCountInt();
|
||||
expect(hitCount).to.be.greaterThan(0);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,12 +40,12 @@ export default function ({ getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.discover.selectIndexPattern(String(index));
|
||||
await PageObjects.discover.waitUntilSearchingHasFinished();
|
||||
if (timefield) {
|
||||
await PageObjects.timePicker.setCommonlyUsedTime('Last_24 hours');
|
||||
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
|
||||
await PageObjects.discover.waitUntilSearchingHasFinished();
|
||||
}
|
||||
});
|
||||
it('shows hit count greater than zero', async () => {
|
||||
const hitCount = await PageObjects.discover.getHitCount();
|
||||
const hitCount = await PageObjects.discover.getHitCountInt();
|
||||
if (hits === '') {
|
||||
expect(hitCount).to.be.greaterThan(0);
|
||||
} else {
|
||||
|
@ -69,12 +69,12 @@ export default function ({ getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.home.launchSampleDiscover(name);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
if (timefield) {
|
||||
await PageObjects.timePicker.setCommonlyUsedTime('Last_24 hours');
|
||||
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
|
||||
await PageObjects.discover.waitUntilSearchingHasFinished();
|
||||
}
|
||||
});
|
||||
it('shows hit count greater than zero', async () => {
|
||||
const hitCount = await PageObjects.discover.getHitCount();
|
||||
const hitCount = await PageObjects.discover.getHitCountInt();
|
||||
if (hits === '') {
|
||||
expect(hitCount).to.be.greaterThan(0);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue