-
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
Fix and re-enable Visualize lab mode test #19743
Comments
I have already put some time investigating this, and will write down my findings here. This flaky failure is not directly related to this test, but affects all tests, that try to "Open" a saved search in Discover. For some reason it seems, that this test fails way more often than the others that open a saved search, but I have already had test failures for other Discovery tests, that need to open a saved search (but way less often). The actual issue in all those cases is, that the testing framework clicks the "Open" button on the screen, but the panel to select a saved search actually never opens. If you look at the screenshots and HTML you can see, that the panel is still in it's closed state. But the Open button itself is in it's active state, which mean it has been clicked (not focused, not hovered, but the active state). I tried to solve that issue, by giving the But unfortunately that did not help reliable apparently. So I am unfortunately out of ideas, because I don't know what could cause the click to happen, but the panel to actually not open. I also looked at the Discover code itself for this, if this might potentially by a real issue in the code, but giving the code for that a deep dive, I am rather sure, that this behavior could actually not happen, which makes me think, that it's some weirdness going on in our testing framework. If anyone has any further ideas, what we could do to solve that, they are very welcome, since it will otherwise stay skipped, since I have no further ideas how we could actually debug or fix that. |
Could there be a small timing window when the Discover tab opens and that button is display and enabled but not really "ready"? Just to test this we could insert a 1 second sleep right before clicking "Open". The problem also could be caused by steps before the "Open" not waiting until their action was done. That could even be steps from the previous test not waiting until loading has finished. (I'm working on fixing a few of these now) But if either of these is the case, I would still call it a bug in that the open menu item shouldn't be enabled if it's not actually ready. |
Does it ever fail when you run the tests locally? |
I was unfortunately never able to recreate that failure locally. Also all the runs from before this was enabled, already seem to be cleaned up from CI, so I can't link to a recent failure. The logging was pretty much just showing the 10 retries to check for that open panel and then failed, because the referenced form was still not available. Looking at the code, I would say it's not possible this button exist before being functional. |
Just this this again here: https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-selenium/7657/ and #20858 (comment) |
@stacey-gammon The failure in the job you linked to is related to the
I've created #21245 to address it. I believe this issue may have actually already been addressed by #20165 or #20782. Can @liza-mae or @timroes verify this? |
Hi @cjcenizal I think that test still has issues even after those PRs you listed, at least with navigation and maybe other areas too. I have this open #20980 too, maybe your PR will help fix :) |
I just had the failure 2 times out of 10 runs locally on master;
Looking in to it. |
I give @stacey-gammon credit for tipping me off to this issue in another PR :-) This method in discover_page;
is using but that method returns this; which is returning; and |
Oh nice! In that case we can make use of the |
I'm trying this as a fix;
On one pass, I did this this error, but the try loop recovered it and the test passed;
I don't love this solution because it still leaves the mystery of why the open button doesn't just work. |
Just a note that this flaky test just hit me here: #21245 (comment) |
Yep, and I've hit the stale element error one more time. Which means we're finding the Open menu item but before we click it, something about it changed. Maybe for a very short time it's not enabled, and then it is? |
I don't know... we probably need to dig into the local nav code to understand it better (did a bit of that a long time ago). It's all very old Angular so maybe there's something weird/inefficient with the way it renders. |
@LeeDr I just reassigned this to you since you're already on it. |
Seen another test failure in #21258 |
This has been skipped by #19742 but it needs to actually be fixed and re-enabled
The text was updated successfully, but these errors were encountered: