diff --git a/core/core.libraries.yml b/core/core.libraries.yml
index 987d43bfee278a2130459d016e55f16b33694769..69b1e140bf77f8a02342755bff98f1bedcdc993e 100644
--- a/core/core.libraries.yml
+++ b/core/core.libraries.yml
@@ -50,6 +50,8 @@ drupal:
   dependencies:
     - core/domready
     - core/drupalSettings
+  drupalSettings:
+    suppressDeprecationErrors: true
 
 drupalSettings:
   version: VERSION
diff --git a/core/misc/drupal.es6.js b/core/misc/drupal.es6.js
index ea47bb790c9314e11eea5f3eb99b05a534ff9f28..48e5f7e2f093b3d1c43a3b5a4881ac5df121214a 100644
--- a/core/misc/drupal.es6.js
+++ b/core/misc/drupal.es6.js
@@ -42,7 +42,7 @@ window.Drupal = { behaviors: {}, locale: {} };
 
 // JavaScript should be made compatible with libraries other than jQuery by
 // wrapping it in an anonymous closure.
-(function(Drupal, drupalSettings, drupalTranslations) {
+(function(Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) {
   /**
    * Helper to rethrow errors asynchronously.
    *
@@ -541,6 +541,61 @@ window.Drupal = { behaviors: {}, locale: {} };
     return window.encodeURIComponent(item).replace(/%2F/g, '/');
   };
 
+  /**
+   * Triggers deprecation error.
+   *
+   * Deprecation errors are only triggered if deprecation errors haven't
+   * been suppressed.
+   *
+   * @param {Object} deprecation
+   *   The deprecation options.
+   * @param {string} deprecation.message
+   *   The deprecation message.
+   *
+   * @see https://www.drupal.org/core/deprecation#javascript
+   */
+  Drupal.deprecationError = ({ message }) => {
+    if (
+      drupalSettings.suppressDeprecationErrors === false &&
+      typeof console !== 'undefined' &&
+      console.warn
+    ) {
+      console.warn(`[Deprecation] ${message}`);
+    }
+  };
+
+  /**
+   * Triggers deprecation error when object property is being used.
+   *
+   * @param {Object} deprecation
+   *   The deprecation options.
+   * @param {Object} deprecation.target
+   *   The targeted object.
+   * @param {string} deprecation.deprecatedProperty
+   *   A key of the deprecated property.
+   * @param {string} deprecation.message
+   *   The deprecation message.
+   * @returns {Object}
+   *
+   * @see https://www.drupal.org/core/deprecation#javascript
+   */
+  Drupal.deprecatedProperty = ({ target, deprecatedProperty, message }) => {
+    // Proxy and Reflect are not supported by all browsers. Unsupported browsers
+    // are ignored since this is a development feature.
+    if (!Proxy || !Reflect) {
+      return target;
+    }
+
+    return new Proxy(target, {
+      get: (target, key, ...rest) => {
+        if (key === deprecatedProperty) {
+          Drupal.deprecationError({ message });
+        }
+        return Reflect.get(target, key, ...rest);
+      },
+    });
+  };
+
   /**
    * Generates the themed representation of a Drupal object.
    *
@@ -583,4 +638,11 @@ window.Drupal = { behaviors: {}, locale: {} };
   Drupal.theme.placeholder = function(str) {
     return `<em class="placeholder">${Drupal.checkPlain(str)}</em>`;
   };
-})(Drupal, window.drupalSettings, window.drupalTranslations);
+})(
+  Drupal,
+  window.drupalSettings,
+  window.drupalTranslations,
+  window.console,
+  window.Proxy,
+  window.Reflect,
+);
diff --git a/core/misc/drupal.js b/core/misc/drupal.js
index 4e3389358e14ddc3acc33c4220ad0cb1e80b9639..661d511eef5762f72fe2e1a9ed93c284c3f855b6 100644
--- a/core/misc/drupal.js
+++ b/core/misc/drupal.js
@@ -7,7 +7,7 @@
 
 window.Drupal = { behaviors: {}, locale: {} };
 
-(function (Drupal, drupalSettings, drupalTranslations) {
+(function (Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) {
   Drupal.throwError = function (error) {
     setTimeout(function () {
       throw error;
@@ -173,12 +173,43 @@ window.Drupal = { behaviors: {}, locale: {} };
     return window.encodeURIComponent(item).replace(/%2F/g, '/');
   };
 
+  Drupal.deprecationError = function (_ref) {
+    var message = _ref.message;
+
+    if (drupalSettings.suppressDeprecationErrors === false && typeof console !== 'undefined' && console.warn) {
+      console.warn('[Deprecation] ' + message);
+    }
+  };
+
+  Drupal.deprecatedProperty = function (_ref2) {
+    var target = _ref2.target,
+        deprecatedProperty = _ref2.deprecatedProperty,
+        message = _ref2.message;
+
+    if (!Proxy || !Reflect) {
+      return target;
+    }
+
+    return new Proxy(target, {
+      get: function get(target, key) {
+        for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
+          rest[_key - 2] = arguments[_key];
+        }
+
+        if (key === deprecatedProperty) {
+          Drupal.deprecationError({ message: message });
+        }
+        return Reflect.get.apply(Reflect, [target, key].concat(rest));
+      }
+    });
+  };
+
   Drupal.theme = function (func) {
     if (func in Drupal.theme) {
       var _Drupal$theme;
 
-      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-        args[_key - 1] = arguments[_key];
+      for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+        args[_key2 - 1] = arguments[_key2];
       }
 
       return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args);
@@ -188,4 +219,4 @@ window.Drupal = { behaviors: {}, locale: {} };
   Drupal.theme.placeholder = function (str) {
     return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>';
   };
-})(Drupal, window.drupalSettings, window.drupalTranslations);
\ No newline at end of file
+})(Drupal, window.drupalSettings, window.drupalTranslations, window.console, window.Proxy, window.Reflect);
\ No newline at end of file
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.es6.js b/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.es6.js
new file mode 100644
index 0000000000000000000000000000000000000000..90019bd659917aaea3a2f111f7afdd9fe53eb31c
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.es6.js
@@ -0,0 +1,21 @@
+/**
+ * @file
+ *  Testing tools for deprecating JavaScript functions and class properties.
+ */
+(function() {
+  if (typeof console !== 'undefined' && console.warn) {
+    const originalWarnFunction = console.warn;
+    console.warn = warning => {
+      const warnings = JSON.parse(
+        sessionStorage.getItem('js_deprecation_log_test.warnings') ||
+          JSON.stringify([]),
+      );
+      warnings.push(warning);
+      sessionStorage.setItem(
+        'js_deprecation_log_test.warnings',
+        JSON.stringify(warnings),
+      );
+      originalWarnFunction(warning);
+    };
+  }
+})();
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.js b/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.js
new file mode 100644
index 0000000000000000000000000000000000000000..e1724ebe482820370b1af0327357fc88c621d357
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.js
@@ -0,0 +1,18 @@
+/**
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
+
+(function () {
+  if (typeof console !== 'undefined' && console.warn) {
+    var originalWarnFunction = console.warn;
+    console.warn = function (warning) {
+      var warnings = JSON.parse(sessionStorage.getItem('js_deprecation_log_test.warnings') || JSON.stringify([]));
+      warnings.push(warning);
+      sessionStorage.setItem('js_deprecation_log_test.warnings', JSON.stringify(warnings));
+      originalWarnFunction(warning);
+    };
+  }
+})();
\ No newline at end of file
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.info.yml b/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.info.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b2589c6e2a263d2922bce49cdb13a09d90e90def
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.info.yml
@@ -0,0 +1,6 @@
+name: 'JS Deprecation log test'
+description: 'Stores all JS deprecation calls to allow JS tests to determine if they have been called.'
+type: module
+package: Testing
+version: VERSION
+core: 8.x
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.libraries.yml b/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.libraries.yml
new file mode 100644
index 0000000000000000000000000000000000000000..1744815c98613b2925cfdb03d0958d01893b0e91
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.libraries.yml
@@ -0,0 +1,6 @@
+deprecation_log:
+  version: VERSION
+  js:
+    js/js_deprecation_log.js: { weight: -100 }
+  dependencies:
+    - core/drupal
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.module b/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.module
new file mode 100644
index 0000000000000000000000000000000000000000..a86a2f21fbd204bd9f23ae640c1a670ad01bbaee
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.module
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @file
+ * Helper module for the JavaScript deprecation tests.
+ */
+
+/**
+ * Implements hook_page_attachments().
+ */
+function js_deprecation_log_test_page_attachments(array &$attachments) {
+  // Unconditionally attach an asset to the page.
+  $attachments['#attached']['library'][] = 'js_deprecation_log_test/deprecation_log';
+}
+
+/**
+ * Implements hook_js_settings_alter().
+ */
+function js_deprecation_log_test_js_settings_alter(&$settings) {
+  $settings['suppressDeprecationErrors'] = FALSE;
+}
diff --git a/core/modules/system/tests/modules/js_deprecation_test/js/js_deprecation_test.es6.js b/core/modules/system/tests/modules/js_deprecation_test/js/js_deprecation_test.es6.js
new file mode 100644
index 0000000000000000000000000000000000000000..592a72349b1945e059134d7e0255898ff4d04909
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_test/js/js_deprecation_test.es6.js
@@ -0,0 +1,24 @@
+/**
+ * @file
+ *  Testing tools for deprecating JavaScript functions and class properties.
+ */
+(function({ deprecationError, deprecatedProperty, behaviors }) {
+  const deprecatedFunction = () => {
+    deprecationError({
+      message: 'This function is deprecated for testing purposes.',
+    });
+  };
+  const objectWithDeprecatedProperty = deprecatedProperty({
+    target: { deprecatedProperty: 'Kitten' },
+    deprecatedProperty: 'deprecatedProperty',
+    message: 'This property is deprecated for testing purposes.',
+  });
+
+  behaviors.testDeprecations = {
+    attach: () => {
+      deprecatedFunction();
+      const deprecatedProperty =
+        objectWithDeprecatedProperty.deprecatedProperty;
+    },
+  };
+})(Drupal);
diff --git a/core/modules/system/tests/modules/js_deprecation_test/js/js_deprecation_test.js b/core/modules/system/tests/modules/js_deprecation_test/js/js_deprecation_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..e1c6178696d66bbb87aa26a5cb3da433bc8c1311
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_test/js/js_deprecation_test.js
@@ -0,0 +1,30 @@
+/**
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
+
+(function (_ref) {
+  var deprecationError = _ref.deprecationError,
+      deprecatedProperty = _ref.deprecatedProperty,
+      behaviors = _ref.behaviors;
+
+  var deprecatedFunction = function deprecatedFunction() {
+    deprecationError({
+      message: 'This function is deprecated for testing purposes.'
+    });
+  };
+  var objectWithDeprecatedProperty = deprecatedProperty({
+    target: { deprecatedProperty: 'Kitten' },
+    deprecatedProperty: 'deprecatedProperty',
+    message: 'This property is deprecated for testing purposes.'
+  });
+
+  behaviors.testDeprecations = {
+    attach: function attach() {
+      deprecatedFunction();
+      var deprecatedProperty = objectWithDeprecatedProperty.deprecatedProperty;
+    }
+  };
+})(Drupal);
\ No newline at end of file
diff --git a/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.info.yml b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.info.yml
new file mode 100644
index 0000000000000000000000000000000000000000..0a1b6153be38300fe1758596a2e253bedbda3a12
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.info.yml
@@ -0,0 +1,6 @@
+name: 'JS Deprecation test'
+description: 'Provides deprecated code that can be used for tests'
+type: module
+package: Testing
+version: VERSION
+core: 8.x
diff --git a/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.libraries.yml b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.libraries.yml
new file mode 100644
index 0000000000000000000000000000000000000000..0ae3e7ce3c1805cef2ed25cfec1e47c1b01ba125
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.libraries.yml
@@ -0,0 +1,6 @@
+deprecation_test:
+  version: VERSION
+  js:
+    js/js_deprecation_test.js: {}
+  dependencies:
+    - core/drupal
diff --git a/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.module b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.module
new file mode 100644
index 0000000000000000000000000000000000000000..523c2868755e29a01606be9b05188b0d865fe9e5
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.module
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @file
+ * Helper module for the JavaScript deprecation tests.
+ */
+
+/**
+ * Implements hook_js_settings_alter().
+ */
+function js_deprecation_test_js_settings_alter(&$settings) {
+  $settings['suppressDeprecationErrors'] = FALSE;
+}
diff --git a/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.routing.yml b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.routing.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c909e5c62a47b5597f620b65332ed61c3a3f478d
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_test/js_deprecation_test.routing.yml
@@ -0,0 +1,7 @@
+js_deprecation_test.deprecation:
+  path: '/js_deprecation_test'
+  defaults:
+    _controller: '\Drupal\js_deprecation_test\Controller\JsDeprecationTestController::jsDeprecationTest'
+    _title: 'JsDeprecationTest'
+  requirements:
+    _access: 'TRUE'
diff --git a/core/modules/system/tests/modules/js_deprecation_test/src/Controller/JsDeprecationTestController.php b/core/modules/system/tests/modules/js_deprecation_test/src/Controller/JsDeprecationTestController.php
new file mode 100644
index 0000000000000000000000000000000000000000..21561d54ac4709f19de0438e782bae75d88fa214
--- /dev/null
+++ b/core/modules/system/tests/modules/js_deprecation_test/src/Controller/JsDeprecationTestController.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Drupal\js_deprecation_test\Controller;
+
+/**
+ * Test Controller to show message links.
+ */
+class JsDeprecationTestController {
+
+  /**
+   * Renders page that has js_deprecation_test/deprecation library attached.
+   *
+   * @return array
+   *   Render array.
+   */
+  public function jsDeprecationTest() {
+    return [
+      '#attached' => ['library' => ['js_deprecation_test/deprecation_test']],
+    ];
+  }
+
+}
diff --git a/core/profiles/nightwatch_testing/config/optional/locale.settings.yml b/core/profiles/nightwatch_testing/config/optional/locale.settings.yml
new file mode 100644
index 0000000000000000000000000000000000000000..f1842a02076c51986659ef33be07c63eb3fc8928
--- /dev/null
+++ b/core/profiles/nightwatch_testing/config/optional/locale.settings.yml
@@ -0,0 +1,12 @@
+cache_strings: true
+javascript:
+  directory: languages
+translation:
+  use_source: remote_and_local
+  default_filename: '%project-%version.%language.po'
+  default_server_pattern: 'http://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po'
+  overwrite_customized: false
+  overwrite_not_customized: true
+  update_interval_days: 0
+  path: ''
+  import_enabled: false
diff --git a/core/profiles/nightwatch_testing/nightwatch_testing.info.yml b/core/profiles/nightwatch_testing/nightwatch_testing.info.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b1198093da217d8625962a8b97400f883a44ac1a
--- /dev/null
+++ b/core/profiles/nightwatch_testing/nightwatch_testing.info.yml
@@ -0,0 +1,8 @@
+name: Nightwatch Testing
+type: profile
+description: 'Minimal profile for running Nightwatch tests. Includes absolutely required modules only.'
+version: VERSION
+core: 8.x
+hidden: true
+install:
+  - js_deprecation_log_test
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4714cecf72a9a7328211512c2ee7160b3bf6810d
--- /dev/null
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\FunctionalJavascriptTests;
+
+/**
+ * Tests Javascript deprecation notices.
+ *
+ * @group javascript
+ * @group legacy
+ */
+class JavascriptDeprecationTest extends WebDriverTestBase {
+
+  public static $modules = ['js_deprecation_test'];
+
+  /**
+   * @expectedDeprecation Javascript Deprecation: This function is deprecated for testing purposes.
+   * @expectedDeprecation Javascript Deprecation: This property is deprecated for testing purposes.
+   */
+  public function testJavascriptDeprecation() {
+    $this->drupalGet('js_deprecation_test');
+    // Ensure that deprecation message from previous page loads will be
+    // detected.
+    $this->drupalGet('user');
+  }
+
+}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
index d677aa8e2d64e54f70eb2b05b7f8ea5c5d8946bb..63ee85c852d94356c403cf87018a9ebea66a43e6 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
@@ -76,8 +76,9 @@ protected function initMink() {
    * {@inheritdoc}
    */
   protected function installModulesFromClassProperty(ContainerInterface $container) {
+    self::$modules = ['js_deprecation_log_test'];
     if ($this->disableCssAnimations) {
-      self::$modules = ['css_disable_transitions_test'];
+      self::$modules[] = 'css_disable_transitions_test';
     }
     parent::installModulesFromClassProperty($container);
   }
@@ -108,6 +109,13 @@ protected function tearDown() {
         // explaining what the problem is.
         throw new \RuntimeException('Unfinished AJAX requests while tearing down a test');
       }
+
+      $warnings = $this->getSession()->evaluateScript("JSON.parse(sessionStorage.getItem('js_deprecation_log_test.warnings') || JSON.stringify([]))");
+      foreach ($warnings as $warning) {
+        if (strpos($warning, '[Deprecation]') === 0) {
+          @trigger_error('Javascript Deprecation:' . substr($warning, 13), E_USER_DEPRECATED);
+        }
+      }
     }
     parent::tearDown();
   }
diff --git a/core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js b/core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js
new file mode 100644
index 0000000000000000000000000000000000000000..ca48f071b5b14ce0c2e062f763752331800b2f8c
--- /dev/null
+++ b/core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js
@@ -0,0 +1,23 @@
+module.exports.assertion = function(expected) {
+  this.message = `Testing if "${expected}" deprecation error has been triggered`;
+  this.expected = expected;
+  this.pass = deprecationMessages => deprecationMessages.includes(expected);
+  this.value = result => {
+    const sessionStorageEntries = JSON.parse(result.value);
+    const deprecationMessages =
+      sessionStorageEntries !== null
+        ? sessionStorageEntries.filter(message =>
+            new RegExp('[Deprecation]').test(message),
+          )
+        : [];
+
+    return deprecationMessages.map(message =>
+      message.replace('[Deprecation] ', ''),
+    );
+  };
+  this.command = callback =>
+    // eslint-disable-next-line prefer-arrow-callback
+    this.api.execute(function() {
+      return window.sessionStorage.getItem('js_deprecation_log_test.warnings');
+    }, callback);
+};
diff --git a/core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js b/core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js
new file mode 100644
index 0000000000000000000000000000000000000000..fa74c7b0346829e9d87b7071f189babea769ea6e
--- /dev/null
+++ b/core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js
@@ -0,0 +1,23 @@
+module.exports.assertion = function() {
+  this.message = 'Ensuring no deprecation errors have been triggered';
+  this.expected = '';
+  this.pass = deprecationMessages => deprecationMessages.length === 0;
+  this.value = result => {
+    const sessionStorageEntries = JSON.parse(result.value);
+    const deprecationMessages =
+      sessionStorageEntries !== null
+        ? sessionStorageEntries.filter(message =>
+            new RegExp('[Deprecation]').test(message),
+          )
+        : [];
+
+    return deprecationMessages.map(message =>
+      message.replace('[Deprecation] ', ''),
+    );
+  };
+  this.command = callback =>
+    // eslint-disable-next-line prefer-arrow-callback
+    this.api.execute(function() {
+      return window.sessionStorage.getItem('js_deprecation_log_test.warnings');
+    }, callback);
+};
diff --git a/core/tests/Drupal/Nightwatch/Commands/drupalCreateUser.js b/core/tests/Drupal/Nightwatch/Commands/drupalCreateUser.js
index 1c907f912b64ce7d945b3bbaab295078604fc8a0..d37a45d43fda6d32a08cf73a1637d8a49e3d94a5 100644
--- a/core/tests/Drupal/Nightwatch/Commands/drupalCreateUser.js
+++ b/core/tests/Drupal/Nightwatch/Commands/drupalCreateUser.js
@@ -46,7 +46,7 @@ exports.command = function drupalCreateUser(
       })
       .submitForm('#user-register-form')
       .assert.containsText(
-        '.messages',
+        '[data-drupal-messages]',
         'Created a new user account',
         `User "${name}" was created successfully.`,
       );
diff --git a/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js b/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js
index afc600a589fb7a5beb13b34810e3a8335ff8a3be..45c2a384631673949e951b5f05b3a3c678d101a9 100644
--- a/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js
+++ b/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js
@@ -25,7 +25,7 @@ exports.command = function drupalInstall({ setupFile = '' } = {}, callback) {
         : '';
     const install = execSync(
       commandAsWebserver(
-        `php ./scripts/test-site.php install ${setupFile} --base-url ${process.env.DRUPAL_TEST_BASE_URL} ${dbOption} --json`,
+        `php ./scripts/test-site.php install ${setupFile} --install-profile nightwatch_testing --base-url ${process.env.DRUPAL_TEST_BASE_URL} ${dbOption} --json`,
       ),
     );
     const installData = JSON.parse(install.toString());
diff --git a/core/tests/Drupal/Nightwatch/Tests/exampleTest.js b/core/tests/Drupal/Nightwatch/Tests/exampleTest.js
index 04f21954d07d3414851f1ddc23db115dbadbf8a5..da58421350203ffd7b642c3221863cbdc5b65d3a 100644
--- a/core/tests/Drupal/Nightwatch/Tests/exampleTest.js
+++ b/core/tests/Drupal/Nightwatch/Tests/exampleTest.js
@@ -22,6 +22,7 @@ module.exports = {
       .drupalRelativeURL('/test-page')
       .waitForElementVisible('@body', testPage.props.timeout)
       .assert.containsText('@body', testPage.props.text)
+      .assert.noDeprecationErrors()
       .drupalLogAndEnd({ onlyOnError: false });
   },
 };
diff --git a/core/tests/Drupal/Nightwatch/Tests/jsDeprecationTest.js b/core/tests/Drupal/Nightwatch/Tests/jsDeprecationTest.js
new file mode 100644
index 0000000000000000000000000000000000000000..e24acff88d4b1a05df3c43552414023f8b02ed8c
--- /dev/null
+++ b/core/tests/Drupal/Nightwatch/Tests/jsDeprecationTest.js
@@ -0,0 +1,32 @@
+module.exports = {
+  '@tags': ['core'],
+  before(browser) {
+    browser.drupalInstall().drupalLoginAsAdmin(() => {
+      browser
+        .drupalRelativeURL('/admin/modules')
+        .setValue('input[type="search"]', 'JS Deprecation test')
+        .waitForElementVisible(
+          'input[name="modules[js_deprecation_test][enable]"]',
+          1000,
+        )
+        .click('input[name="modules[js_deprecation_test][enable]"]')
+        .click('input[type="submit"]'); // Submit module form.
+    });
+  },
+  after(browser) {
+    browser.drupalUninstall();
+  },
+  'Test JavaScript deprecations': browser => {
+    browser
+      .drupalRelativeURL('/js_deprecation_test')
+      .waitForElementVisible('body', 1000)
+      .assert.containsText('h1', 'JsDeprecationTest')
+      .assert.deprecationErrorExists(
+        'This function is deprecated for testing purposes.',
+      )
+      .assert.deprecationErrorExists(
+        'This property is deprecated for testing purposes.',
+      )
+      .drupalLogAndEnd({ onlyOnError: false });
+  },
+};
diff --git a/core/tests/Drupal/Nightwatch/Tests/loginTest.js b/core/tests/Drupal/Nightwatch/Tests/loginTest.js
index 3f1bb0a971802196b6c4a444092d744177351124..6fc9fdc024e893b352aa4857566cd4f703d668f7 100644
--- a/core/tests/Drupal/Nightwatch/Tests/loginTest.js
+++ b/core/tests/Drupal/Nightwatch/Tests/loginTest.js
@@ -17,7 +17,8 @@ module.exports = {
       })
       .drupalLogin({ name: 'user', password: '123' })
       .drupalRelativeURL('/admin/reports')
-      .expect.element('h1.page-title')
-      .text.to.contain('Reports');
+      .waitForElementVisible('body', 1000)
+      .assert.containsText('h1', 'Reports')
+      .assert.noDeprecationErrors();
   },
 };
diff --git a/core/tests/Drupal/Nightwatch/Tests/statesTest.js b/core/tests/Drupal/Nightwatch/Tests/statesTest.js
index f7ee1ba52219d1219b201e7eaa529c0c0211db2f..35bdd760a5dbe3c19acc5adeeee71a98da95153c 100644
--- a/core/tests/Drupal/Nightwatch/Tests/statesTest.js
+++ b/core/tests/Drupal/Nightwatch/Tests/statesTest.js
@@ -18,6 +18,7 @@ module.exports = {
     browser
       .drupalRelativeURL('/form-test/javascript-states-form')
       .waitForElementVisible('body', 1000)
-      .waitForElementNotVisible('input[name="textfield"]', 1000);
+      .waitForElementNotVisible('input[name="textfield"]', 1000)
+      .assert.noDeprecationErrors();
   },
 };