[Koha-bugs] [Bug 35506] selenium/regressions.t is failing randomly

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 12 16:17:22 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35506

--- Comment #34 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
(In reply to Jonathan Druart from comment #29)
> (In reply to Victor Grousset/tuxayo from comment #28)
> > In checkouts.js
> > After `$(document).ready(function() {`
> > Add `wait (5000);`
> 
> "Uncaught ReferenceError: wait is not defined"

Oh, it accidentally did the desired effect by acting as a die() and making the
buttons never getting the callback.

Sorry for the confusion. It still achieves the goal, you may disregard the
error and witness how the "show checkout" button behaves as it was caught by
the past screenshot: https://pic.infini.fr/XEdIlOHF/NlCpzGlS.png

-----

(In reply to Jonathan Druart from comment #30)
> Can you attach here one patch to recreate the problem and one (as simple as
> possible) patch to fix it?

After many attempts, there is no possible way to have really a blocking sleep()
in JS without also blocking the whole page (can't click on anything).
So something close enough is to delay only the addition of the handler of the
"Show checkouts" button.
The PoC of the fix is also changed because the flag can't be set at the end of
the content of $(document).ready([...]) but has be set just after the addition
of the handler (in the whole code block delayed by the 1st commit replicating
the issue).
But that's still close enough logic to demonstrate what the main part of the
WIP patch on my repo is doing.

So it here is for the minimal PoC :)
That shows that the main issue is clicking too fast on the button when it has
not handler. And showing that the approach with a flag fixes that.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list