Is it possible to turn off JavaScript for some tests using Codeception?

Ad

We have client-side validation and server-side validation as a back up in this Laravel application, and we want to test both, but I can't figure out if that's possible. Is it possible to turn off JavaScript for a single run of the tests, then run them again with it on using Codeception?

Ad

Answer

Ad

Test with PhpBrowser or Laravel5 module. They can't execute Javascript, so only server side validation is possible.

You will have to create a separate test suite (or use functional if you aren't using it yet) for these tests, because you can have only one of WebDriver, PhpBrowser and Laravel5 modules enabled at a time.

Ad
source: stackoverflow.com
Ad