Skip to content
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

Throw a helpful exception if the AJAX timeout is missing #528

Merged
merged 4 commits into from
Mar 13, 2019

Conversation

pfrenssen
Copy link
Collaborator

In #486 (comment) @leevh mentioned that the AJAX timeout won't work if the user has made a mistake in the configuration and used Behat\MinkExtension instead of our overridden Drupal\MinkExtension.

This is a very easy mistake to make, especially when considering that our documentation for versions 3.x and lower of DrupalExtension suggests to use Behat\MinkExtension instead of Drupal\MinkExtension. This is also suggested in a number of blog posts and stack overflow answers. Also people upgrading from 3.x will likely hit this bug.

This can be quite insidious, since everything will seem to work as normal, but when the @javascript tag is being used then suddenly mysterious failures will pop up: "Unable to complete AJAX request".

I suggest to check if the timeout is set, and if not let's throw an exception that can help people on the right path.

@pfrenssen pfrenssen force-pushed the throw-helpful-exception-for-ajax-timeout branch from 9f34222 to 0f6ed6a Compare February 6, 2019 08:30
@jhedstrom jhedstrom merged commit 79d2294 into master Mar 13, 2019
@jhedstrom jhedstrom deleted the throw-helpful-exception-for-ajax-timeout branch March 13, 2019 16:53
@jhedstrom
Copy link
Owner

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants