-
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
fixing flaky vsualize data_table_nontimeindex test #22288
Conversation
💔 Build Failed |
retest |
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 - pending successful CI run, thanks Peter!!!
💔 Build Failed |
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.
This will fix the flaky test on data_table, but introduced the error on the gauge (not present on master).
Not sure what changed between the two but seems that test should show correct values for fields with fieldFormatters
fails because clickMetricEditor
toggle off the Metric editor and the subsequent clickBucket
doesn't find Split Group
liste element because it's already configured and the list of available buckets is already gone.
I think we need to change the clickBucket to have something more stable, without the sleep, and also check every test that use clickBucket.
await PageObjects.common.sleep(500); | ||
await retry.try(async () => { | ||
const chartTypes = await retry.try( | ||
async () => await find.allByCssSelector('li.list-group-item.list-group-menu-item')); |
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.
I think we need to find a better selector than this one, it's also used on the metric list. I know that we then heve a check on the name, but it's not the right way to get this.
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.
i agree, but would probably keep this PR to the minimal change.
const chartString = await chart.getVisibleText(); | ||
if (chartString === bucketName) { | ||
await chart.click(); | ||
await PageObjects.common.sleep(500); |
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.
We cannot rely on a timer to be sure that the click is executed.
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.
what would be your suggestion ? anyway, i would keep that out of this PR ... in general i think we want to remove every sleep in our tests with something more reliable.
💚 Build Succeeded |
retest |
💔 Build Failed |
x-pack tests failed to start, but selenium passed ok
|
37fe876
to
976918d
Compare
💚 Build Succeeded |
@ppisljar I think it's better to create an issue for the failing build because of x-pack. I've searched this and found the same error here #20497 (comment) and there: #20111 (comment) |
retest |
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.
Code LGTM. Waiting for few CI test/retest
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.
@ppisljar I forgot some files that use the directives here and I want to be sure that everything was taken in consideration:
- src/ui/public/agg_types/controls/order_agg.html
- src/ui/public/agg_types/controls/sub_agg.html
- src/ui/public/agg_types/controls/sub_metric.html
- src/ui/public/vis/editors/default/tests/agg_params.js line 84
- src/ui/public/vis/editors/default/agg.html
We have also other two visualize_page method that use the old group-name attribute:
async clickAddMetric() {
await find.clickByCssSelector('[group-name="metrics"] [data-test-subj="visualizeEditorAddAggregationButton"]');
}
async clickAddBucket() {
await find.clickByCssSelector('[group-name="buckets"] [data-test-subj="visualizeEditorAddAggregationButton"]');
}
I agree @markov00 |
💚 Build Succeeded |
retest |
💚 Build Succeeded |
retest |
💚 Build Succeeded |
retest |
💚 Build Succeeded |
retest |
💚 Build Succeeded |
fixes a flaky test
we didn't check if anything was actually clicked in the
clickBucket
function