-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
4.0.0
-
MOODLE_400_STABLE
We have a Moodle plugin that had been failing it's behat tests since version 4.0.0 of the app was released.
The tests fail with a message like:
When I press "AV test" in the app: Javascript code and/or AJAX requests are not ready after 40 seconds. There is a Javascript error or the code is extremely slow (DELAY:dom-mutation). If you are using a slow machine, consider setting $CFG->behat_increasetimeout. (Exception)
|
I added in some additional console output in the Javascript the plugin was injecting into the app and think I see where the problem is.
We have an ion-buttion that is added to a page via:
<ion-button expand="full" |
core-site-plugins-call-ws name="mod_vote_vote" |
[params]="{id: <% id %>, type: <% type %>, vote: prep_data()}"
|
[preSets]="{getFromCache: 0, saveToCache: 0}"
|
(onSuccess) = "check_response($event)"
|
>
|
{{ 'plugin.mod_vote.submit' | translate }}
|
</ion-button> |
The console output showed that in version 4.0.0 of the app prep_data() was being constantly called, in version 3.9.5 it was called much less frequently (and almost not at all it nothing was interacting with the app)