Commit ed44bee5 authored by Jérome Perrin's avatar Jérome Perrin

knowledge_pad_ui_test: fix a random failure

This test click on the delete button which deletes by an ajax request
and immediatly after open the "wait for activities" page. Sometimes the
second request starts before the first is committed, so there are no
activities to wait for.

When using ZServer, we had only one worker thread, so this was not
visible, but with wsgi we have more than one so it happened sometimes.

Use an old jQuery trick to wait that the first request is no longer in

/reviewed-on !1038
parent 88ebd8cd
Pipeline #7854 passed with stage
in 0 seconds
......@@ -173,6 +173,17 @@ Wait for activities</span>
<td>Are you sure you want to remove this gadget from your personalized page?</td>
Clicking on the "delete pad" button sends an ajax request to KnowledgePad_deleteBox using jQuery.ajax.
KnowledgePad_deleteBox will mark the knowledge pad as deleted, and the wait_for_activities below is
to wait for this reindex activity. We want to make sure the server really recieved this request before
navigating to wait_for_activities.
<td>selenium.browserbot.getCurrentWindow() == 0</td>
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities">
Wait for activities</span>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment