- Issue created by @sker101
I noticed there are a couple tests failing on the `4.x-dev` branch.
See https://www.drupal.org/pift-ci-job/2580149 β
After looking into the code a bit, I have observed that these tests are relying on a condition
0 === jQuery.active && 0 === jQuery(':animated').length
to determine if all the ajax requests have been completed.
However, it appears that the JS condition is always returning false because the value of jQuery.active is -1 at the end of the tests, regardless of whether there are any pending ajax requests or not.
It seems that jQuery.active is intended to count the number of pending ajax requests, but I could not find any relevant changes in Drupal core that might explain why this number has become negative.
I'm able to get the tests pass if I change the condition from `0 === jQuery.active` to `jQuery.active <= 0` in the following locations:
1. docroot/modules/contrib/panels/panels_ipe/tests/src/FunctionalJavascript/PanelsIPETestTrait.php at line 296
2. docroot/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php at line 102
Active
4.0
Code