From 13d96256a1c1dc7fb9da8731311dd3cf7b5bc908 Mon Sep 17 00:00:00 2001
From: Ted Bowman <ted@tedbow.com>
Date: Thu, 23 Sep 2021 13:19:50 -0400
Subject: [PATCH] remove update tabs

---
 automatic_updates.module                 | 12 ++++++++++++
 tests/src/Functional/UpdaterFormTest.php |  4 +---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/automatic_updates.module b/automatic_updates.module
index 1379ccbb91..08df7b9bfb 100644
--- a/automatic_updates.module
+++ b/automatic_updates.module
@@ -84,3 +84,15 @@ function automatic_updates_form_update_manager_update_form_alter(&$form, FormSta
     }
   }
 }
+
+/**
+ * Implements hook_local_tasks_alter().
+ */
+function automatic_updates_local_tasks_alter(&$local_tasks) {
+  // The Update modules current update form only allows updating modules and
+  // themes via downloading archive files which could produce unexpected results
+  // on a site using our Composer based updater.
+  unset($local_tasks['update.report_update']);
+  unset($local_tasks['update.module_update']);
+  unset($local_tasks['update.theme_update']);
+}
diff --git a/tests/src/Functional/UpdaterFormTest.php b/tests/src/Functional/UpdaterFormTest.php
index 73e0d983b1..ab8180ea04 100644
--- a/tests/src/Functional/UpdaterFormTest.php
+++ b/tests/src/Functional/UpdaterFormTest.php
@@ -98,9 +98,7 @@ class UpdaterFormTest extends BrowserTestBase {
     //   https://www.drupal.org/i/3233564
     $this->clickLink('Extend');
     $assert_session->pageTextContainsOnce('There is a security update available for your version of Drupal.');
-    $this->clickLink('Update');
-    $assert_session->pageTextContainsOnce('Drupal core updates are supported by the enabled Automatic Updates module');
-    $this->clickLink('Automatic Updates module');
+    $this->clickLink('Automatic Updates');
     $assert_session->pageTextNotContains('There is a security update available for your version of Drupal.');
     $cells = $assert_session->elementExists('css', '#edit-projects .update-update-security')
       ->findAll('css', 'td');
-- 
GitLab