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
flight.

/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>
<td></td>
</tr>
<!--
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.
-->
<tr>
<td>waitForCondition</td>
<td>selenium.browserbot.getCurrentWindow().jQuery.active == 0</td>
<td>30000</td>
</tr>
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities">
Wait for activities</span>
<tr>
......
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