-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iWaitForAjaxToFinish() fails #557
Comments
iWaitForAjaxtoFinish() is also failing for me. I'm using Drupal Extension 4.1.0 on Drupal 8.9.1. I have my site set up locally using lando; when I run the tests there, "I wait for AJAX to finish" works as expected. Lando is using the selenium/standalone-chrome-debug docker image. However, when I push my changes to github and a build is triggered via CircleCI on Pantheon, the "I wait for AJAX to finish" step gives me the following error: Pantheon CircleCI uses DMore\Chromedriver instead of selenium standalone chrome:
I also get the same browser crash with code like this:
In both cases, this error only occurs when testing the Pantheon site via CircleCI; it does not occur locally in lando. |
Any news here? |
Using drupal/drupal-extension v4.1.0 with Drupal 9.2.9 iWaitForAjaxtoFinish() is failing for us on our local VMs, but, strangely, not on our gitlab-ci. On the VM, we get many "Unable to complete AJAX request" errors. Taking a look at MinkContext.php ... ... we see that The problem I am having is that the Here is the pull request: In the PR I made this change to the javascript function, to add the check to see if the jQuery.active property was available:
Here is some debug code, this helped me investigate what jQuery.active was doing.
Running the behat command I now get output like this: Sometimes, jQuery.active returns an integer (0).
|
This looks great! Thanks for diving into that. I can merge the PR as it looks good to me. |
Facing the same issue |
I'm still facing the same issue even with michaellenahan comment. In my case, the error happens when I return a 403 or a 500 on purpose. I'd like Behat not to stop there, but to actually validate that a message is displayed to the user. I did a quick digging around but couldn't figure it out. I actually don't really understand how this test works, basically we wait until the result is false and then throw an error. How does it work when the AJAX callback is actually returning a 200? What is stopping the execution of this function not to throw the \RuntimeException? From a rough guess, I think what triggers my error is that all Drupal.ajax.instances are done but Behat didn't get a 200 response so continue the execution of iWaitForAjaxToFinish which throws the error and break the scenario execution ... |
jQuery.active internal value may have negative value in some cases causing inconsistent test results, as jquery supposedly increments the value when an ajax request starts and decrements it when it finishes, it should not influence the identification of active ajax requests
Created pull request jQuery.active internal value may have negative value in some cases causing inconsistent test results, as jquery supposedly increments the value when an ajax request starts and decrements it when it finishes, it should not influence the identification of active ajax requests Hope it helps! |
I'm consistently getting null
$result
ondrupal-extension/src/Drupal/DrupalExtension/Context/MinkContext.php:156
I'm not clear on where the failure is but this essentially makes any@javascript
Feature impossible. I'm on Drupal v8.7.8
using Lando with theselenium/standalone-chrome:3.141.59-oxygen
chromedriver on PHP 7.2Full error output for reference:
The text was updated successfully, but these errors were encountered: