@@ -21,15 +22,30 @@ class JavascriptErrorsTest extends WebDriverTestBase {
protectedstatic$modules=['js_errors_test'];
/**
* Tests that JavaScript console errors will result in a deprecation warning.
* Tests that JavaScript console errors will result in a test failure.
*/
publicfunctiontestJavascriptErrors():void{
$this->expectDeprecation('Not failing JavaScript test for JavaScript errors is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. This test had the following JavaScript errors: Error: A manually thrown error.');
// Visit page that will throw a JavaScript console error.
$this->drupalGet('js_errors_test');
// Ensure that errors from previous page loads will be
@trigger_error("Not failing JavaScript test for JavaScript errors is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. This test had the following JavaScript errors: $all_errors. See https://www.drupal.org/node/3221100",E_USER_DEPRECATED);