Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross cluster search discover - additional tests for persisted query and phrases filter #96518

Closed
wants to merge 2 commits into from

Conversation

rashmivkulkarni
Copy link
Contributor

@rashmivkulkarni rashmivkulkarni self-assigned this Apr 7, 2021
@rashmivkulkarni rashmivkulkarni requested review from a team as code owners April 7, 2021 23:19
@rashmivkulkarni rashmivkulkarni changed the base branch from master to 7.x April 7, 2021 23:28
@rashmivkulkarni
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @rashmivkulkarni

@pgayvallet
Copy link
Contributor

Seems more related to @elastic/kibana-app's scope?

@afharo
Copy link
Member

afharo commented Apr 8, 2021

Should this PR aim to master instead of 7.x? 🤔

@rashmivkulkarni rashmivkulkarni requested a review from LeeDr April 8, 2021 14:42
Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a small nit!

it('should add a phrases filter', async function () {
await PageObjects.discover.selectIndexPattern('data:makelogs工程-*,local:makelogs工程-*');
const hitCountNumber = await PageObjects.discover.getHitCount();
const originalHitCount = parseInt(hitCountNumber.replace(/\,/g, ''));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const originalHitCount = parseInt(hitCountNumber.replace(/\,/g, ''));
const originalHitCount = parseInt(hitCountNumber.replace(/\,/g, ''), 10);

Sometimes javascript guesses the radix wrong. Explicitly specifying base 10 is a safer bet.

await queryBar.submitQuery();
await retry.try(async () => {
const hitCountNumber = await PageObjects.discover.getHitCount();
const hitCount = parseInt(hitCountNumber.replace(/\,/g, ''));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const hitCount = parseInt(hitCountNumber.replace(/\,/g, ''));
const hitCount = parseInt(hitCountNumber.replace(/\,/g, ''), 10);

expect(await filterBar.hasFilter('extension.keyword', 'jpg')).to.be(true);
await retry.try(async () => {
const hitCountNumber = await PageObjects.discover.getHitCount();
const hitCount = parseInt(hitCountNumber.replace(/\,/g, ''));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const hitCount = parseInt(hitCountNumber.replace(/\,/g, ''));
const hitCount = parseInt(hitCountNumber.replace(/\,/g, ''), 10);

@rashmivkulkarni
Copy link
Contributor Author

covered by #96669 , hence closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants