From 6d711dc513219ef4edcdb45172eb5a23fadab655 Mon Sep 17 00:00:00 2001
From: Rajab Natshah <rajabn@gmail.com>
Date: Sat, 9 Jun 2018 22:49:54 +0300
Subject: [PATCH] Issue #2978551: Fixed issue for the [rabbit hole] with
 [entity clone] modules to ensure getOperation method exists on form

---
 composer.json                                         |  4 ++--
 drupal-org.make                                       |  2 ++
 .../05-04-cloning-content-and-entities.feature        | 11 +++++------
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/composer.json b/composer.json
index b8b048a4..940682b3 100644
--- a/composer.json
+++ b/composer.json
@@ -374,8 +374,8 @@
         "https://www.drupal.org/files/issues/2018-03-09/toolbar_alter_error-2947616-11.patch"
       },
       "drupal/rabbit_hole": {
-        "Issue #2918563: rh_media submodule compatible with core media?":
-        "https://www.drupal.org/files/issues/rh_media-upgrade-drupal8.4.2-2918563-6.patch"
+        "Issue #2961738: Ensure getOperation method exists on form":
+        "https://www.drupal.org/files/issues/2018-05-10/rabbit_hole-instance_of_check-2961738-5.patch"
       },
       "drupal/entity_embed": {
         "Issue #2832504: Send the CKEditor instance ID to the embed.preview route.":
diff --git a/drupal-org.make b/drupal-org.make
index 0c57eb5a..5ce105d1 100644
--- a/drupal-org.make
+++ b/drupal-org.make
@@ -228,6 +228,8 @@ projects[node_edit_protection][patch][] = https://www.drupal.org/files/issues/20
 
 projects[rabbit_hole][type] = module
 projects[rabbit_hole][version] = 1.0-beta4
+;; Issue #2961738: Ensure getOperation method exists on form":
+projects[rabbit_hole][patch][] = https://www.drupal.org/files/issues/2018-05-10/rabbit_hole-instance_of_check-2961738-5.patch
 
 projects[fast_404][type] = module
 projects[fast_404][version] = 1.0-alpha3
diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature b/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature
index d05dff0f..b30bb893 100644
--- a/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature
+++ b/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature
@@ -23,8 +23,11 @@ I want to be able to clone an entity.
      Then I should see "Components"
      When I fill in "Modal button" for "Modal button text"
       And I fill in "Modal title" for "Modal title"
+      And I wait for AJAX to finish
+      And I wait
       And I press "Add Component"
       And I wait for AJAX to finish
+      And I wait
       And I press "field_lp_paragraphs_0_subform_bp_modal_body_bp_simple_add_more"
       And I wait
      Then I should see "Modal body"
@@ -36,8 +39,7 @@ I want to be able to clone an entity.
      Then I should see "Clone Content"
      When I press "edit-clone"
       And I wait
-     Then I should see "Test Clone landing page - Cloned" value in the "edit-title-0-value" input element
-      And I press "Save"
+     Then I should see "Test Clone landing page - Cloned"
 
   @javascript @local @development
   Scenario: Check if a user with a permission deleted a cloned entity the original will not affected
@@ -67,7 +69,4 @@ I want to be able to clone an entity.
      Then I should see "Test Clone landing page"
      When I click "Test Clone landing page"
       And I wait
-     Then I should see "Modal button"
-     When I press "Modal button"
-      And I wait for AJAX to finish
-     Then I should see "Modal title"
\ No newline at end of file
+     Then I should see "Test Clone landing page"
-- 
GitLab