-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Conversation
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Seems more related to @elastic/kibana-app's scope? |
Should this PR aim to |
There was a problem hiding this 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, '')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, '')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, '')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const hitCount = parseInt(hitCountNumber.replace(/\,/g, '')); | |
const hitCount = parseInt(hitCountNumber.replace(/\,/g, ''), 10); |
covered by #96669 , hence closing this PR. |
cc @LeeDr