Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / modules / js_webassert_test / js / js_webassert_test.wait_for_ajax_request.es6.js
diff --git a/web/core/modules/system/tests/modules/js_webassert_test/js/js_webassert_test.wait_for_ajax_request.es6.js b/web/core/modules/system/tests/modules/js_webassert_test/js/js_webassert_test.wait_for_ajax_request.es6.js
new file mode 100644 (file)
index 0000000..d2e1fea
--- /dev/null
@@ -0,0 +1,18 @@
+/**
+ * @file
+ *  Testing behavior for JSWebAssertTest.
+ */
+
+(function ($, Drupal, drupalSettings) {
+  /**
+   * @type {Drupal~behavior}
+   *
+   * @prop {Drupal~behaviorAttach} attach
+   *   Makes changes in the DOM to be able to test the completion of AJAX in assertWaitOnAjaxRequest.
+   */
+  Drupal.behaviors.js_webassert_test_wait_for_ajax_request = {
+    attach(context) {
+      $('input[name="test_assert_wait_on_ajax_input"]').val('js_webassert_test');
+    },
+  };
+}(jQuery, Drupal, drupalSettings));