-
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
[6.3] Improve visualization tests #20783
Changes from 8 commits
20020aa
e9afd07
873cd4b
b595235
054a732
86375af
3e3f76d
66458cf
2bdce07
67a373d
5b76f5d
e7656ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ export default function ({ getService, getPageObjects }) { | |
const toTime = '2015-09-23 18:31:44.000'; | ||
|
||
log.debug('navigateToApp visualize'); | ||
await PageObjects.common.navigateToUrl('visualize', 'new'); | ||
await PageObjects.visualize.navigateToNewVisualization(); | ||
log.debug('clickDataTable'); | ||
await PageObjects.visualize.clickDataTable(); | ||
await PageObjects.visualize.clickNewSearch(); | ||
|
@@ -30,7 +30,8 @@ export default function ({ getService, getPageObjects }) { | |
log.debug(`Interval = ${providedInterval}`); | ||
await PageObjects.visualize.setNumericInterval(providedInterval); | ||
await PageObjects.visualize.clickGo(); | ||
await PageObjects.header.waitUntilLoadingHasFinished(); | ||
await PageObjects.common.sleep(1000); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add the sleep to the clickGo() method? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe I tried both those for this function and the only that helped was a sleep. |
||
|
||
const data = await PageObjects.visualize.getDataTableData(); | ||
const dataArray = data.replace(/,/g, '').split('\n'); | ||
expect(dataArray.length).to.eql(20); | ||
|
@@ -45,7 +46,7 @@ export default function ({ getService, getPageObjects }) { | |
log.debug(`Interval = ${providedInterval}`); | ||
await PageObjects.visualize.setNumericInterval(providedInterval); | ||
await PageObjects.visualize.clickGo(); | ||
await PageObjects.header.waitUntilLoadingHasFinished(); | ||
await PageObjects.common.sleep(1000); | ||
|
||
const data = await PageObjects.visualize.getDataTableData(); | ||
const dataArray = data.replace(/,/g, '').split('\n'); | ||
|
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.
There's already a 500ms sleep in the clickBucket method.
https://github.com/liza-mae/kibana/blob/3e3f76d09b6eb916249c1c833b2c7d3613dfa0db/test/functional/page_objects/visualize_page.js#L397
Should we just increase that sleep instead of adding this one to the test?
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.
Unfortunately what I found is sometimes specific tests take longer and that was the case here, these were run in a loop and adding the sleep there helped, but I see some changes are pending for clickBucket, so let me take those in.